From 7da6ed6a7443ec6ac1f58485a154eb30e0b39dfd Mon Sep 17 00:00:00 2001 From: empty Date: Tue, 6 Jan 2026 23:50:27 +0800 Subject: [PATCH] feat: Auto-apply style anchor prefix when regenerating frame images --- api/routers/editor.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/api/routers/editor.py b/api/routers/editor.py index 59c8930..22558cb 100644 --- a/api/routers/editor.py +++ b/api/routers/editor.py @@ -454,13 +454,25 @@ async def regenerate_frame_image( try: # Import and use PixelleVideo core services from api.dependencies import get_pixelle_video + from api.routers.quality import _style_anchors pixelle_video = await get_pixelle_video() + # Get style anchor prefix if available + style_prefix = "" + if storyboard_id in _style_anchors: + style_data = _style_anchors[storyboard_id] + style_prefix = style_data.get("style_prefix", "") + if style_prefix: + logger.info(f"Applying style anchor prefix: {style_prefix[:50]}...") + + # Apply style prefix to prompt + final_prompt = f"{style_prefix}, {prompt}" if style_prefix else prompt + # Use MediaService to generate image via RunningHub workflow # Use image_flux workflow by default, or get from config result = await pixelle_video.image( - prompt=prompt, + prompt=final_prompt, media_type="image", workflow="runninghub/image_flux.json", )