MCPcopy Create free account
hub / github.com/modelscope/DiffSynth-Studio / generate_noise

Method generate_noise

diffsynth/pipelines/base.py:124–127  ·  view source on GitHub ↗
(self, shape, seed=None, device="cpu", dtype=torch.float16)

Source from the content-addressed store, hash-verified

122
123
124 def generate_noise(self, shape, seed=None, device="cpu", dtype=torch.float16):
125 generator = None if seed is None else torch.Generator(device).manual_seed(seed)
126 noise = torch.randn(shape, generator=generator, device=device, dtype=dtype)
127 return noise

Callers 15

encode_image_with_vaeMethod · 0.45
__call__Method · 0.45
__call__Method · 0.45
processMethod · 0.45
__call__Method · 0.45
__call__Method · 0.45
__call__Method · 0.45
processMethod · 0.45
__call__Method · 0.45
prepare_latentsMethod · 0.45
__call__Method · 0.45
__call__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected