From dbb2bd7695bc27c288baadf854b71de67b85428a Mon Sep 17 00:00:00 2001 From: DefTruth Date: Mon, 9 Mar 2026 02:21:52 +0000 Subject: [PATCH 1/4] allow pass cpu generator for helios --- src/diffusers/pipelines/helios/pipeline_helios_pyramid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py index d8f317a9a6f1..b8964b979476 100644 --- a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py +++ b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py @@ -470,7 +470,8 @@ def sample_block_noise( L = torch.linalg.cholesky(cov) block_number = batch_size * channel * num_frames * (height // ph) * (width // pw) - z = torch.randn(block_number, block_size, device=device, generator=generator) + # z = torch.randn(block_number, block_size, device=device, generator=generator) + z = torch.randn(block_number, block_size, generator=generator).to(device=device) noise = z @ L.T noise = noise.view(batch_size, channel, num_frames, height // ph, width // pw, ph, pw) From 515da62758b8212613b92515d65e1caf3c2a080f Mon Sep 17 00:00:00 2001 From: DefTruth Date: Mon, 9 Mar 2026 02:22:39 +0000 Subject: [PATCH 2/4] allow pass cpu generator for helios --- src/diffusers/pipelines/helios/pipeline_helios_pyramid.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py index b8964b979476..68df48bca28f 100644 --- a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py +++ b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py @@ -470,7 +470,6 @@ def sample_block_noise( L = torch.linalg.cholesky(cov) block_number = batch_size * channel * num_frames * (height // ph) * (width // pw) - # z = torch.randn(block_number, block_size, device=device, generator=generator) z = torch.randn(block_number, block_size, generator=generator).to(device=device) noise = z @ L.T From 34bc7d8fc04150abfc08c30e73bff3d77f9b4f45 Mon Sep 17 00:00:00 2001 From: DefTruth Date: Mon, 9 Mar 2026 02:40:31 +0000 Subject: [PATCH 3/4] allow pass cpu generator for helios --- src/diffusers/pipelines/helios/pipeline_helios_pyramid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py index 68df48bca28f..e80fb7454ab2 100644 --- a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py +++ b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py @@ -470,7 +470,8 @@ def sample_block_noise( L = torch.linalg.cholesky(cov) block_number = batch_size * channel * num_frames * (height // ph) * (width // pw) - z = torch.randn(block_number, block_size, generator=generator).to(device=device) + z = torch.randn(block_number, block_size, generator=generator, device=generator.device) + z = z.to(device=device) noise = z @ L.T noise = noise.view(batch_size, channel, num_frames, height // ph, width // pw, ph, pw) From 38e1e48affbd9431adaf49bd94e503f228df2b9a Mon Sep 17 00:00:00 2001 From: DefTruth Date: Mon, 9 Mar 2026 07:34:14 +0000 Subject: [PATCH 4/4] patch --- src/diffusers/pipelines/helios/pipeline_helios_pyramid.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py index e80fb7454ab2..1791da11b490 100644 --- a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py +++ b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py @@ -456,6 +456,8 @@ def sample_block_noise( # the output will be non-deterministic and may produce incorrect results in CP context. if generator is None: generator = torch.Generator(device=device) + elif isinstance(generator, list): + generator = generator[0] gamma = self.scheduler.config.gamma _, ph, pw = patch_size