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

How to use the trained model by myself? #45

Open
lyc6749 opened this issue Jun 30, 2023 · 7 comments
Open

How to use the trained model by myself? #45

lyc6749 opened this issue Jun 30, 2023 · 7 comments

Comments

@lyc6749
Copy link

lyc6749 commented Jun 30, 2023

I have trained the model using sam_train_sd21.py,please tell me how to use the trained model for inference.

@gasvn
Copy link
Collaborator

gasvn commented Jun 30, 2023

use this to transfer the weights to diffusers style: https://github.com/sail-sg/EditAnything/blob/main/tools/convert_controlnet_to_diffusers.py

@lyc6749
Copy link
Author

lyc6749 commented Jun 30, 2023

when I used the convert model for test, run with editany_test.py,I meet the problem
image

@lyc6749
Copy link
Author

lyc6749 commented Jun 30, 2023

when I used the convert model for test, run with editany_test.py,I meet the problem image

maybe only support for sd1.5?

@gasvn
Copy link
Collaborator

gasvn commented Jun 30, 2023

The default training code is for sd2.1, you need to use sd2.1 base model for your trained controlnet. Or you can train a sd1.5 based version.

@lyc6749
Copy link
Author

lyc6749 commented Jun 30, 2023

I changed the code of editany_test.py , but the error is still appeared.
image

@lyc6749
Copy link
Author

lyc6749 commented Jun 30, 2023

image

@gasvn
Copy link
Collaborator

gasvn commented Jul 1, 2023

I changed the code of editany_test.py , but the error is still appeared. image

Change extra_inpaint=False, for SD2.1, we use the SD-inpaint model, so no extra inpaint model is needed. The extra inpaint model is the controlnet model only suitable for SD1.5

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

No branches or pull requests

2 participants