From 981e7683e39d68f230ac24ccd19e48341d83b0a6 Mon Sep 17 00:00:00 2001 From: Shenghai Yuan <140951558+SHYuanBest@users.noreply.github.com> Date: Thu, 5 Mar 2026 22:14:42 +0800 Subject: [PATCH] Convert tensors to float in optimized_scale function --- 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 40c1d65825ff..0e08b2c6e958 100644 --- a/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py +++ b/src/diffusers/pipelines/helios/pipeline_helios_pyramid.py @@ -76,6 +76,8 @@ def optimized_scale(positive_flat, negative_flat): + positive_flat = positive_flat.float() + negative_flat = negative_flat.float() # Calculate dot production dot_product = torch.sum(positive_flat * negative_flat, dim=1, keepdim=True) # Squared norm of uncondition