Keep curator auxiliary refs input-aligned

This commit is contained in:
2026-09-17 16:02:27 +00:00
parent bfaa5fa733
commit b5eb941c4b
3 changed files with 59 additions and 15 deletions
+15 -8
View File
@@ -1253,13 +1253,13 @@ def curate_h3_prompt(
soundscape_text = _reference_text(soundscape)
bgm_text = _reference_text(bgm)
reference_description = ""
individual_reference_descriptions = []
selected_reference_descriptions = []
if selected:
individual_reference_descriptions = [
selected_reference_descriptions = [
_reference_context(ref, picture_number)
for picture_number, (_slot, ref) in enumerate(selected, 1)
]
reference_description = " ".join(individual_reference_descriptions)
reference_description = " ".join(selected_reference_descriptions)
prompt_parts = []
_append_prompt_section(prompt_parts, "Scene anchor", anchor_text)
@@ -1279,9 +1279,16 @@ 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))
)
original_images = [
_reference_image(ref) if ref is not None else None
for ref in normalized_refs
]
original_images.extend([None] * (_H3_PROMPT_REF_SLOTS - len(original_images)))
input_reference_descriptions = [
_reference_context(ref, slot_number) if ref is not None else ""
for slot_number, ref in enumerate(normalized_refs, 1)
]
input_reference_descriptions.extend([""] * (_H3_PROMPT_REF_SLOTS - len(input_reference_descriptions)))
debug = (
f"Selected {len(selected)} reference(s): "
+ ", ".join(
@@ -1299,8 +1306,8 @@ def curate_h3_prompt(
anchor_text,
soundscape_text,
bgm_text,
*images[:_H3_PROMPT_REF_SLOTS],
*individual_reference_descriptions[:_H3_PROMPT_REF_SLOTS],
*original_images[:_H3_PROMPT_REF_SLOTS],
*input_reference_descriptions[:_H3_PROMPT_REF_SLOTS],
)