Route references found in full chunk prompts
This commit is contained in:
+11
-1
@@ -181,10 +181,20 @@ class DumasH3SequencePromptBuilder:
|
||||
default_seconds=float(default_chunk_seconds),
|
||||
)
|
||||
selectors = []
|
||||
directive = str(shared_directive or "").strip()
|
||||
sound = str(soundscape or "").strip() or "N/A"
|
||||
music_text = str(music or "").strip() or "N/A"
|
||||
for reference_index in range(1, 10):
|
||||
chunks = []
|
||||
for chunk_index, clip in enumerate(sequence["clips"], start=1):
|
||||
text = "\n".join(str(slot.get("text", "")) for slot in clip["slots"])
|
||||
# Match against the same per-chunk content emitted by
|
||||
# format_sequence_prompt, not only the editable shot lines.
|
||||
text = "\n".join([
|
||||
directive,
|
||||
*(str(slot.get("text", "")) for slot in clip["slots"]),
|
||||
f"overall_soundscape: {sound}",
|
||||
f"non_diegetic_music: {music_text}",
|
||||
])
|
||||
if kwargs.get(f"reference_image_{reference_index}") is not None and re.search(
|
||||
rf"@(R{reference_index}|image{reference_index})(?![A-Za-z0-9_])",
|
||||
text,
|
||||
|
||||
Reference in New Issue
Block a user