From 72b533a52a3950ae5ac5796d96ed5623b4e9b6c3 Mon Sep 17 00:00:00 2001 From: vladmandic Date: Mon, 22 Dec 2025 22:52:56 +0100 Subject: [PATCH] cleanup layered again Signed-off-by: vladmandic --- modules/processing_args.py | 2 +- modules/processing_helpers.py | 2 +- pipelines/model_qwen.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/processing_args.py b/modules/processing_args.py index fe3d623ad..4f55e841c 100644 --- a/modules/processing_args.py +++ b/modules/processing_args.py @@ -128,7 +128,7 @@ def task_specific_kwargs(p, model): if ('QwenImageEditPlusPipeline' in model_cls) and (p.init_control is not None) and (len(p.init_control) > 0): task_args['image'] += p.init_control if ('QwenImageLayeredPipeline' in model_cls) and (p.init_images is not None) and (len(p.init_images) > 0): - task_args['image'] = p.init_images[0] + task_args['image'] = p.init_images[0].convert('RGBA') if ('Flux2' in model_cls) and (p.init_control is not None) and (len(p.init_control) > 0): task_args['image'] += p.init_control if ('LatentConsistencyModelPipeline' in model_cls) and (len(p.init_images) > 0): diff --git a/modules/processing_helpers.py b/modules/processing_helpers.py index ee15354ac..19f8352c6 100644 --- a/modules/processing_helpers.py +++ b/modules/processing_helpers.py @@ -408,7 +408,7 @@ def calculate_base_steps(p, use_denoise_start, use_refiner_start): if len(getattr(p, 'timesteps', [])) > 0: return None cls = shared.sd_model.__class__.__name__ - if 'Flex' in cls or 'Kontext' in cls or 'Edit' in cls or 'Wan' in cls or 'Flux2' in cls: + if 'Flex' in cls or 'Kontext' in cls or 'Edit' in cls or 'Wan' in cls or 'Flux2' in cls or 'Layered' in cls: steps = p.steps elif is_modular(): steps = p.steps diff --git a/pipelines/model_qwen.py b/pipelines/model_qwen.py index 627b5d6da..e8229ee6a 100644 --- a/pipelines/model_qwen.py +++ b/pipelines/model_qwen.py @@ -76,8 +76,9 @@ def load_qwen(checkpoint_info, diffusers_load_config=None): } if 'Layered' in repo_id: pipe.task_args['use_en_prompt'] = True - pipe.task_args['cfg_normalize'] = True + pipe.task_args['cfg_normalize'] = False pipe.task_args['layers'] = shared.opts.model_qwen_layers + pipe.task_args['resolution'] = 640 del text_encoder del transformer