Skip to content

Commit

Permalink
update wan example
Browse files Browse the repository at this point in the history
  • Loading branch information
richagadgil committed Mar 6, 2025
1 parent 17a35c3 commit 1144c6c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Binary file added examples/dynamo/wan/output.mp4
Binary file not shown.
5 changes: 5 additions & 0 deletions examples/dynamo/wan/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
transformers
accelerate
git+https://github.com/huggingface/diffusers.git
ftfy
imageio-ffmpeg
6 changes: 4 additions & 2 deletions examples/dynamo/wan/wan.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
def run(args):
from diffusers import FlowMatchEulerDiscreteScheduler, UniPCMultistepScheduler, WanPipeline
from diffusers.utils import export_to_video
# pip install git+https://github.com/huggingface/diffusers.git
# pip install ftfy

#scheduler_a = FlowMatchEulerDiscreteScheduler(shift=5.0)
#scheduler_b = UniPCMultistepScheduler(prediction_type="flow_prediction", use_flow_sigmas=True, flow_shift=4.0)
Expand All @@ -26,8 +24,11 @@ def run(args):

pipe = pipe.to("cuda")

print("compile encoder")
pipe.text_encoder = torch.compile(pipe.text_encoder, backend='migraphx')
print("compile transaformer")
pipe.transformer = torch.compile(pipe.transformer, backend='migraphx')
print("compile vae")
pipe.vae.decoder = torch.compile(pipe.vae.decoder, backend='migraphx')

prompt = "A cat walks on the grass, realistic"
Expand All @@ -41,6 +42,7 @@ def run(args):
num_frames=81,
guidance_scale=5.0,
).frames[0]

export_to_video(output, "output.mp4", fps=15)


Expand Down

0 comments on commit 1144c6c

Please sign in to comment.