rahul7star commited on
Commit
0a24268
·
verified ·
1 Parent(s): 06a4902

Update wan2_fast.py

Browse files
Files changed (1) hide show
  1. wan2_fast.py +17 -1
wan2_fast.py CHANGED
@@ -131,7 +131,7 @@ MAX_FRAMES_MODEL = 81
131
  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"
132
  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"
133
 
134
- def get_duration(prompt, height, width,
135
  negative_prompt, duration_seconds,
136
  guidance_scale, steps,
137
  seed, randomize_seed,
@@ -143,6 +143,22 @@ def get_duration(prompt, height, width,
143
  else:
144
  return 60
145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  @spaces.GPU(duration=get_duration)
147
  def generate_video(prompt, height, width,
148
  negative_prompt=default_negative_prompt, duration_seconds = 2,
 
131
  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"
132
  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"
133
 
134
+ def get_durationold(prompt, height, width,
135
  negative_prompt, duration_seconds,
136
  guidance_scale, steps,
137
  seed, randomize_seed,
 
143
  else:
144
  return 60
145
 
146
+
147
+ def get_duration(
148
+ prompt, height, width,
149
+ negative_prompt, duration_seconds,
150
+ guidance_scale, steps,
151
+ seed, randomize_seed,
152
+ progress,
153
+ ):
154
+ duration = int(duration_seconds) * int(steps) * 2.25 + 5
155
+ if compare:
156
+ duration *= 2
157
+ return duration
158
+
159
+
160
+
161
+
162
  @spaces.GPU(duration=get_duration)
163
  def generate_video(prompt, height, width,
164
  negative_prompt=default_negative_prompt, duration_seconds = 2,