You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transform image-based prompt presets into video-based ones by replacing
305
+
static constraints with motion-focused directives.
306
+
"""
307
+
# 1. Replacement Map for standard patterns (ordered by specificity)
308
+
replacements= [
309
+
# Complex Multi-phrase constraints
310
+
(r"(?i)(?:Keep|Maintain|Ensure)\s+subject\s+position\s+and\s+their\s+pose\s+the\s+same\s+as\s+the\s+reference", "Maintain character consistency with natural lifelike motion"),
311
+
(r"(?i)(?:Make\s+sure|Ensure)\s+the\s+subject\s+is\s+in\s+the\s+same\s+position", "Ensure the subject moves naturally within the environment"),
312
+
(r"(?i)keeping\s+the\s+composition\s+and\s+structure\s+of\s+the\s+image\s+same\s+as\s+reference", "maintaining character consistency and cinematic flow"),
313
+
(r"(?i)not\s+changing\s+the\s+positioning\s+of\s+subjects\s+in\s+image", "enabling dynamic character movement and large actions"),
314
+
(r"(?i)strictly\s+maintaining\s+their\s+original\s+appearance", "preserving visual identity during dynamic motion"),
315
+
316
+
# Simple Constraints -> Motion
317
+
(r"(?i)Keep\s+pose", "Fluid movement and dynamic posing"),
318
+
(r"(?i)Keep\s+angle", "Cinematic camera pans and motion"),
319
+
(r"(?i)Keep\s+viewing\s+direction", "Dynamic gaze and perspective shifts"),
320
+
(r"(?i)Keep\s+eyes", "Expressive eye movement and blinking"),
(r"(?i)Keep\s+body\s+color", "Maintain consistent color during motion"),
323
+
324
+
# Verb/Directive Transformation
325
+
(r"(?i)Modify\s+(?:any\s+subjects'\s+appearance|the\s+scene)\s+to\s+(?:match\s+|look\s+like\s+|show\s+)?(.*?)(?:\.(?:\s|$)|$)", r"Animate with motion and physics authentic to \1. "),
326
+
(r"(?i)focuses\s+on\s+edits\s+to\s+look\s+like\s+", "focuses on generating high-quality motion authentic to "),
327
+
(r"(?i)modify\s+the\s+style\s+to\s+look\s+like\s+", "animate with motion and physics authentic to "),
328
+
(r"(?i)image\s+editing\s+descriptions", "cinematic motion and video generation descriptions"),
prefix="Analyze cinematic information and dynamic potential. Describe action as if already in motion, focusing on large motions and style-appropriate physics. "
0 commit comments