wan2.2-FP8-step4 Distillation Model 4-GPU Parallel Inference Result is Incorrect
https://github.com/user-attachments/assets/72576806-3e60-463b-b65e-6f8815a518b8
The result looks very poor. Here is my code. Does anyone else have this problem?
`
""" Wan2.2 distilled model image-to-video generation example. This example demonstrates how to use LightX2V with Wan2.2 distilled model for I2V generation. """
from lightx2v import LightX2VPipeline import random
Initialize pipeline for Wan2.2 distilled I2V task
For wan2.1, use model_cls="wan2.1_distill"
pipe = LightX2VPipeline( model_path="/checkpoints/Wan2.2-I2V-A14B", model_cls="wan2.2_moe_distill", task="i2v", low_noise_original_ckpt="/checkpoints/Wan2.2-Distill-Models/wan2.2_i2v_A14b_low_noise_lightx2v_4step.safetensors", high_noise_original_ckpt="/checkpoints/Wan2.2-Distill-Models/wan2.2_i2v_A14b_high_noise_lightx2v_4step_1030.safetensors", )
Enable offloading to significantly reduce VRAM usage
Suitable for RTX 30/40/50 consumer GPUs
pipe.enable_offload( cpu_offload=True, offload_granularity="block", text_encoder_offload=True, image_encoder_offload=False, vae_offload=False, )
pipe.enable_parallel( seq_p_size=4, # Sequence parallel size seq_p_attn_type="ulysses", # Sequence parallel attention type )
Create generator manually with specified parameters
pipe.create_generator( attn_mode="sage_attn2", infer_steps=4, height=480, # Can be set to 720 for higher resolution width=832, # Can be set to 1280 for higher resolution num_frames=81, guidance_scale=1, sample_shift=5.0, )
seed = random.randint(1, 1000)
prompt = "海报设计,大标题福山樱桃红反诈在行动,标题位于图片上方中间区域。标题使用粗壮的无衬线字体,呈现从白色到科技蓝的渐变色,带有轻微的金属质感边缘和醒目的科技蓝光晕效果。海报中央是一个充满科技感的动态全息盾牌,盾牌表面有流动的蓝色数据流和网络安全锁图标环绕。背景是深蓝色的抽象科技网格和流动的光纤。整体色调为蓝色与深蓝色。风格是现代、专业、具有网络安全感的商业海报,高质量的平面设计,细节精致,动态光效。" negative_prompt = "镜头晃动,色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" image_path = "/data/su/LightX2V/input/1.png" save_result_path = f"/data/su/LightX2V/input/output_4_step_loras_{seed}.mp4"
pipe.generate( seed=seed, image_path=image_path, prompt=prompt, negative_prompt=negative_prompt, save_result_path=save_result_path, )
Execute the command
torchrun --nproc_per_node=4 wan_i2v_distilled.py
`