怎么也调不出那种效果,帮忙看看是否我代码有问题
model_id = "Wan-AI/Wan2.1-I2V-14B-480P-Diffusers"
image_encoder = CLIPVisionModel.from_pretrained(model_id, subfolder="image_encoder", torch_dtype=torch.float32)
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
pipe = WanImageToVideoPipeline.from_pretrained(model_id, vae=vae, image_encoder=image_encoder, torch_dtype=torch.bfloat16)
Pipe.to("cuda")
Load LoRA
lora_path = "valiantcat/Wan2.1-I2V-Twerk-Lora"
weight_name = "电臀舞1_000003500.safetensors"
adapter_name = "twerk_lora"
pipe.load_lora_weights(lora_path, weight_name=weight_name, adapter_name=adapter_name)
pipe.set_adapters(adapter_name)
fuse for speed
pipe.fuse_lora(adapter_names=[adapter_name], lora_scale=1.0)
image = load_image("22.png")
res = pipe(
image=image,
prompt="The camera quickly zooms out to cover the entire body of the character, who quickly turns around and dances an electric hip dance",
negative_prompt="",
height=832,
width=480,
num_frames=96,
guidance_scale=15.0
)
frames = res.frames[0]
export_to_video(frames, "23_with_lora.mp4", fps=24)
通过调整lora_scale 和 guidance_scale ,但是怎么也调不出样例的效果
num_frames=81
fps=16
cfg=1
需要搭配lightx2vlora一起使用
建议使用KJ版的wan2.1图生视频工作流
用KJ版的wan2.1工作流基本跑出来了,但是还是不够样例里面的性感,感觉quickly zooms out 没有很好的执行,这个是否有办法?
我生成的样例:
这个模型训练的时候素材不太够,后期会重新训练