mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-29 00:00:53 +08:00
Fix noise with ancestral samplers when inferencing on cpu. (#11528)
This commit is contained in:
parent
16fb6849d2
commit
1e4e342f54
@ -74,6 +74,9 @@ def get_ancestral_step(sigma_from, sigma_to, eta=1.):
|
|||||||
|
|
||||||
def default_noise_sampler(x, seed=None):
|
def default_noise_sampler(x, seed=None):
|
||||||
if seed is not None:
|
if seed is not None:
|
||||||
|
if x.device == torch.device("cpu"):
|
||||||
|
seed += 1
|
||||||
|
|
||||||
generator = torch.Generator(device=x.device)
|
generator = torch.Generator(device=x.device)
|
||||||
generator.manual_seed(seed)
|
generator.manual_seed(seed)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user