John2J/SFVS / mmaudio /model /utils /sample_utils.py
John2J's picture
download
raw
361 Bytes
from typing import Optional
import torch
def log_normal_sample(x: torch.Tensor,
generator: Optional[torch.Generator] = None,
m: float = 0.0,
s: float = 1.0) -> torch.Tensor:
bs = x.shape[0]
s = torch.randn(bs, device=x.device, generator=generator) * s + m
return torch.sigmoid(s)

Xet Storage Details

Size:
361 Bytes
·
Xet hash:
e325997b10a7721e4131c75b7305822055c1d66818865ed6fee02023a8a23b7b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.