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

What is the correct steps in order to use the scripts in ./config/provisioning/ to have the models available in comfyui? #30

Open
chrislawso opened this issue Sep 15, 2024 · 2 comments

Comments

@chrislawso
Copy link

I setup a copy of your default docker-compose.yml and I ran the script ./config/provisioning/default.sh and refreshed comfyui and rebooted the machine and I do not see any of the script downloaded models available in the comfyui checkpoint selector. I also cannot find to what directory the script downloads the models.

At this moment I was only able to successfully get models using the Manager, Model Manager window in comfyui and then I see these files are located in comfyui/workspace/ComfyUI/models/checkpoints/ and they are available in Load Checkpoint.

What is the correct steps in order to use the scripts in ./config/provisioning/ to have the models available in comfyui?

@robballantyne
Copy link
Member

All are downloaded to /workspace/storage/stable_diffusion/models/ and symlinked to the relevant directories. This allows for setting /workspace/storage as a bind mount to be shared between containers

@chrislawso
Copy link
Author

chrislawso commented Sep 15, 2024

Hi, copying your docker setup the system does not create a directory /workspace/storage/stable_diffusion/models/

I am using the default docker compose config with volumes you set to:

volumes:
      ## Workspace
      - ./workspace:${WORKSPACE:-/workspace/}:rshared
      # You can share /workspace/storage with other non-ComfyUI containers. See README
      #- /path/to/common_storage:${WORKSPACE:-/workspace/}storage/:rshared

      # Will echo to root-owned authorized_keys file;
      # Avoids changing local file owner
      - ./config/authorized_keys:/root/.ssh/authorized_keys_mount
      #- ./config/provisioning/default.sh:/opt/ai-dock/bin/provisioning.sh
      # In-container development
      - ./build/COPY_ROOT_1/opt/ai-dock/api-wrapper:/opt/ai-dock/api-wrapper

Today I ran the script again ./config/provisioning/default.sh and I see this output:

# ./comfyui/config/provisioning/default.sh 
./comfyui/config/provisioning/default.sh: line 82: /opt/ai-dock/etc/environment.sh: No such file or directory
./comfyui/config/provisioning/default.sh: line 83: /opt/ai-dock/bin/venv-set.sh: No such file or directory

##############################################
#                                            #
#          Provisioning container            #
#                                            #
#         This will take some time           #
#                                            #
# Your container will be ready on completion #
#                                            #
##############################################

Updating node: https://github.com/ltdrdata/ComfyUI-Manager...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 25 (delta 17), reused 21 (delta 15), pack-reused 0 (from 0)
Unpacking objects: 100% (25/25), 202.64 KiB | 1.05 MiB/s, done.
From https://github.com/ltdrdata/ComfyUI-Manager
   b690e71..07402c7  main       -> origin/main
Updating b690e71..07402c7
Fast-forward
 custom-node-list.json                |   53 +-
 github-stats.json                    | 3288 ++++++++++++++++++++++++++++++++++++++++----------------------------------------
 node_db/dev/custom-node-list.json    |   20 +
 node_db/dev/extension-node-map.json  |   19 +-
 node_db/dev/github-stats.json        |  557 +++++++-------
 node_db/legacy/custom-node-list.json |   11 +
 node_db/new/custom-node-list.json    |   74 +-
 7 files changed, 2074 insertions(+), 1948 deletions(-)
./comfyui/config/provisioning/default.sh: line 114: micromamba: command not found
Updating node: https://github.com/cubiq/ComfyUI_essentials...
Already up to date.
./comfyui/config/provisioning/default.sh: line 114: micromamba: command not found
Downloading 3 model(s) to /storage/stable_diffusion/models/ckpt...
Downloading: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt

Downloading: https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors

Downloading: https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors

Downloading 8 model(s) to /storage/stable_diffusion/models/controlnet...
Downloading: https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/diffusers_xl_canny_mid.safetensors

Downloading: https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/diffusers_xl_depth_mid.safetensors?download

Downloading: https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/t2i-adapter_diffusers_xl_openpose.safetensors

Downloading: https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_canny-fp16.safetensors

Downloading: https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_depth_fp16.safetensors

Downloading: https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors

Downloading: https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_canny-fp16.safetensors

Downloading: https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_openpose-fp16.safetensors

Downloading 3 model(s) to /storage/stable_diffusion/models/vae...
Downloading: https://huggingface.co/stabilityai/sd-vae-ft-ema-original/resolve/main/vae-ft-ema-560000-ema-pruned.safetensors

Downloading: https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors

Downloading: https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors

Downloading 3 model(s) to /storage/stable_diffusion/models/esrgan...
Downloading: https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth

Downloading: https://huggingface.co/FacehugmanIII/4x_foolhardy_Remacri/resolve/main/4x_foolhardy_Remacri.pth

Downloading: https://huggingface.co/Akumetsu971/SD_Anime_Futuristic_Armor/resolve/main/4x_NMKD-Siax_200k.pth


Provisioning complete:  Web UI will start now



After above I check and I cannot find the download directories

# ls -la comfyui/workspace/
total 32
drwxr-sr-x  7 1000 1000   8 Sep 15 00:03 .
drwxr-xr-x  7 root root  12 Sep 14 23:07 ..
drwxrwsr-x 23 root 1000  49 Sep 14 23:38 ComfyUI
drwxrwsr-x  4 root 1000   4 Sep 14 22:51 environments
drwxrwsr-x  3 root 1000   3 Sep 14 22:51 home
drwxrwsr-x  2 1000 1000   3 Sep 15 00:01 .ipynb_checkpoints
drwxrwsr-x  2 root 1000   3 Sep 14 22:54 storage
-rw-rw-r--  1 1000 1000 907 Sep 15 00:03 Untitled.ipynb
# ls -la comfyui/workspace/storage
total 10
drwxrwsr-x 2 root 1000  3 Sep 14 22:54 .
drwxr-sr-x 7 1000 1000  8 Sep 15 00:03 ..
lrwxrwxrwx 1 1000 1000 19 Sep 14 22:54 README -> /opt/storage/README

I can only find the safetensors models that I downloaded using the comfyui manager which appear in this directory:

#  find  . -name '*.safetensors'
./comfyui/workspace/ComfyUI/models/checkpoints/sd_xl_base_1.0_0.9vae.safetensors
./comfyui/workspace/ComfyUI/models/checkpoints/sd_xl_base_1.0.safetensors
./comfyui/workspace/ComfyUI/models/checkpoints/sd_xl_refiner_1.0_0.9vae.safetensors

I will continue to read your documentation and try to understand your system.
https://github.com/ai-dock/base-image/wiki/3.0-Storage-Volumes
https://github.com/ai-dock/base-image/wiki/4.0-Running-the-Image#provisioning-script

Am I missing something or doing things incorrectly with your default provisioning-script?

Is there only one directory location, ./comfyui/workspace/ComfyUI/models/checkpoints/ that comfyui uses for checkpoint models? Or are there any more directories?

I am thinking to setup another machine wtih nfs or smb network share to store the checkpoint models and perhaps also the comfyui sd saved output images and am trying to understand where or how the network shares should be mounted on the docker host so that your docker environment and comfyui is able to recognize the checkpoint model files location.

Thank you

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

No branches or pull requests

2 participants