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

Add support for ckpt models

Open aaronsantiago opened this issue 2 years ago • 4 comments

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

aaronsantiago avatar Oct 22 '22 04:10 aaronsantiago

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.

hafriedlander avatar Oct 25 '22 00:10 hafriedlander

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.

lethargus avatar Nov 07 '22 18:11 lethargus

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.

TheWorldEndsWithUs avatar Nov 09 '22 13:11 TheWorldEndsWithUs

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.

lethargus avatar Nov 09 '22 14:11 lethargus