work on convert-to-modular

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-08-29 14:12:01 +02:00
parent 62bedf8834
commit 34a3155f96
8 changed files with 32 additions and 43 deletions
+4 -1
View File
@@ -3,7 +3,7 @@ from __future__ import annotations
import os
from typing import TYPE_CHECKING
import torch
from modules import shared, errors, timer, prompt_parser_diffusers
from modules import shared, errors, timer, prompt_parser_diffusers, processing_helpers
from modules.logger import log
if TYPE_CHECKING:
@@ -189,6 +189,9 @@ def set_prompt(p: StableDiffusionProcessing,
args = set_fallback_prompt(args, possible, prompts=prompts, negative_prompts=negative_prompts, prompts_2=None, negative_prompts_2=None)
prompt_attention = 'fixed'
if processing_helpers.is_modular():
return prompt_attention, args
if 'prompt_embeds' not in args and 'negative_prompt_embeds' not in args: # pass secondary prompts as-in
args = set_fallback_prompt(args, possible, prompts=None, negative_prompts=None, prompts_2=prompts_2, negative_prompts_2=negative_prompts_2)