Replies: 9 comments
-
To be able to help you you'll need to post a reproducible code snippet with the error and also provide a lora model that has this problem, also it would help even more if you also provide the diffusers version and which OS you're using. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
lora download from: |
Beta Was this translation helpful? Give feedback.
-
I see, there's no problem with the lora or your code, so the problem should be with the info you haven't provided like the version of diffusers or your OS. I remember there was some old versions of diffusers where if you put a long prompt it messed up the generation, get rid of that long negative prompt, trust me, for SDXL you don't need it and it could make the generations worse, if you insist in using extremely long prompts you'll need to use some kind of strategy to be able to pass the tokens to the unet, there's a community pipeline that allows the use of long prompts. Also in the code you provided you're just loading the lora but the first post you wrote that you used the fuse_lora, so I don't know which case is the one that you have the error or if it's in both of them. Finally, diffusers recently uses PEFT for loading the loras, I use it so I don't know if it works without it, if you aren't using the latest diffusers version with PEFT I suggest you install them because there's a lot of performance improvements. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, I use win11 operating system, Diffusers 0.26,The same problem will occur whether fuse_lora is used or not. |
Beta Was this translation helpful? Give feedback.
-
To add, setting adapter_name still has the same problem. |
Beta Was this translation helpful? Give feedback.
-
ok, to test the code without peft I used a google collab and it worked, so that's not the problem either, here you can see it: https://colab.research.google.com/drive/1Ue4Mkwd27wCRjOvs3igto0fWO3lEmG87?usp=sharing I only removed the part for image saving. I didn't think that was the problem but maybe what's wrong it's the VAE or the model, you can try manually loading another VAE (https://huggingface.co/madebyollin/sdxl-vae-fp16-fix). You can also try downloading the base model again from hugging face (https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) |
Beta Was this translation helpful? Give feedback.
-
Thank you, I updated the latest nvidia driver and it solved the problem. It seems that the driver is too old and has not been updated for several months. |
Beta Was this translation helpful? Give feedback.
-
Looks like we have an answer here, do you mind ticking one? Thanks to @asomoza for your helpful discussions and guidance. We truly appreciate that ❤️ |
Beta Was this translation helpful? Give feedback.
-
I use the following code to load the lora I trained and the lora downloaded from civitai. The calculated pictures always have noise, as shown in the figure:
pipeline.load_lora_weights("models\lora", weight_name=loadrola01)
pipeline.fuse_lora(lora_scale=1)
Beta Was this translation helpful? Give feedback.
All reactions