arenasys / stable-diffusion-webui-model-toolkit

A Multipurpose toolkit for managing, editing and creating models.
MIT License
508 stars 34 forks source link

[Feature Request] Ability to detect and prune ControlNet checkpoints #19

Closed smolkat64 closed 1 year ago

smolkat64 commented 1 year ago

Hello. First of all I want to say thank you for your work. Your extension saved a lot of space on my hard drive. There is new ControlNet thing (https://github.com/lllyasviel/ControlNet) which uses some SD 1.x like checkpoints with a bit different architecture (https://huggingface.co/lllyasviel/ControlNet/tree/main/models). Your extension loads these models just fine (pic. 1), but removes some important keys when pruning (pic. 2). Can you add an option to not remove unknown keys? And one more request, make your extension to able to load *.pth files too (had to rename their extension to .pt). Thank you.

waterfox_JTd6Rl6mEL

изображение

arenasys commented 1 year ago

added support for ControlNet and .pth in ea85d15c7a0e10b83a6b0530370c4931c5780af7. The extracted ControlNet component is the same as what https://github.com/Mikubill/sd-webui-controlnet/blob/main/extract_controlnet.py produces.

smolkat64 commented 1 year ago

Thank you!