feat: Auto-apply style anchor prefix when regenerating frame images
This commit is contained in:
@@ -454,13 +454,25 @@ async def regenerate_frame_image(
|
|||||||
try:
|
try:
|
||||||
# Import and use PixelleVideo core services
|
# Import and use PixelleVideo core services
|
||||||
from api.dependencies import get_pixelle_video
|
from api.dependencies import get_pixelle_video
|
||||||
|
from api.routers.quality import _style_anchors
|
||||||
|
|
||||||
pixelle_video = await get_pixelle_video()
|
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 MediaService to generate image via RunningHub workflow
|
||||||
# Use image_flux workflow by default, or get from config
|
# Use image_flux workflow by default, or get from config
|
||||||
result = await pixelle_video.image(
|
result = await pixelle_video.image(
|
||||||
prompt=prompt,
|
prompt=final_prompt,
|
||||||
media_type="image",
|
media_type="image",
|
||||||
workflow="runninghub/image_flux.json",
|
workflow="runninghub/image_flux.json",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user