linoyts HF Staff commited on
Commit
b640355
Β·
verified Β·
1 Parent(s): dbf8c43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -256,7 +256,9 @@ def generate_video(
256
  if control_video is not None:
257
  # Use the pre-processed canny frames
258
  processed_video = load_video(control_video)
 
259
  else:
 
260
  # Fallback to processing on-demand for other control types
261
  processed_video = process_video_for_control(reference_video, control_type, width, height)
262
 
@@ -397,7 +399,7 @@ with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Lexend Deca"),
397
  height = gr.Slider(
398
  label="Height",
399
  minimum=256,
400
- maximum=1024,
401
  step=32,
402
  value=768
403
  )
@@ -411,8 +413,8 @@ with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Lexend Deca"),
411
 
412
  num_inference_steps = gr.Slider(
413
  label="Inference Steps",
414
- minimum=10,
415
- maximum=50,
416
  step=1,
417
  value=7
418
  )
@@ -421,7 +423,7 @@ with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Lexend Deca"),
421
  guidance_scale = gr.Slider(
422
  label="Guidance Scale",
423
  minimum=1.0,
424
- maximum=15.0,
425
  step=0.1,
426
  value=1.0
427
  )
@@ -451,14 +453,13 @@ with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Lexend Deca"),
451
  control_video = gr.Video(
452
  label="Processed Control Video (Canny Edges)",
453
  height=400,
454
- visible=True
455
  )
456
 
457
  gr.Examples(
458
  examples=[
459
  ["video_assets/vid_1.mp4", "video_assets/vid_1_canny.mp4", "A sleek cybernetic wolf sprinting through a neon-lit futuristic cityscape, its metallic form gleaming with electric blue circuits. The wolf's powerful stride carries it down rain-slicked streets between towering skyscrapers, while holographic advertisements cast colorful reflections on its chrome surface. Sparks of digital energy trail behind the creature as it moves with fluid mechanical precision through the urban maze, creating streaks of light in the misty night air.", 3, "worst quality, inconsistent motion, blurry, jittery, distorted", 768, 1152, 7, 1, 0, True, "canny"],
460
- ["video_assets/vid_2.mp4", "video_assets/vid_2_canny.mp4", "A translucent ghost floating in a moonlit cemetery, raising a glowing spectral lantern that casts eerie light through the darkness. The ethereal figure's wispy form shimmers as it lifts the phantom light above its head, illuminating weathered tombstones and gnarled trees. Pale mist swirls around the ghost as the lantern pulses with otherworldly energy, creating haunting shadows that dance across the graveyard in the dead of night.", 2.5, "worst quality, inconsistent motion, blurry, jittery, distorted", 768, 1152, 7, 1, 0, True, "canny"],
461
- ["video_assets/vid_3.mp4", "video_assets/vid_3_canny.mp4","A sleek android assassin poised in a combat stance atop a futuristic skyscraper, arms positioned for perfect balance. The chrome-plated figure gleams under neon city lights as holographic data streams flow around its metallic form. Rain droplets bead on its polished surface while the sprawling cyberpunk metropolis stretches endlessly below. Electric circuits pulse beneath the android's transparent panels as it maintains its precise, calculated pose against the backdrop of flying vehicles and towering digital billboards.", 3, "worst quality, inconsistent motion, blurry, jittery, distorted", 768, 1152, 7, 1, 0, True, "canny"],
462
  ["video_assets/vid_4.mp4", "video_assets/vid_4_canny.mp4", "Luminescent video game characters with glowing outlines and neon-bright details wandering through a digital landscape. Their bodies emit soft, colorful light that pulses gently as they move, creating trails of radiance behind them. The characters have a futuristic, stylized appearance with smooth surfaces that reflect their inner glow. They navigate naturally through their environment, their movements fluid and purposeful, while their bioluminescent features cast dynamic shadows and illuminate the surrounding area. The scene has a cyberpunk aesthetic with the characters' radiant presence serving as the primary light source in an otherwise darkened digital world.", 2.5, "worst quality, inconsistent motion, blurry, jittery, distorted", 768, 1152, 7, 1, 0, True, "canny"],
463
  ],
464
  inputs=[reference_video,
 
256
  if control_video is not None:
257
  # Use the pre-processed canny frames
258
  processed_video = load_video(control_video)
259
+ print("$$$$$$$ control_video is not None ", control_video)
260
  else:
261
+ print("$$$$$$$ control_video is None ", reference_video, width, height)
262
  # Fallback to processing on-demand for other control types
263
  processed_video = process_video_for_control(reference_video, control_type, width, height)
264
 
 
399
  height = gr.Slider(
400
  label="Height",
401
  minimum=256,
402
+ maximum=1536,
403
  step=32,
404
  value=768
405
  )
 
413
 
414
  num_inference_steps = gr.Slider(
415
  label="Inference Steps",
416
+ minimum=5,
417
+ maximum=10,
418
  step=1,
419
  value=7
420
  )
 
423
  guidance_scale = gr.Slider(
424
  label="Guidance Scale",
425
  minimum=1.0,
426
+ maximum=5.0,
427
  step=0.1,
428
  value=1.0
429
  )
 
453
  control_video = gr.Video(
454
  label="Processed Control Video (Canny Edges)",
455
  height=400,
 
456
  )
457
 
458
  gr.Examples(
459
  examples=[
460
  ["video_assets/vid_1.mp4", "video_assets/vid_1_canny.mp4", "A sleek cybernetic wolf sprinting through a neon-lit futuristic cityscape, its metallic form gleaming with electric blue circuits. The wolf's powerful stride carries it down rain-slicked streets between towering skyscrapers, while holographic advertisements cast colorful reflections on its chrome surface. Sparks of digital energy trail behind the creature as it moves with fluid mechanical precision through the urban maze, creating streaks of light in the misty night air.", 3, "worst quality, inconsistent motion, blurry, jittery, distorted", 768, 1152, 7, 1, 0, True, "canny"],
461
+ ["video_assets/vid_2.mp4", "video_assets/vid_2_canny.mp4", "A translucent ghost floating in a moonlit cemetery, raising a glowing spectral lantern that casts eerie light through the darkness. The ethereal figure's wispy form shimmers as it lifts the phantom light above its head, illuminating weathered tombstones and gnarled trees. Pale mist swirls around the ghost as the lantern pulses with otherworldly energy, creating haunting shadows that dance across the graveyard in the dead of night.", 2.5, "worst quality, inconsistent motion, blurry, jittery, distorted", 1152,768, 7, 1, 0, True, "canny"],
462
+ ["video_assets/vid_3.mp4", "video_assets/vid_3_canny.mp4","A sleek android assassin poised in a combat stance atop a futuristic skyscraper, arms positioned for perfect balance. The chrome-plated figure gleams under neon city lights as holographic data streams flow around its metallic form. Rain droplets bead on its polished surface while the sprawling cyberpunk metropolis stretches endlessly below. Electric circuits pulse beneath the android's transparent panels as it maintains its precise, calculated pose against the backdrop of flying vehicles and towering digital billboards.", 3, "worst quality, inconsistent motion, blurry, jittery, distorted", 1152, 768, 7, 1, 0, True, "canny"],
463
  ["video_assets/vid_4.mp4", "video_assets/vid_4_canny.mp4", "Luminescent video game characters with glowing outlines and neon-bright details wandering through a digital landscape. Their bodies emit soft, colorful light that pulses gently as they move, creating trails of radiance behind them. The characters have a futuristic, stylized appearance with smooth surfaces that reflect their inner glow. They navigate naturally through their environment, their movements fluid and purposeful, while their bioluminescent features cast dynamic shadows and illuminate the surrounding area. The scene has a cyberpunk aesthetic with the characters' radiant presence serving as the primary light source in an otherwise darkened digital world.", 2.5, "worst quality, inconsistent motion, blurry, jittery, distorted", 768, 1152, 7, 1, 0, True, "canny"],
464
  ],
465
  inputs=[reference_video,