ovi054 commited on
Commit
d60c82f
·
verified ·
1 Parent(s): ab613df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,10 +14,11 @@ vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=to
14
  pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
15
  flow_shift = 5.0 # 5.0 for 720P, 3.0 for 480P
16
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
17
- pipe.to("cuda")
18
 
19
  @spaces.GPU()
20
  def generate(prompt):
 
21
  output = pipe(
22
  prompt=prompt,
23
  # negative_prompt=negative_prompt,
 
14
  pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
15
  flow_shift = 5.0 # 5.0 for 720P, 3.0 for 480P
16
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
17
+
18
 
19
  @spaces.GPU()
20
  def generate(prompt):
21
+ pipe.to("cuda")
22
  output = pipe(
23
  prompt=prompt,
24
  # negative_prompt=negative_prompt,