Panchovix / stable-diffusion-webui-reForge

GNU Affero General Public License v3.0
351 stars 17 forks source link

[Bug]: Lora loading time #86

Closed scutix closed 3 months ago

scutix commented 3 months ago

Checklist

What happened?

So when using Lora I have very slow time results, but only on first time using it after rendering image without it(like its downloading something, but everything in console is similiar to A1111, so cant really tell) , I've tested on A1111, its loading in 5 seconds, where in Forge, I got an error once but its working after clicking Generate again, in reForge its working on first click but it takes 5 to 20 minutes to load, althrough im never waiting for it to finish, cause after I know it will be long (from est.), I just interrupt and Generate again and it takes time it should take (it was similiar in Forge one time). But yeah, as I said, its only like that for the first time using Lora, after generating once it will work until I dont use same lora, so another Lora will get the slow loading time. Also its sometimes random, cant really figure it out, but sometimes same model will load as it should but another time it will have a slow time. (Also I use filename for Loras, like )

Steps to reproduce the problem

  1. Go to txt2img
  2. Generate image without Lora
  3. Generate image with Lora

What should have happened?

Image should render faster/similiar to A1111 with Lora. (or atleast with an error like in Forge)

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

N/A

Console logs

N/A

Additional information

No response

Panchovix commented 3 months ago

Hi there. I need more info, what branch, sysinfo, console logs and more, since without it I can't help much.

scutix commented 3 months ago

Hi, yes sorry, im using newest main branch, sysinfo-2024-07-30-00-42.json Console Log: https://pastebin.com/EGkF6UAF

scutix commented 3 months ago

Also just wanted to add, it was like that on other commits too, so its likely that its a Forge problem

scutix commented 3 months ago

Maybe I should add that im using sdxl models, the "pony" models to be exact

Panchovix commented 3 months ago

Also just wanted to add, it was like that on other commits too, so its likely that its a Forge problem

That explain some things, if it comes from Forge it may be because of that. I suggest to use the commands suggested there on the console (Hint: your device supports --cuda-malloc for potential speed improvements. Hint: your device supports --cuda-stream for potential speed improvements.)

Not --pin-shared-memory, since with 12GB it will give some issues. Also you can try with --always-gpu.

scutix commented 3 months ago

That explain some things, if it comes from Forge it may be because of that. I suggest to use the commands suggested there on the console (Hint: your device supports --cuda-malloc for potential speed improvements. Hint: your device supports --cuda-stream for potential speed improvements.)

Not --pin-shared-memory, since with 12GB it will give some issues. Also you can try with --always-gpu.

I've tried these 3 now and before in Forge but no difference, or I would even say that its worse but cant really tell I also tried these settings, but didnt help at all: image image so there were no fix for this for Forge, I've found reddit post from like 4/5 months ago, talking about same thing https://www.reddit.com/r/StableDiffusion/comments/1bl7edx/forge_really_slow_using_lora_on_first_generation/

Panchovix commented 3 months ago

Pretty weird bug, if it comes from Forge, then it would happen on main branch as well yeah. Does it happen on dev_upstream branch? That at least has some comfy backend changes related to model management.

scutix commented 3 months ago

Just did a quick test on dev_upstream and there is no problem, it works as it should

Panchovix commented 3 months ago

Nice, thanks for the confirmation! I guess dev_upstream has some model management fixes that OG Forge doesn't have.