lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
40k stars 5.52k forks source link

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

Open mashb1t opened 1 month ago

mashb1t commented 1 month ago

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

toki-wartooth commented 1 month ago

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.

mashb1t commented 1 month ago

@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.

toki-wartooth commented 1 month ago

@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.

gerroon commented 2 weeks ago

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.