Restore compiled prompt reference descriptions

This commit is contained in:
2026-09-10 08:34:32 +00:00
parent d68d04254f
commit 8d4232a142
4 changed files with 39 additions and 5 deletions
+18 -2
View File
@@ -1253,11 +1253,13 @@ def curate_h3_prompt(
soundscape_text = _reference_text(soundscape)
bgm_text = _reference_text(bgm)
reference_description = ""
individual_reference_descriptions = []
if selected:
reference_description = " ".join(
individual_reference_descriptions = [
_reference_context(ref, picture_number)
for picture_number, (_slot, ref) in enumerate(selected, 1)
)
]
reference_description = " ".join(individual_reference_descriptions)
prompt_parts = []
_append_prompt_section(prompt_parts, "Scene anchor", anchor_text)
@@ -1277,6 +1279,9 @@ def curate_h3_prompt(
prompt = prompt[: _H3_PROMPT_MAX_CHARS - 3].rstrip() + "..."
images = [_reference_image(ref) for _slot, ref in selected]
images.extend([None] * (_H3_PROMPT_REF_SLOTS - len(images)))
individual_reference_descriptions.extend(
[""] * (_H3_PROMPT_REF_SLOTS - len(individual_reference_descriptions))
)
debug = (
f"Selected {len(selected)} reference(s): "
+ ", ".join(
@@ -1295,6 +1300,7 @@ def curate_h3_prompt(
soundscape_text,
bgm_text,
*images[:_H3_PROMPT_REF_SLOTS],
*individual_reference_descriptions[:_H3_PROMPT_REF_SLOTS],
)
@@ -2687,6 +2693,7 @@ class DumasH3PromptCuratorNode:
+ ("IMAGE",) * _H3_PROMPT_REF_SLOTS
+ ("INT", "STRING", "STRING", "STRING", "STRING")
+ ("IMAGE",) * _H3_PROMPT_REF_SLOTS
+ ("STRING",) * _H3_PROMPT_REF_SLOTS
)
RETURN_NAMES = (
"prompt",
@@ -2713,6 +2720,15 @@ class DumasH3PromptCuratorNode:
"original_ref_7",
"original_ref_8",
"original_ref_9",
"compiled_ref_description_1",
"compiled_ref_description_2",
"compiled_ref_description_3",
"compiled_ref_description_4",
"compiled_ref_description_5",
"compiled_ref_description_6",
"compiled_ref_description_7",
"compiled_ref_description_8",
"compiled_ref_description_9",
)
FUNCTION = "curate_prompt"
CATEGORY = "Dumas/MiniMax"