gokaygokay commited on
Commit
098905a
·
1 Parent(s): d6e9a60

fix models

Browse files
Files changed (2) hide show
  1. app.py +31 -8
  2. llm_inference_video.py +18 -1
app.py CHANGED
@@ -22,22 +22,45 @@ def create_video_interface():
22
  )
23
 
24
  camera_style = gr.Dropdown(
25
- choices=["Steadicam flow", "Drone aerials", "Handheld urgency", "Crane elegance",
26
- "Dolly precision", "VR 360", "Multi-angle rig"],
27
- value="Steadicam flow",
 
 
 
 
 
 
 
28
  label="Camera Movement Style"
29
  )
30
 
31
  with gr.Column(scale=2):
32
  pacing = gr.Dropdown(
33
- choices=["Slow burn", "Rhythmic pulse", "Frantic energy", "Ebb and flow", "Hypnotic drift"],
34
- value="Rhythmic pulse",
 
 
 
 
 
 
 
 
35
  label="Pacing Rhythm"
36
  )
37
  special_effects = gr.Dropdown(
38
- choices=["Practical effects", "CGI enhancement", "Analog glitches",
39
- "Light painting", "Projection mapping", "Nanosecond exposures"],
40
- value="Practical effects",
 
 
 
 
 
 
 
 
41
  label="SFX Approach"
42
  )
43
  custom_elements = gr.Textbox(label="Custom Technical Elements",
 
22
  )
23
 
24
  camera_style = gr.Dropdown(
25
+ choices=[
26
+ "None",
27
+ "Steadicam flow", "Drone aerials", "Handheld urgency", "Crane elegance",
28
+ "Dolly precision", "VR 360", "Multi-angle rig", "Static tripod",
29
+ "Gimbal smoothness", "Slider motion", "Jib sweep", "POV immersion",
30
+ "Time-slice array", "Macro extreme", "Tilt-shift miniature",
31
+ "Snorricam character", "Whip pan dynamics", "Dutch angle tension",
32
+ "Underwater housing", "Periscope lens"
33
+ ],
34
+ value="None",
35
  label="Camera Movement Style"
36
  )
37
 
38
  with gr.Column(scale=2):
39
  pacing = gr.Dropdown(
40
+ choices=[
41
+ "None",
42
+ "Slow burn", "Rhythmic pulse", "Frantic energy", "Ebb and flow",
43
+ "Hypnotic drift", "Time-lapse rush", "Stop-motion staccato",
44
+ "Gradual build", "Quick cut rhythm", "Long take meditation",
45
+ "Jump cut energy", "Match cut flow", "Cross-dissolve dreamscape",
46
+ "Parallel action", "Slow motion impact", "Ramping dynamics",
47
+ "Montage tempo", "Continuous flow", "Episodic breaks"
48
+ ],
49
+ value="None",
50
  label="Pacing Rhythm"
51
  )
52
  special_effects = gr.Dropdown(
53
+ choices=[
54
+ "None",
55
+ "Practical effects", "CGI enhancement", "Analog glitches",
56
+ "Light painting", "Projection mapping", "Nanosecond exposures",
57
+ "Double exposure", "Smoke diffusion", "Lens flare artistry",
58
+ "Particle systems", "Holographic overlay", "Chromatic aberration",
59
+ "Digital distortion", "Wire removal", "Motion capture",
60
+ "Miniature integration", "Weather simulation", "Color grading",
61
+ "Mixed media composite", "Neural style transfer"
62
+ ],
63
+ value="None",
64
  label="SFX Approach"
65
  )
66
  custom_elements = gr.Textbox(label="Custom Technical Elements",
llm_inference_video.py CHANGED
@@ -28,9 +28,26 @@ class VideoLLMInferenceNode:
28
  prompt_length="Medium"
29
  ):
30
  try:
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  # Video prompt templates
32
  prompt_templates = {
33
- "minimalist": f"""Create an elegantly sparse video description focusing on {input_concept}. Emphasize negative space and essential elements only, using {camera_style} movements sparingly and {pacing} rhythm deliberately. Incorporate minimal {special_effects} effects and {custom_elements if custom_elements else 'clean compositional elements'} with utmost restraint.""",
 
 
 
 
34
 
35
  "dynamic": f"""Craft an energetic, fast-paced paragraph showcasing {input_concept} in constant motion. Utilize bold {camera_style} movements and {pacing} rhythm to create momentum. Layer {special_effects} effects and {custom_elements if custom_elements else 'powerful visual elements'} to maintain high energy throughout.""",
36
 
 
28
  prompt_length="Medium"
29
  ):
30
  try:
31
+ # Helper function to format optional elements
32
+ def format_element(element, element_type):
33
+ if element == "None" or not element:
34
+ return ""
35
+
36
+ element_prefixes = {
37
+ "camera": "utilizing",
38
+ "pacing": "with",
39
+ "effects": "incorporating"
40
+ }
41
+
42
+ return f" {element_prefixes.get(element_type, '')} {element}"
43
+
44
  # Video prompt templates
45
  prompt_templates = {
46
+ "minimalist": f"""Create an elegantly sparse video description focusing on {input_concept}.
47
+ {format_element(camera_style, 'camera')}
48
+ {format_element(pacing, 'pacing')}
49
+ {format_element(special_effects, 'effects')}
50
+ {' with ' + custom_elements if custom_elements else ''}.""",
51
 
52
  "dynamic": f"""Craft an energetic, fast-paced paragraph showcasing {input_concept} in constant motion. Utilize bold {camera_style} movements and {pacing} rhythm to create momentum. Layer {special_effects} effects and {custom_elements if custom_elements else 'powerful visual elements'} to maintain high energy throughout.""",
53