chore: vendor selva_core from jnwnlee/selva@d7d40a9
Pure PyTorch SelVA source for SelvaModelLoader/FeatureExtractor/Sampler nodes. Imports rewritten from selva.* to selva_core.*. mel_converter.py: replaced librosa.filters.mel with pure-numpy implementation to avoid librosa→numba→NumPy version incompatibility in some ComfyUI environments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user