KohakuBlueleaf / a1111-sd-webui-lycoris

An extension for stable-diffusion-webui to load lycoris models.
Apache License 2.0
861 stars 116 forks source link

Model stays active even after removing it from prompt #19

Closed FNSpd closed 1 year ago

FNSpd commented 1 year ago

Basically, what the title says. Try to add model to the prompt, generate picture, remove lyco part, and model will still have effect on image

poko3347 commented 1 year ago

This issue occurs frequently.

KohakuBlueleaf commented 1 year ago

@FNSpd @poko3347 I also cannot totally avoid this issue But I have test lot of pattern (like 2 lyco -> 1 lyco -> 2lyco -> 0 lyco) and it should be resolved Can you two let me know which commit you are using? (the sd-webui commit) Or you guys are using vladmandic's automatic?

I-ShadowStar commented 1 year ago

Came here to look for troubleshooting and this happened to me recently. I am using the UX fork. https://github.com/anapnoe/stable-diffusion-webui-ux

FNSpd commented 1 year ago

@FNSpd @poko3347 I also cannot totally avoid this issue But I have test lot of pattern (like 2 lyco -> 1 lyco -> 2lyco -> 0 lyco) and it should be resolved Can you two let me know which commit you are using? (the sd-webui commit) Or you guys are using vladmandic's automatic?

I'm using latest commit for both A1111 and extension

RayHell commented 1 year ago

Same issue for me I'm on the latest auto1111 seems to happen when you mix Lycoris and Lora

BigBlueGX commented 1 year ago

Happens to me as well. It's a common issue with the Loras that I train. Switching checkpoint models resolves this

KohakuBlueleaf commented 1 year ago

Yeah it is a issue in the weight backup mechanism But I cannot find which part goes wrong...

FNSpd commented 1 year ago

Using standart LoRA without LyCORIS seems to "flush out" weights. Maybe this will help find solution

antis0007 commented 1 year ago

Bumping this issue, will search for a solution in the code since this is still driving me crazy. Issue occurs when using lyco and lora at once in a prompt. Changing the prompt seems to have no effect and even after removing all loras or lycos, the lycoris remains loaded. This is a pretty significant issue because I can only fix it with a ui restart, and my gens will degrade under the same settings until I start to notice the glitchyness in the outputs. I made a character lyco that works great, I just cant use it with any other loras and its unfortunate.

KohakuBlueleaf commented 1 year ago

@antis0007 I tried lot of pattern and still cannot reproduce this bug in my setup. and I have tried on a entirely fresh installed sd-webui.

If you want a once and for all solution. You just need to move all your lora/lycoris file into LyCORIS folder. and then turn off the built-in lora extension.

I am very sure this way you can avoid this kind of problem. I am also very sure that all the LoRAs that you can use in built-in lora, can use on my extesnion.

magicFeirl commented 1 year ago

@antis0007 I tried lot of pattern and still cannot reproduce this bug in my setup. and I have tried on a entirely fresh installed sd-webui.

If you want a once and for all solution. You just need to move all your lora/lycoris file into LyCORIS folder. and then turn off the built-in lora extension.

I am very sure this way you can avoid this kind of problem. I am also very sure that all the LoRAs that you can use in built-in lora, can use on my extesnion.

I turn off the built-in lora extension and some of my other extensions doesn't work anymore (also can't gen any image). The error is: ModuleNotFoundError: No module named 'lora'

Error extensions: stable-diffusion-webui-composable-lora sd-webui-regional-prompter stable-diffusion-webui-composable-lora ...

It seems like some extensions depend on the built-in lora, so we may can't simply turn off the built-in lora...

KohakuBlueleaf commented 1 year ago

These extensions all hijack the built-in lora (just like what I have done with locon ext, and this will easily cause lot of error or hazard)

So yes, if you want to use other ext related to lora, you may not able to just turn it off.

rehvka commented 1 year ago

well, I just updated auto1111 and now I face this issue too. I went back to the locon extension for a bit, since using lycoris keep frying my images :(

KohakuBlueleaf commented 1 year ago

@rehvka Can you help me to check one thing? I think there is an option like this: image

do you have this enabled? or not?

KohakuBlueleaf commented 1 year ago

I'm searching on a more robust way to do weight apply/restore but I think my original way should be ok

KohakuBlueleaf commented 1 year ago

@FNSpd @poko3347 @RayHell @BigBlueGX @antis0007 I push a possible fix for this I found a "maybe a bug" in my implementation please help me to check if this is resolved

KohakuBlueleaf commented 1 year ago

Wait, here is still some bugs but I have idea for them

rehvka commented 1 year ago

@rehvka Can you help me to check one thing? I think there is an option like this: image

do you have this enabled? or not?

I have it UNCHECKED, I did not even know this existed till you mentioned it :). I just saw you updated the extension, gonna try it and report results, Keep up the good work

rehvka commented 1 year ago

Ok, I am back, problem is still there.

KohakuBlueleaf commented 1 year ago

@FNSpd @poko3347 @RayHell @BigBlueGX @antis0007 @rehvka Finally I fixed it image image

KohakuBlueleaf commented 1 year ago

@rehvka please check it again I have pushed a fix few sec before

rehvka commented 1 year ago

okay, I did some testing! For the most part the issue seems to be gone! thank you so much! BUT.. I found a weird interaction when using 1 lora + 1 loha (through lycoris folder). If the lycoris is first, no problem at all but if you put lora first and lycoris second, it might fried the image. I didnt do a lot of testing cuz its late so this issue might be the interaction between those two loras or the model or both. But the original issue I think it is solved on my side. thank you @KohakuBlueleaf

KohakuBlueleaf commented 1 year ago

@rehvka your "lora" is through or ?

rehvka commented 1 year ago

I dont think I understand. you mean if my lora went through? yes, it worked.

KohakuBlueleaf commented 1 year ago

I dont think I understand. you mean if my lora went through? yes, it worked.

Sorry that I forgot github hate \< and >

I mean:

your "lora" is through \<lora> or \<lyco> ?

rehvka commented 1 year ago

oh, I see, so.. if I use lets say + it might "burn" my images after several generations, but if I use + , everything is fine.

KohakuBlueleaf commented 1 year ago

@rehvka I think that is caused by other extension relate to lora or something like that Since I really cannot reproduce this bug

rehvka commented 1 year ago

yeah, it is a weird interaction, I wouldnt worry too much about it, thank you for the fix!

KohakuBlueleaf commented 1 year ago

Since this issue is been resolved. I will close this issue. If there still any problem, just open new issue.