ovi054 commited on
Commit
ef22e42
·
verified ·
1 Parent(s): ccff5c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -16,7 +16,7 @@ model_id = "Wan-AI/Wan2.1-T2V-1.3B-Diffusers"
16
  vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
17
  pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
18
  flow_shift = 5.0 #5.0 1.0 for image, 5.0 for 720P, 3.0 for 480P
19
- # pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
20
 
21
  # Configure DDIMScheduler with a beta schedule
22
  # pipe.scheduler = DDIMScheduler.from_config(
@@ -30,10 +30,10 @@ flow_shift = 5.0 #5.0 1.0 for image, 5.0 for 720P, 3.0 for 480P
30
 
31
 
32
  # Configure FlowMatchEulerDiscreteScheduler
33
- pipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(
34
- pipe.scheduler.config,
35
- flow_shift=flow_shift # Retain flow_shift for WanPipeline compatibility
36
- )
37
 
38
 
39
  @spaces.GPU()
 
16
  vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
17
  pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
18
  flow_shift = 5.0 #5.0 1.0 for image, 5.0 for 720P, 3.0 for 480P
19
+ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
20
 
21
  # Configure DDIMScheduler with a beta schedule
22
  # pipe.scheduler = DDIMScheduler.from_config(
 
30
 
31
 
32
  # Configure FlowMatchEulerDiscreteScheduler
33
+ # pipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(
34
+ # pipe.scheduler.config,
35
+ # flow_shift=flow_shift # Retain flow_shift for WanPipeline compatibility
36
+ # )
37
 
38
 
39
  @spaces.GPU()