Simplify H3 prompt curator component outputs
This commit is contained in:
+2
-45
@@ -1253,13 +1253,11 @@ def curate_h3_prompt(
|
||||
soundscape_text = _reference_text(soundscape)
|
||||
bgm_text = _reference_text(bgm)
|
||||
reference_description = ""
|
||||
individual_reference_descriptions = []
|
||||
if selected:
|
||||
individual_reference_descriptions = [
|
||||
reference_description = " ".join(
|
||||
_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)
|
||||
@@ -1279,11 +1277,6 @@ 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)))
|
||||
selected_refs = [ref for _slot, ref in selected]
|
||||
selected_refs.extend([None] * (_H3_PROMPT_REF_SLOTS - len(selected_refs)))
|
||||
individual_reference_descriptions.extend(
|
||||
[""] * (_H3_PROMPT_REF_SLOTS - len(individual_reference_descriptions))
|
||||
)
|
||||
debug = (
|
||||
f"Selected {len(selected)} reference(s): "
|
||||
+ ", ".join(
|
||||
@@ -1301,11 +1294,7 @@ def curate_h3_prompt(
|
||||
anchor_text,
|
||||
soundscape_text,
|
||||
bgm_text,
|
||||
*selected_refs[:_H3_PROMPT_REF_SLOTS],
|
||||
reference_description,
|
||||
*individual_reference_descriptions[:_H3_PROMPT_REF_SLOTS],
|
||||
*images[:_H3_PROMPT_REF_SLOTS],
|
||||
*individual_reference_descriptions[:_H3_PROMPT_REF_SLOTS],
|
||||
)
|
||||
|
||||
|
||||
@@ -2697,11 +2686,7 @@ class DumasH3PromptCuratorNode:
|
||||
("STRING",)
|
||||
+ ("IMAGE",) * _H3_PROMPT_REF_SLOTS
|
||||
+ ("INT", "STRING", "STRING", "STRING", "STRING")
|
||||
+ (_REFERENCE_TYPE,) * _H3_PROMPT_REF_SLOTS
|
||||
+ ("STRING",)
|
||||
+ ("STRING",) * _H3_PROMPT_REF_SLOTS
|
||||
+ ("IMAGE",) * _H3_PROMPT_REF_SLOTS
|
||||
+ ("STRING",) * _H3_PROMPT_REF_SLOTS
|
||||
)
|
||||
RETURN_NAMES = (
|
||||
"prompt",
|
||||
@@ -2728,34 +2713,6 @@ class DumasH3PromptCuratorNode:
|
||||
"original_ref_7",
|
||||
"original_ref_8",
|
||||
"original_ref_9",
|
||||
"reference_description",
|
||||
"original_ref_description_1",
|
||||
"original_ref_description_2",
|
||||
"original_ref_description_3",
|
||||
"original_ref_description_4",
|
||||
"original_ref_description_5",
|
||||
"original_ref_description_6",
|
||||
"original_ref_description_7",
|
||||
"original_ref_description_8",
|
||||
"original_ref_description_9",
|
||||
"compiled_ref_image_1",
|
||||
"compiled_ref_image_2",
|
||||
"compiled_ref_image_3",
|
||||
"compiled_ref_image_4",
|
||||
"compiled_ref_image_5",
|
||||
"compiled_ref_image_6",
|
||||
"compiled_ref_image_7",
|
||||
"compiled_ref_image_8",
|
||||
"compiled_ref_image_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"
|
||||
|
||||
Reference in New Issue
Block a user