flux-kontext with variable resolution

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-08-08 11:44:21 -04:00
parent 353d73e042
commit a345ae0e3b
2 changed files with 12 additions and 4 deletions
+6 -4
View File
@@ -4,7 +4,8 @@
### Highlights for 2025-08-08
Several new and updated models: [Qwen-Image](https://qwenlm.github.io/blog/qwen-image/), [FLUX.1-Krea-Dev](https://www.krea.ai/blog/flux-krea-open-source-release), [Chroma](https://huggingface.co/lodestones/Chroma), [SkyReels-V2](https://huggingface.co/Skywork/SkyReels-V2-DF-14B-720P-Diffusers), [Wan-VACE](https://huggingface.co/Wan-AI/Wan2.1-VACE-14B-diffusers)
Several new models: [Qwen-Image](https://qwenlm.github.io/blog/qwen-image/), [FLUX.1-Krea-Dev](https://www.krea.ai/blog/flux-krea-open-source-release)
And several updated models: [Chroma](https://huggingface.co/lodestones/Chroma), [SkyReels-V2](https://huggingface.co/Skywork/SkyReels-V2-DF-14B-720P-Diffusers), [Wan-VACE](https://huggingface.co/Wan-AI/Wan2.1-VACE-14B-diffusers)
Plus continuing with major **UI** work, there is new embedded **Docs/Wiki** search, redesigned real-time **hints**, built-in **GPU monitor**, **CivitAI** integration and more!
On the compute side, new profiles for high-vram GPUs and offloading improvements
And (*as always*) many bugfixes and improvements to existing features!
@@ -91,7 +92,7 @@ And (*as always*) many bugfixes and improvements to existing features!
- **Fixes**
- refactor legacy processing loop
- fix settings components mismatch
- fix Wan 2.2-5B I2V workflow
- fix *Wan 2.2-5B I2V* workflow
- fix OpenVINO
- fix video model vs pipeline mismatch
- fix video generic save frames
@@ -100,8 +101,9 @@ And (*as always*) many bugfixes and improvements to existing features!
- fix progress bar with refine/detailer
- fix api progress reporting endpoint
- fix openvino backend failing to compile
- fix nunchaku fallback on unsupported model
- fix nunchaku windows download links
- fix `nunchaku` fallback on unsupported model
- fix `nunchaku` windows download links
- fix *Flux.1-Kontext-Dev* with variable resolution
- use `utf_16_be` as primary metadata decoding
- reapply offloading on ipadapter load
- api set default script-name
+6
View File
@@ -99,6 +99,8 @@ def task_specific_kwargs(p, model):
'height': height,
'width': width,
}
# model specific args
if model.__class__.__name__ == 'LatentConsistencyModelPipeline' and hasattr(p, 'init_images') and len(p.init_images) > 0:
p.ops.append('lcm')
init_latents = [processing_vae.vae_encode(image, model=shared.sd_model, vae_type=p.vae_type).squeeze(dim=0) for image in p.init_images]
@@ -120,6 +122,8 @@ def task_specific_kwargs(p, model):
'target_subject_category': getattr(p, 'prompt', '').split()[-1],
'output_type': 'pil',
}
# TODO
if debug_enabled:
debug_log(f'Process task specific args: {task_args}')
return task_args
@@ -388,6 +392,8 @@ def set_pipeline_args(p, model, prompts:list, negative_prompts:list, prompts_2:t
else:
args['width'] = 8 * math.ceil(args['image'][0].width / 8)
args['height'] = 8 * math.ceil(args['image'][0].height / 8)
if 'max_area' in possible and 'width' in args and 'height' in args and 'max_area' not in args:
args['max_area'] = args['width'] * args['height']
# handle implicit controlnet
if 'control_image' in possible and 'control_image' not in args and 'image' in args: