lllyasviel / Fooocus

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

[Feature Request]: hash generation #3161

Open kalle07 opened 2 weeks ago

kalle07 commented 2 weeks ago

Is there an existing issue for this?

What would your feature do?

Is there an intention to "pimp" hash generation with multiprocessing/filesplitting? or an option generate hash from all files

Proposed workflow

...

Additional information

No response

mashb1t commented 2 weeks ago

Hashes are generated only once per model and only once for each start of the application. Currently there is no need, at least no issues are known. Do you encounter any difficulties?

kalle07 commented 2 weeks ago

no difficulties but need time ,so maybe it give some moves ;)

i mean only an option generate hash from all files at once (so i can go trink a cup of coffee)

mashb1t commented 2 weeks ago

That's a relatively easy task in python, so if you are familiar feel free to add a lazy loading for a new method call for each of the models and LoRAs, calculate the hash and write it to a file. If it already exists, then load hashes from that file. This way we can prevent recalculating the hashes each time after Fooocus restart, so it could benefit everyone. I'd estimate about 2 hours for the implementation. Do you want to take over the implenentation of this feature?

kalle07 commented 2 weeks ago

oh no sry iam not a programmer : D

but this option (if i have 20 models in the folder no one with hash) calc hash from all models, i saw somewhere, ithnk that can be easy implemented....

mashb1t commented 3 days ago

@kalle07 done, check out https://github.com/lllyasviel/Fooocus/pull/3221.