jbilcke-hf HF Staff commited on
Commit
71a939f
·
verified ·
1 Parent(s): e223df2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -60,7 +60,7 @@ FIXED_FPS = 24
60
  MIN_FRAMES_MODEL = 8
61
  MAX_FRAMES_MODEL = 81
62
 
63
- default_prompt_t2v = "beautiful cinematic footage, a kpop band is dancing on a stage in a nightclub, high quality breakdance, 4K, tiktok video, intricate details, tv broadcast, dynamic camera"
64
  default_negative_prompt = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards, watermark, text, signature"
65
 
66
  def get_duration(prompt, height, width,
@@ -124,7 +124,7 @@ def generate_video(prompt, height, width,
124
  raise gr.Error("Please enter a text prompt. Try to use long and precise descriptions.")
125
 
126
  # Apply limits based on environment variable
127
- if IS_ORIGINAL_SPACE:
128
  height = min(height, LIMITED_MAX_RESOLUTION)
129
  width = min(width, LIMITED_MAX_RESOLUTION)
130
  duration_seconds = min(duration_seconds, LIMITED_MAX_DURATION)
@@ -155,8 +155,8 @@ with gr.Blocks() as demo:
155
  gr.Markdown("This Gradio space is a fork of [wan2-1-fast from multimodalart](https://huggingface.co/spaces/multimodalart/wan2-1-fast), and is powered by the Wan CausVid LoRA [from Kijai](https://huggingface.co/Kijai/WanVideo_comfy/blob/main/Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors).")
156
 
157
  # Add notice for limited spaces
158
- if IS_ORIGINAL_SPACE:
159
- gr.Markdown("This free public demo limits the resolution to 640x640, duration to 2s, and inference steps to 3. For full capabilities please duplicate this space.")
160
 
161
  with gr.Row():
162
  with gr.Column():
@@ -210,7 +210,7 @@ with gr.Blocks() as demo:
210
  ["a field of flowers swaying in the wind, spring morning light", 512, 896],
211
  ]
212
 
213
- if IS_ORIGINAL_SPACE:
214
  # Limit example resolutions for limited spaces
215
  example_configs = [
216
  [example[0], min(example[1], LIMITED_MAX_RESOLUTION), min(example[2], LIMITED_MAX_RESOLUTION)]
 
60
  MIN_FRAMES_MODEL = 8
61
  MAX_FRAMES_MODEL = 81
62
 
63
+ default_prompt_t2v = "cinematic footage, group of pedestrians dancing in the streets of NYC, high quality breakdance, 4K, tiktok video, intricate details, instagram feel, dynamic camera, smooth dance motion, dimly lit, stylish, beautiful faces, smiling, music video"
64
  default_negative_prompt = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards, watermark, text, signature"
65
 
66
  def get_duration(prompt, height, width,
 
124
  raise gr.Error("Please enter a text prompt. Try to use long and precise descriptions.")
125
 
126
  # Apply limits based on environment variable
127
+ if not IS_ORIGINAL_SPACE:
128
  height = min(height, LIMITED_MAX_RESOLUTION)
129
  width = min(width, LIMITED_MAX_RESOLUTION)
130
  duration_seconds = min(duration_seconds, LIMITED_MAX_DURATION)
 
155
  gr.Markdown("This Gradio space is a fork of [wan2-1-fast from multimodalart](https://huggingface.co/spaces/multimodalart/wan2-1-fast), and is powered by the Wan CausVid LoRA [from Kijai](https://huggingface.co/Kijai/WanVideo_comfy/blob/main/Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors).")
156
 
157
  # Add notice for limited spaces
158
+ if not IS_ORIGINAL_SPACE:
159
+ gr.Markdown("⚠️ **This free public demo limits the resolution to 640x640, duration to 2s, and inference steps to 3. For full capabilities please duplicate this space.**")
160
 
161
  with gr.Row():
162
  with gr.Column():
 
210
  ["a field of flowers swaying in the wind, spring morning light", 512, 896],
211
  ]
212
 
213
+ if not IS_ORIGINAL_SPACE:
214
  # Limit example resolutions for limited spaces
215
  example_configs = [
216
  [example[0], min(example[1], LIMITED_MAX_RESOLUTION), min(example[2], LIMITED_MAX_RESOLUTION)]