cleanup layered again

Signed-off-by: vladmandic <mandic00@live.com>
pull/4493/head
vladmandic 2025-12-22 22:52:56 +01:00
parent b5a5efaf62
commit 72b533a52a
3 changed files with 4 additions and 3 deletions

View File

@ -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):

View File

@ -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

View File

@ -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