mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
qwen-image with hires
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user