Skip to content

Commit 9bfacc4

Browse files
authored
Apply suggestions from code review
1 parent 86f94d6 commit 9bfacc4

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/diffusers/pipelines/wan/pipeline_wan.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,9 @@
5252
>>> # Available models: Wan-AI/Wan2.1-T2V-14B-Diffusers, Wan-AI/Wan2.1-T2V-1.3B-Diffusers
5353
>>> model_id = "Wan-AI/Wan2.1-T2V-14B-Diffusers"
5454
>>> vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
55-
>>> flow_shift = 5.0 # 5.0 for 720P, 3.0 for 480P
56-
>>> scheduler = UniPCMultistepScheduler(
57-
... prediction_type="flow_prediction",
58-
... use_flow_sigmas=True,
59-
... num_train_timesteps=1000,
60-
... flow_shift=flow_shift,
61-
... )
6255
>>> pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
63-
>>> pipe.scheduler = scheduler
56+
>>> flow_shift = 5.0 # 5.0 for 720P, 3.0 for 480P
57+
>>> pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
6458
>>> pipe.to("cuda")
6559
6660
>>> prompt = "A cat and a dog baking a cake together in a kitchen. The cat is carefully measuring flour, while the dog is stirring the batter with a wooden spoon. The kitchen is cozy, with sunlight streaming through the window."

0 commit comments

Comments
 (0)