Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Fix noise with ancestral samplers when inferencing on cpu. (#11528)

comfyanonymous1e4e342f5438
diff --git a/comfy/k_diffusion/sampling.py b/comfy/k_diffusion/sampling.py
index 1ba9edad7..0949dee44 100644
--- a/comfy/k_diffusion/sampling.py
+++ b/comfy/k_diffusion/sampling.py
@@ -74,6 +74,9 @@ def get_ancestral_step(sigma_from, sigma_to, eta=1.):
def default_noise_sampler(x, seed=None):
if seed is not None:
+ if x.device == torch.device("cpu"):
+ seed += 1
+
generator = torch.Generator(device=x.device)
generator.manual_seed(seed)
else: