Skip to content
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

Support loading original stable diffusion checkpoints #16

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

rnxyfvls
Copy link

@rnxyfvls rnxyfvls commented Mar 3, 2024

@kjsman
Copy link
Owner

kjsman commented Mar 3, 2024

Thank you for your contribution! Some thoughts:

  • It seems these patches have largely three points:
    • Converting the original SD checkpoint to the model which is compatible to this repository
    • Converting the safetensor model to the compatible model using the first component
    • The minimal demo Python code which "just works" with the given prompt, without using Jupyter Notebook.
  • I like all of them and want to ship them all, but how about separate them and name them clearer? I'm thinking of creating a stable_diffusion_pytorch/convert_from_sdmodel.py (which does same thing with checkpoint_loader.py), safetensor/convert_model.py (convert the safetensor model and saves to somewhere), and safetensor/generate_image.py (convert the safetensor model on-demand and generate image; do the same thing with demo_loadmodel)
  • I think using the official Stable Diffusion v1.5 safetensor model would be better for this general demo. I also like custom models such as Anything :) but I also want to keep things more official and academical in this repository.
  • The checkpoint converting code is written by @treeform I guess? We would need their approval to distribute this code as MIT license.

@rnxyfvls
Copy link
Author

rnxyfvls commented Mar 4, 2024

  • Move conversion code to stable_diffusion_pytorch/convert_from_sdmodel.py: done
  • Change demo to stock SD 1.5 base model: done
  • convert_model.py: done, I have put it in the root directory though as it needs imports from stable_diffusion_pytorch/, and main programs can't import from parent directory
  • Demo program demo_sdmodel_generate_image.py: also in root directory for the above reason
  • Code license: I have asked treeform on issue How are the models in data.zip made? #7 , if I can't get a response from him I will rewrite that part from scratch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants