feat: Add comprehensive timeline editor with frame editing and regeneration capabilities
This commit is contained in:
@@ -176,6 +176,16 @@ class StandardPipeline(LinearVideoPipeline):
|
||||
min_words = ctx.params.get("min_image_prompt_words", 30)
|
||||
max_words = ctx.params.get("max_image_prompt_words", 60)
|
||||
|
||||
# Auto-detect characters from narrations if CharacterMemory is enabled
|
||||
character_memory = ctx.params.get("character_memory")
|
||||
if character_memory and character_memory.config.auto_detect_characters:
|
||||
logger.info("🔍 Auto-detecting characters from narrations...")
|
||||
for i, narration in enumerate(ctx.narrations):
|
||||
await character_memory.detect_characters_from_narration(narration, frame_index=i)
|
||||
if character_memory.characters:
|
||||
detected_names = [c.name for c in character_memory.characters]
|
||||
logger.info(f"✅ Detected {len(character_memory.characters)} characters: {detected_names}")
|
||||
|
||||
# Override prompt_prefix if provided
|
||||
original_prefix = None
|
||||
if prompt_prefix is not None:
|
||||
@@ -205,6 +215,16 @@ class StandardPipeline(LinearVideoPipeline):
|
||||
progress_callback=image_prompt_progress
|
||||
)
|
||||
|
||||
# Apply character memory enhancement (if available)
|
||||
character_memory = ctx.params.get("character_memory")
|
||||
if character_memory and character_memory.characters:
|
||||
active_characters = [c for c in character_memory.characters if getattr(c, 'is_active', True)]
|
||||
if active_characters:
|
||||
logger.info(f"🎭 Applying {len(active_characters)} active characters to {len(base_image_prompts)} prompts")
|
||||
base_image_prompts = [
|
||||
character_memory.apply_to_prompt(p) for p in base_image_prompts
|
||||
]
|
||||
|
||||
# Apply prompt prefix
|
||||
image_config = self.core.config.get("comfyui", {}).get("image", {})
|
||||
prompt_prefix_to_use = prompt_prefix if prompt_prefix is not None else image_config.get("prompt_prefix", "")
|
||||
|
||||
Reference in New Issue
Block a user