hafriedlander / stable-diffusion-grpcserver

An implementation of a server for the Stability AI Stable Diffusion API
Apache License 2.0
172 stars 23 forks source link

Add support for ckpt models #16

Open aaronsantiago opened 1 year ago

aaronsantiago commented 1 year ago

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:

hafriedlander commented 1 year ago

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.

lethargus commented 1 year ago

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.

TheWorldEndsWithUs commented 1 year ago

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.

lethargus commented 1 year ago

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.