cloneofsimo / lora

Using Low-rank adaptation to quickly fine-tune diffusion models.
https://arxiv.org/abs/2106.09685
Apache License 2.0
6.99k stars 481 forks source link

cannot find the function monkeypatch_lora() #257

Open adi-lb-phoenix opened 1 year ago

adi-lb-phoenix commented 1 year ago

as mentioned in this jupyter notebook file https://github.com/cloneofsimo/lora/blob/master/scripts/merge_lora_with_lora.ipynb . rom lora_diffusion import monkeypatch_lora, tune_lora_scale, monkeypatch_add_lora

monkeypatch_lora(pipe.unet, torch.load("../lora_kiriko.pt")) monkeypatch_lora(pipe.text_encoder, torch.load("../lora_kiriko.text_encoder.pt"), target_replace_module=["CLIPAttention"]) tune_lora_scale(pipe.unet, 1.00)

torch.manual_seed(0) image = pipe(prompt, num_inference_steps=30, guidance_scale=7).images[0] image.save("../contents/lora_with_clip.jpg") image # Clearly overfitting. but cannot find the function definition or the declaration .

gogeorge commented 6 months ago

same here