nateraw / stable-diffusion-videos

Create 🔥 videos with Stable Diffusion by exploring the latent space and morphing between text prompts
Apache License 2.0
4.45k stars 422 forks source link

How to load lora weights using StableVideoDiffusionPipeline? #210

Open OliverLeeXZ opened 3 months ago

OliverLeeXZ commented 3 months ago

How to load lora weights using StableVideoDiffusionPipeline? I using lora_pipeline = StableVideoDiffusionPipeline.from_pretrained( "/home/data/MODEL/stable-diffusion/stable-video-diffusion-img2vid-xt-1-1", torch_dtype=torch.float16, ) lora_pipeline.load_lora_weights("/home/code/Motion-LoRA/LoRA_forward_onepoint/pytorch_lora_weights.safetensors"), and it turns out "AttributeError: 'StableVideoDiffusionPipeline' object has no attribute 'load_lora_weights'"? Could you tell me how to solve it?

nateraw commented 3 months ago

hmm not sure if loading as adapter is supported or not in this codebase. I haven't investigated, but off top of my head what you could do is probably merge the weights and load from that.