-
Notifications
You must be signed in to change notification settings - Fork 6k
Add controlnet and vae from single file #4084
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
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Looking forward to the merge! Thanks for the PR @patrickvonplaten |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very nice.
Just wondering if it makes sense to make the passing of the checkpoint names a little less verbose. WDYT about the following?
model = ControlNetModel.from_single_file("lllyasviel/ControlNet-v1-1", filename="control_v11p_sd15_canny.pth")
Not too strongly opinionated about it either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!
Thank you to everyone that has been working on this. But I still get this error: "An error occurred during inpainting: type object 'StableDiffusionControlNetInpaintPipeline' has no attribute 'from_single_file" diffusers version: 0.18.2 Is there something else that I need to update? |
@hzhou17 I think you need to install from the branch being used in this PR:
Here's a Colab Notebook that successfully loads the checkpoints from single files into a |
Yes I understand this 100% and thought about it as well - a couple of problems which made me go the current way:
|
Co-authored-by: Sayak Paul <[email protected]>
@patrickvonplaten feel free to merge whenever :) Thanks for explaining #4084 (comment). |
thanks so much |
if controlnet: | ||
controlnet_model = convert_controlnet_checkpoint( | ||
controlnet = convert_controlnet_checkpoint( | ||
checkpoint, original_config, checkpoint_path, image_size, upcast_attention, extract_ema | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iamwavecut#1 this might have introduced a bug @patrickvonplaten
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did indeed haha. Solved as explained in iamwavecut#1
* Add controlnet from single file * Updates * make style * finish * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> --------- Co-authored-by: Sayak Paul <[email protected]>
* Add controlnet from single file * Updates * make style * finish * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> --------- Co-authored-by: Sayak Paul <[email protected]>
* Add controlnet from single file * Updates * make style * finish * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> --------- Co-authored-by: Sayak Paul <[email protected]>
* Add controlnet from single file * Updates * make style * finish * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> --------- Co-authored-by: Sayak Paul <[email protected]>
* Add controlnet from single file * Updates * make style * finish * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> --------- Co-authored-by: Sayak Paul <[email protected]>
What does this PR do?
Working on solving the following issue (+ all the linked ones):
#3907
ControlNet:
StableDiffusionControlnetImg2ImgPipeline
andStableDiffusionControlnetIinpaintPipeline
work fine as wellVAE
Also cc @vladmandic