diff --git a/CHANGELOG.md b/CHANGELOG.md index 948a810d3..ac8439512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log for SD.Next -## Update for 2025-08-23 +## Update for 2025-08-24 - **Models** - **Chroma** final versions: [Chroma1-HD](https://huggingface.co/lodestones/Chroma1-HD), [Chroma1-Base](https://huggingface.co/lodestones/Chroma1-Base) and [Chroma1-Flash](https://huggingface.co/lodestones/Chroma1-Flash) @@ -17,6 +17,7 @@ - improve handling of pre-quantized flux models - fix networks reference models display on windows - wan use correct pipeline for i2v models + - qwen-image with hires ## Update for 2025-08-20 diff --git a/modules/processing_args.py b/modules/processing_args.py index a80a3e56d..ae6eaa327 100644 --- a/modules/processing_args.py +++ b/modules/processing_args.py @@ -382,8 +382,15 @@ def set_pipeline_args(p, model, prompts:list, negative_prompts:list, prompts_2:t if 'width' in possible and 'height' in possible: vae_scale_factor = sd_vae.get_vae_scale_factor(model) if isinstance(args['image'], torch.Tensor) or isinstance(args['image'], np.ndarray): - args['width'] = vae_scale_factor * args['image'].shape[-1] - args['height'] = vae_scale_factor * args['image'].shape[-2] + if args['image'].shape[-1] == 3: # nhwc + args['width'] = args['image'].shape[-2] + args['height'] = args['image'].shape[-3] + elif args['image'].shape[-3] == 3: # nchw + args['width'] = args['image'].shape[-1] + args['height'] = args['image'].shape[-2] + else: # assume latent + args['width'] = vae_scale_factor * args['image'].shape[-1] + args['height'] = vae_scale_factor * args['image'].shape[-2] elif isinstance(args['image'], Image.Image): args['width'] = args['image'].width args['height'] = args['image'].height diff --git a/modules/processing_diffusers.py b/modules/processing_diffusers.py index 4ae15903a..d31732528 100644 --- a/modules/processing_diffusers.py +++ b/modules/processing_diffusers.py @@ -223,6 +223,11 @@ def process_hires(p: processing.StableDiffusionProcessing, output): shared.state.update('Upscale', 0, 1) output.images = resize_hires(p, latents=output.images) sd_hijack_hypertile.hypertile_set(p, hr=True) + elif torch.is_tensor(output.images) and output.images.shape[-1] == 3: # nhwc + if output.images.dim() == 3: + output.images = TF.to_pil_image(output.images.permute(2,0,1)) + elif output.images.dim() == 4: + output.images = [TF.to_pil_image(output.images[i].permute(2,0,1)) for i in range(output.images.shape[0])] strength = p.hr_denoising_strength if p.hr_denoising_strength > 0 else p.denoising_strength if (p.hr_upscaler.lower().startswith('latent') or p.hr_force) and strength > 0: