-
Notifications
You must be signed in to change notification settings - Fork 48
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
Question Regarding Multi Control #18
Comments
Should I do this? |
It doesn't matter which one you use as the base model. If you take pipe_control_depth as base, then just take out the control module from pipe_control_openpose, and add it to pipe_control_depth as a new module. Note that we need to modify the forward function in pipeline. Just same as single control pipeline, we add control weights and second control hint as extra input params. |
I am facing an issue in loading the other controlnet in the pipeline. Can you tell me how to do it? |
This worked.
|
So I was able to get multi control net working in mine. Here is how i did it. First I copied the unet from inpainting model and replaced the unet of control_sd15_depth model with it and called the new folder control_sd15_depth_inpaint. Then I updated the current file "pipeline_stable_diffusion_controlnet_inpaint.py" to take in two control inputs and their weights. After that I added controlnet2 to the pipe_control and set weights for the controls. It is now working.
|
@haofanwang you can test it out and if it works, can add it to the repo. Sorry I didn't make a PR. I do not know how, and i felt it is better to share first so that others can give it a go as well. |
Nice job! |
@haofanwang I sent you a mail regarding the composer repo from DAMO and modelscope where the files already seem to exist. Given that I do not know Chinese I couldnt understand anything other than the fact that the code does exist there. Can you check it out and see if it is working and all files are there? If so we can make a unofficial repo of the paper and work on integrating it with diffusers. I think you can check out : https://www.modelscope.cn/models/damo/cv_composer_multi-modal-image-synthesis/files |
@haofanwang The code above for multi control net is incorrect. I reazlied that i never called the second controlnet. I deleted it. |
This on the other hand works:
|
The way I checked it is, I kept all the inputs constant and tried with controlhint_1 keeping controlhint_2 empty and vice versa. I got different images both times. Therefore, My understanding was that I was able to get multi control working correctly. |
Did you develop it based on controlnet:https://github.com/lllyasviel/ControlNet.git? |
Hello, I would like to ask about the use of this repo for multi-control. Do I directly use two control_xx_net.pth files and merge the results during inference? No need to do training? |
@haofanwang
There are two pipelines, one for depth and one for openpose, lets call them pipe_control_depth, pipe_control_openpose.
Which pipeline should be used for generating the output? What does the input for the pipeline look like? Should the pipeline load both the models? Not sure how it works.
The text was updated successfully, but these errors were encountered: