Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the issue that the generated MP4 file name is not supported under Windows #196

Closed
wants to merge 2 commits into from

Conversation

manzhizhen
Copy link

Fixed the issue that the generated MP4 file name is not supported under Windows:

[2025-03-06 08:41:26,734] INFO: Saving generated video to t2v-1.3B_832480_1_1_Two_anthropomorphic_cats_in_comfy_boxing_gear_and__20250306_084126.mp4
[out#0/mp4 @ 000001bf503857c0] Error opening output E:\t2v-1.3B_832
480_1_1_Two_anthropomorphic_cats_in_comfy_boxing_gear_and__20250306_084126.mp4: Invalid argument
Error opening output file E:\t2v-1.3B_832*480_1_1_Two_anthropomorphic_cats_in_comfy_boxing_gear_and__20250306_084126.mp4.
Error opening output files: Invalid argument
cache_video failed, error: result type Float can't be cast to the desired output type Byte

generate.py Outdated
@@ -384,7 +384,8 @@ def generate(args):
formatted_prompt = args.prompt.replace(" ", "_").replace("/",
"_")[:50]
suffix = '.png' if "t2i" in args.task else '.mp4'
args.save_file = f"{args.task}_{args.size}_{args.ulysses_size}_{args.ring_size}_{formatted_prompt}_{formatted_time}" + suffix
safe_size = args.size.replace("*", "x")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets do this only when windows sys is detected...to be really safe and not break any existing (linux) pipeline.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets do this only when windows sys is detected...to be really safe and not break any existing (linux) pipeline.

Yes, I have revised it again, what do you think?

@hjj-lmx
Copy link

hjj-lmx commented Mar 7, 2025

请问一下,windows上i2v多GPU是怎么运行起来的,我运行就报错
RuntimeError: use_libuv was requested but PyTorch was build without libuv support
这是我的命令
torchrun --nnodes=1 --nproc_per_node=2 generate.py --task i2v-14B --ckpt_dir checkpoints/Wan2.1-I2V-14B-720P --image examples/i2v_input.JPG --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside." --size 1280*720 --ulysses_size 2 --ring_size 1 --offload_model True --t5_cpu True --dit_fsdp True --sample_steps 40 --sample_shift 5.0 --save_file examples/output.mp4

@manzhizhen manzhizhen closed this Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants