feat: Auto-apply style anchor prefix when regenerating frame images

This commit is contained in:
empty
2026-01-06 23:50:27 +08:00
parent bf5a2af4fd
commit 7da6ed6a74

View File

@@ -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",
)