fix flux hires

This commit is contained in:
Vladimir Mandic
2024-09-08 19:48:08 -04:00
parent 62d3cdf37d
commit a0ea0840db
4 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ def diffusers_callback(pipe, step: int, timestep: int, kwargs: dict):
kwargs[key] = kwargs[key].chunk(2)[-1]
try:
if hasattr(pipe, "_unpack_latents") and hasattr(pipe, "vae_scale_factor"): # FLUX
if p.hr_resize_mode > 0 and (p.hr_upscaler != 'None' or p.hr_resize_mode == 5):
if p.hr_resize_mode > 0 and (p.hr_upscaler != 'None' or p.hr_resize_mode == 5) and p.is_hr_pass:
width = max(getattr(p, 'width', 0), getattr(p, 'hr_upscale_to_x', 0))
height = max(getattr(p, 'height', 0), getattr(p, 'hr_upscale_to_y', 0))
else: