* fix error in i2i detection.

* check for lingering special character sequences.
* small refactorings.
This commit is contained in:
Antonio Cordero Balcazar
2024-11-23 14:00:43 +01:00
parent 3810320f6e
commit ee7ba94a30
4 changed files with 58 additions and 48 deletions
+2 -1
View File
@@ -135,7 +135,8 @@ class PromptPostProcessorA1111Script(scripts.Script):
t1 = time.time()
if getattr(opts, "prompt_attention", "") == "Compel parser":
self.ppp_logger.warning("Compel parser is not supported!")
is_i2i = getattr(p, "init_images", [None])[0] is not None
init_images = getattr(p, "init_images", [None]) or [None]
is_i2i = bool(init_images[0])
self.ppp_debug_level = DEBUG_LEVEL(getattr(opts, "ppp_gen_debug_level", DEBUG_LEVEL.none.value))
do_i2i = getattr(opts, "ppp_gen_doi2i", False)
if is_i2i and not do_i2i: