Fooocus icon indicating copy to clipboard operation
Fooocus copied to clipboard

[Feature Request]: pre-download all models and LoRAs

Open mashb1t opened this issue 1 year ago • 5 comments

Great update! i was wondering is it possible somehow to pre-download all required models and possible additional repos beforehand? now it will download each feature only during usage, like inpaint models while using inpainting or upscalers. it would be extremely useful if i could preload everything for example on machine with good internet and low specs and move all this glory to the machine where i will be running fooocus. something like --preload-all-features would be a life saver.

Originally posted by @toki-wartooth in https://github.com/lllyasviel/Fooocus/discussions/3293#discussioncomment-10089046

mashb1t avatar Jul 18 '24 21:07 mashb1t

made very simple script that trys to download all required models. https://gist.github.com/toki-wartooth/600a656e3c825fd00657aba8f933b65e

it will probably fail if there is many requests to huggingface but if restarted will try to continue to download.

toki-wartooth avatar Jul 19 '24 20:07 toki-wartooth

@toki-wartooth i've edited your comment and fixed the URL. Noticed that Juggernaut, the default model, is not added. Is this by intention? Same for SAM, vit_b is default, vit_h is loaded in your script.

mashb1t avatar Jul 19 '24 20:07 mashb1t

@mashb1t For some reason i missed Juggernaut, adding now. About SAM i found only this files - sam_vit_b_01ec64.pth sam_vit_l_0b3195.pth sam_vit_h_4b8939.pth , they are added. Cant find more sam links.

toki-wartooth avatar Jul 19 '24 21:07 toki-wartooth

Thanks for the script. Which folder do I run this from?

made very simple script that trys to download all required models. https://gist.github.com/toki-wartooth/600a656e3c825fd00657aba8f933b65e

it will probably fail if there is many requests to huggingface but if restarted will try to continue to download.

gerroon avatar Aug 20 '24 01:08 gerroon

Hello, any idea? i've got this error.

trying to download models... Downloading juggernautXL_v8Rundiffusion.safetensors to ./Fooocus/models/checkpoints/juggernautXL_v8Rundiffusion.safetensors... Traceback (most recent call last): File "C:\Fooocus_win64\download_all_fooocus_models.py", line 339, in download_models(main_checkpoints) File "C:\Fooocus_win64\download_all_fooocus_models.py", line 328, in download_models subprocess.run(['wget', '-O', out_path, url_fin]) File "subprocess.py", line 503, in run File "subprocess.py", line 971, in init File "subprocess.py", line 1440, in _execute_child FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable

soloviento avatar Feb 28 '25 10:02 soloviento