ml-stable-diffusion icon indicating copy to clipboard operation
ml-stable-diffusion copied to clipboard

ControlNet directory too large ...

Open jiangdi0924 opened this issue 2 years ago • 2 comments

The ml-stable-diffusion library now supports ControlNet, which is an excellent addition thanks to the contributors. However, I have noticed that when specifying multiple types using --convert-controlnet, the file size in the ControlNet directory becomes too large (as shown in the attached image). Is there a solution ?

image

jiangdi0924 avatar Apr 24 '23 06:04 jiangdi0924

That appears to be the sizes they need to be. I have tried converting starting from both fp32 and fp16 .bin files and they both produce the same 723.1 result. To pile on further, it appears that you must also convert the models for each output size you want to work with -- a Canny.mlmodelc at 512x512, another Canny.mlmodelc at 768x768, etc. And then there is also original vs split_einsum. FWIW, these models look to be the same size (or double at fp32) for a python diffusers pipeline, but you may not need multiple image size versions there.

jrittvo avatar Apr 24 '23 18:04 jrittvo

That appears to be the sizes they need to be. I have tried converting starting from both fp32 and fp16 .bin files and they both produce the same 723.1 result. To pile on further, it appears that you must also convert the models for each output size you want to work with -- a Canny.mlmodelc at 512x512, another Canny.mlmodelc at 768x768, etc. And then there is also original vs split_einsum. FWIW, these models look to be the same size (or double at fp32) for a python diffusers pipeline, but you may not need multiple image size versions there.

🙂

jiangdi0924 avatar Apr 27 '23 07:04 jiangdi0924