pipe = WanVideoPipeline.from_pretrained(
torch_dtype=torch.bfloat16,
device="cuda:7",
model_configs=[
ModelConfig(path="models/Wan-AI/Wan2.2-I2V-4steps-Distill/high_noise_model/wan2.2_i2v_A14b_high_noise_lightx2v_4step.safetensors"),
ModelConfig(path="models/Wan-AI/Wan2.2-I2V-4steps-Distill/low_noise_model/wan2.2_i2v_A14b_low_noise_lightx2v_4step.safetensors"),
ModelConfig(path="models/Wan-AI/Wan2.2-I2V-4steps-Distill/models_t5_umt5-xxl-enc-bf16.pth"),
ModelConfig(path="models/Wan-AI/Wan2.2-I2V-4steps-Distill/Wan2.1_VAE.pth"),
],
tokenizer_config=ModelConfig(path="models/Wan-AI/Wan2.2-I2V-4steps-Distill/google/umt5-xxl"),
)
推理参数:
video_with_lora = pipe(
prompt="...(略)",
negative_prompt="...(略)",
num_inference_steps=4,
input_image=input_image,
seed=0,
tiled=False,
switch_DiT_boundary=0.5,
num_frames = 81,
width=848,
height=1072
)