EditAnything icon indicating copy to clipboard operation
EditAnything copied to clipboard

How to use the trained model by myself?

Open lyc6749 opened this issue 1 year ago • 7 comments

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

lyc6749 avatar Jun 30 '23 07:06 lyc6749

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

gasvn avatar Jun 30 '23 07:06 gasvn

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

lyc6749 avatar Jun 30 '23 08:06 lyc6749

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

maybe only support for sd1.5?

lyc6749 avatar Jun 30 '23 08:06 lyc6749

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.

gasvn avatar Jun 30 '23 09:06 gasvn

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

lyc6749 avatar Jun 30 '23 10:06 lyc6749

image

lyc6749 avatar Jun 30 '23 11:06 lyc6749

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

gasvn avatar Jul 01 '23 07:07 gasvn