-
Notifications
You must be signed in to change notification settings - Fork 26k
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
Allow users to convert models to Instruct-pix2pix models by supporting merging Instruct-pix2pix models with regular ones in the merge tab #7240
Conversation
…it currently supports inpainting models.
…h a normal model using weighted sum. Also removed bad print message that interfered with merging progress bar.
…t pix2pix". Also changed extension to instrpix2pix at least for now.
…instruct-pix2pix" for newly generated instruct pix2pix models.
@Unstackd Thank you for adding this. I got latest version with your changes merged but am still not able to merge instrcut-pix2pix with a custom model. Note I've used the same method to merge my custom model with an inpaiting one. Am I doing this incorrectly? Thanks in advance! |
The inputs in your screenshot look fine to me as far as I can tell. I know if you put the exact same thing in but with the Anything model as B it should work. One thing that's suspicious: The error message looks consistent with what I think you would get if you had a version of webui that was prior to my merge. Are you sure you're running the most recent version? If you go to modules/extras.py you should see line 192 looking something like:
|
* imported from webui/modules/extras.py AUTOMATIC1111/stable-diffusion-webui@44c46f0 by @AUTOMATIC1111 and AUTOMATIC1111/stable-diffusion-webui#7240 by @Unstackd
* imported from webui/modules/extras.py AUTOMATIC1111/stable-diffusion-webui@44c46f0 by @AUTOMATIC1111 and AUTOMATIC1111/stable-diffusion-webui#7240 by @Unstackd
Describe what this pull request is trying to achieve.
This is a simple change which allows users to merge Instruct pix2pix models with normal models.
It's pretty useful for pix2pix because it lets you use the weighted difference trick to convert other models into InstructPix2Pix models in much the same way you can convert any model into an inpainting model.
So that means you can use pix2pix with other models like AnythingV3 or whatever.
This PR is a result of the conversation here: #7010 (comment)
Additional notes and description of your changes
All I did was replicate the same steps that webui already uses merging inpainting models so that it also works for pix2pix models.
The newly merged model has ".pix2pix" appended to the filename in order to conform with the way inpainting models are named and also to conform with how Klace's new pix2pix extension expects pix2pix models to be named.
Environment this was tested in
List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.
Screenshots or videos of your changes
Not applicable.