-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to transfer controlnet to your own model: Update readme #35
Comments
I think each model for use with this code it has built in SD1.5 + its own weights for features detection, but it ignores its own SD1.5 and uses your modl from get go when you use this repo code... |
use https://github.com/Mikubill/sd-webui-controlnet/blob/main/extract_controlnet.py |
thats grat ill use it and report if it works |
Unless I don' tunderstand it: the script extracts the controlnet from the 5.7 GB files (see https://huggingface.co/lllyasviel/ControlNet/tree/main/models). I guess the resulting files will be quite smaller? Is there any chance that someone who has already downloaded all these models to please upload the extracted results somewhere? Seems like a bit of "waste" for everyone to download 7 * 5.7 GB. |
WORKED !!! Thanks a lot !!! |
i posted how to do it in post above , make bat file and just run it, its easy, im going to extract more, you can do it on your own and it gives you 1.4gb model not 5.6gb modl, so it saves VRAM and loads fast , tested and works. |
Sorry you misunderstood me. I was talking about the extracted models, aka your 1.4 GB files. Since you already did it: any chance you can please upload them anywhere? |
Here you have 3, you want more try to convert with the way i posted , its really very easy |
You have to place the .bat into the directory with extract_controlnet.py and NOT INTO \models\ folder. |
here i uploaded the trimmed models with safetensors format |
Sweet. Thanks a lot |
here's pruned f16 safetensors set - https://huggingface.co/webui/ControlNet-modules-safetensors/tree/main |
Excuse me guys, what is use case of above the models? Just merge our custom models with those? |
No. Just leave your chosen model selected in it's usual location. Load your chosen preprocessor and controlnet model in the drop-down menu |
take off sunglasses |
Excuse me guys, but I think the initial question was how to transfer ControlNet to a custom model (such as Anythingv3, RealisticVision, Deliberate etc.). I found amazing how you extract the weights and reduce the file size, but I would like to know how @Mikubill transferred ControlNet to a model, did he merged SD15Model + ControlNet?... I used this guide to create a |
@paulo-coronado I'm looking for the same thing how can I merge a controlnet model to my custom one, where you able to get that going? |
@deifos Hey brother! You can merge by following this guide. Although, the author is not recommending merging that way anymore, because the results are a little bit different. The recommendation is to use A1111 and its API. If you really need to merge them using the |
Thank man, I was able to merge it but how did you use it, did you load it inside the controlnet/models folder or the stable diffusion models folder because it does not seem to have any effect on my generations. |
I am not sure if you can use it in A1111 (maybe replacing model.load_state_dict(load_state_dict('./models/control_any3_openpose.pth', location='cpu')) |
HI @2blackbar and @paulo-coronado , I tried now to extract but the converted.ckpt model has the same size ocustomtrainedCN.ckpt, which is 8.5GB. Shouldn't this reduce the file size? reported issue here: |
Please, add more detailed tutorial how to transfer controlnet to your own model
The text was updated successfully, but these errors were encountered: