fix img2img interrogate

This commit is contained in:
Vladimir Mandic
2023-12-30 08:08:41 -05:00
parent 8db8b643ab
commit 176b341bdf
7 changed files with 16 additions and 8 deletions
+3 -3
View File
@@ -217,14 +217,14 @@ def process_diffusers(p: StableDiffusionProcessing):
if 'prompt' in possible:
if hasattr(model, 'text_encoder') and 'prompt_embeds' in possible and len(p.prompt_embeds) > 0 and p.prompt_embeds[0] is not None:
args['prompt_embeds'] = p.prompt_embeds[0]
if 'XL' in model.__class__.__name__:
args['pooled_prompt_embeds'] = p.positive_pooleds[0]
if 'XL' in model.__class__.__name__ and len(getattr(p, 'negative_pooleds', [])) > 0:
args['pooled_prompt_embeds'] = p.negative_pooleds[0]
else:
args['prompt'] = prompts
if 'negative_prompt' in possible:
if hasattr(model, 'text_encoder') and 'negative_prompt_embeds' in possible and len(p.negative_embeds) > 0 and p.negative_embeds[0] is not None:
args['negative_prompt_embeds'] = p.negative_embeds[0]
if 'XL' in model.__class__.__name__:
if 'XL' in model.__class__.__name__ and len(getattr(p, 'negative_pooleds', [])) > 0:
args['negative_pooled_prompt_embeds'] = p.negative_pooleds[0]
else:
args['negative_prompt'] = negative_prompts