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

enable ControlNet mounts for AUTOMATIC1111 #385

Merged
merged 3 commits into from
Apr 4, 2023
Merged

Conversation

gmasil
Copy link
Contributor

@gmasil gmasil commented Apr 2, 2023

The ControlNet addon sd-webui-controlnet requires the data/ControlNet folder to be mounted into models/ControlNet.
This PR enables said mount and adds the ControlNet folder to .gitignore file.

@AbdBarho
Copy link
Owner

AbdBarho commented Apr 3, 2023

could you please also add the folder to

mkdir -vp /data/.cache /data/StableDiffusion /data/Codeformer /data/GFPGAN /data/ESRGAN /data/BSRGAN /data/RealESRGAN /data/SwinIR /data/LDSR /data/ScuNET /data/embeddings /data/VAE /data/Deepdanbooru /data/MiDaS /data/Lora

TBH this huge list is not the nicest solution, maybe we should find something better.

@gmasil
Copy link
Contributor Author

gmasil commented Apr 3, 2023

I added the folder to download.sh.

Why not mount the folders directly into models in docker-compose?

    volumes:
      - "./data:/stable-diffusion-webui/models"

Then we wouldn't have to create those symlinks, or am I missing something here?
(Currently only taking AUTOMATIC1111 into account btw.)

@AbdBarho
Copy link
Owner

AbdBarho commented Apr 3, 2023

Why not mount the folders directly into models in docker-compose?

The folder contains stuff other than models, the entire structure of the auto container was different when this repo was first started half a year ago, and this has just developed organically with time.

Also what you mentioned, there are other apps that need these folders.

I will give this a one final test when I am back home and merge if everything is ok.

@gmasil
Copy link
Contributor Author

gmasil commented Apr 3, 2023

Yes, I see.
Maybe we can loop over all folders in host:data and create symlinks automatically without having to register them.
Surely we had to rename some folders and wouldn't be as flexible as we are right now.
Actually while writing this I see that it is not a trivial problem. I'll come back to you if I find a neat solution :)

@gmasil gmasil mentioned this pull request Apr 3, 2023
@gmasil
Copy link
Contributor Author

gmasil commented Apr 4, 2023

I will give this a one final test when I am back home and merge if everything is ok.

Have you had time to try it out?

@AbdBarho AbdBarho merged commit d2c1e55 into AbdBarho:master Apr 4, 2023
AbdBarho pushed a commit that referenced this pull request Apr 5, 2023
Upon enabling the ControlNet addon from
#385 one
might want to use the `openpose` preprocessors. Those are downloaded by
the addon the first time they are used. Without proper mounts those
networks will be downloaded on usage after each container start.
This PR enables those mounts to reduce data traffic.
Jordan-Lambda pushed a commit to Jordan-Lambda/lambda-cloud-stable-diffusion-2.0-webui-easy that referenced this pull request Aug 2, 2023
The ControlNet addon
[sd-webui-controlnet](https://github.com/Mikubill/sd-webui-controlnet)
requires the `data/ControlNet` folder to be mounted into
`models/ControlNet`.
This PR enables said mount and adds the ControlNet folder to
`.gitignore` file.

---------

Co-authored-by: AbdBarho <ka70911@gmail.com>
Jordan-Lambda pushed a commit to Jordan-Lambda/lambda-cloud-stable-diffusion-2.0-webui-easy that referenced this pull request Aug 2, 2023
Upon enabling the ControlNet addon from
AbdBarho#385 one
might want to use the `openpose` preprocessors. Those are downloaded by
the addon the first time they are used. Without proper mounts those
networks will be downloaded on usage after each container start.
This PR enables those mounts to reduce data traffic.
cloudaxes pushed a commit to cloudaxes/stable-diffusion-webui-docker that referenced this pull request Sep 6, 2023
The ControlNet addon
[sd-webui-controlnet](https://github.com/Mikubill/sd-webui-controlnet)
requires the `data/ControlNet` folder to be mounted into
`models/ControlNet`.
This PR enables said mount and adds the ControlNet folder to
`.gitignore` file.

---------

Co-authored-by: AbdBarho <ka70911@gmail.com>
cloudaxes pushed a commit to cloudaxes/stable-diffusion-webui-docker that referenced this pull request Sep 6, 2023
Upon enabling the ControlNet addon from
AbdBarho#385 one
might want to use the `openpose` preprocessors. Those are downloaded by
the addon the first time they are used. Without proper mounts those
networks will be downloaded on usage after each container start.
This PR enables those mounts to reduce data traffic.
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

Successfully merging this pull request may close these issues.

2 participants