Fooocus icon indicating copy to clipboard operation
Fooocus copied to clipboard

Moving model to GPU...

Open tiancool opened this issue 1 year ago • 7 comments

Moving model to GPU. Takes a long time before each generation. Is this bug? macOS

tiancool avatar Oct 17 '23 16:10 tiancool

I'm also having this problem.

GLSSJG avatar Oct 23 '23 15:10 GLSSJG

Why do you have to do a memory management load before each generation for 30 seconds or more: [Sampler] refiner_swap_method = joint [Sampler] sigma_min = 0.02916753850877285, sigma_max = 14.614643096923828 Requested to load SDXL Loading 1 new model [Fooocus Model Management] Moving model(s) has taken 31.17 seconds

tiancool avatar Oct 28 '23 15:10 tiancool

same issue on MacOs. Has anyone found a way to shave off those 30 seconds form every generation?

skylerblack2 avatar Nov 24 '23 11:11 skylerblack2

it takes me 30 seconds on windows with a 3060ti, is this normal?

kmastra avatar Dec 07 '23 11:12 kmastra

Just adding my agreement with the comments above. I'm also on MacOS, M1 Macbook pro. It loads the model onto the GPU for a long time before each generation. This problem seems unique to Fooocus vs other sdxl UIs.

timothy-reyes avatar Dec 11 '23 23:12 timothy-reyes

In win 11 doesn't work file swapping, i tried it with an Intel(R) Core(TM) i7-13700H, 16,0 GB RAM and rtx 4050 6GBVRAM

Replikate648 avatar Dec 21 '23 20:12 Replikate648

I'm having the same issue with M1 Max, it moves the model to the GPU on every generation, even with the --disable-offload-from-vram flag. It does seem to be a Fooocus-specific issue as no other UIs have this problem.

labeldot avatar Dec 21 '23 21:12 labeldot

I was playing with, Screenshot 2023-12-31 at 13 15 41 this seems not to load the model every single time, only tested on MacBook Pro 14"

Command

python entry_with_update.py --always-cpu --unet-in-fp8-e5m2 --attention-split

tomekand1 avatar Dec 31 '23 13:12 tomekand1

This is not a bug, your disk is just a bit slow or you're using a GPU with insufficient VRAM, where Fooocus then offloads into RAM. Feel free to re-test with the latest version of Fooocus, which might improve your performance.

mashb1t avatar Dec 31 '23 15:12 mashb1t

@mashb1t - I'm facing the same issue, I have NVIDIA GeForce GTX 1650 Ti Mobile (4Gb of VRAM) could this be because of insufficient memory?

bokorumed avatar Feb 07 '24 13:02 bokorumed

Yes, slow model loading time can also in zhis case have to do with your VRAM being below the minimum to load the complete SDXL model, which is 8GB. Every bit over 4GB will be moved to RAM and if also insufficient then to swap, depending on your OS settings also directly to disk.

mashb1t avatar Feb 07 '24 23:02 mashb1t

I have a 3090 with 24gb vram and have the same issue

DIYMSG avatar Mar 19 '24 16:03 DIYMSG

12GB vram still the same

gautamsolankidev avatar Apr 01 '24 04:04 gautamsolankidev