stable-diffusion-grpcserver
stable-diffusion-grpcserver copied to clipboard
Add support for ckpt models
These are increasing in popularity, and alongside the lack of documentation for loading local models (#14) , makes it difficult to use these models. My current workflow is:
- Download the CKPT model
- Convert to diffusers format
- Upload to Huggingface on a new model
- Allow the GRPC server to redownload the uploaded model
You definitely don't need those last two steps - make a folder in the weights folder, create a model in engines.yaml with a local_model: {path inside weights folder}
and has_fp16: False
fields.
But I'll add this to backlog as it shouldn't be too hard.
I would also very much like to see ckpt support added for local models. I've got a few I've trained myself that in pruning to save space I removed state_dict and a few other things that make it impossible to convert to diffuser format now. Running those days of retraining on all the different sets isn't really an option.
How do you convert to diffuser format? Is there an example Yaml of a local model? I tried a few times with the ckpt file and failed miserably.
How do you convert to diffuser format? Is there an example Yaml of a local model? I tried a few times with the ckpt file and failed miserably.
https://github.com/huggingface/diffusers in the scripts directory are conversion scripts. convert_original_stable_diffusion_to_diffusers.py is the one you probably want. But if you've pruned your ckpt it probably doesn't have all the information it needs to run correctly.