Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] Comfyui (Nvidia) Docker

Featured Replies

  • Author
12 minutes ago, DeusVault said:

Thank you for this work. It has been much quicker then running on my desktop. I have however run into a little snag.

 

I have limited authority to my comfyui. I cannot drag in models/loras/checkpoints. I put them in the appropriate folders, and they are not recognized or seen. I also do not have access to install them from git. I tried installing xlabs nodes from the manager and I I see it in the logs fails due to the security_level = strong. I do not understand how to change it. I read through the github and this thread. I understand I should have had a file named custom_nodes/ComfyUI-Manager/config.ini. I do not see it in that location. I have reached the limit of my technical ability. Please help. Thank you in advance.

 

 

Did you just install it by any chance?

 

You will need to install it, let it run the first time so it installs all the required components, and when it is done, it will change the security settings.

Once the initial configuration is done, you have to stop and start it again; the security settings should have been changed then.

 

  • Replies 173
  • Views 91.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Hi, i update my frontend with the the command comfyui shows you when you start the container with an old frontend. You find the command in the container protocol. In my case the command is /comfy/mnt/

  • Example runs

  • Hello, I have submitted to CA about a week ago. I understand the team has to do a review before allowing new content, so I hope it will be released shortly.   The wrapper code is public

Posted Images

  • Author

Additional question: are you running it using Docker directly or in Unraid? The fact that you say that you put the files in the correct folder makes me wonder if there is an issue with this step. In general when using Comfy you would need to reload the UI (press r in the WebUI) for newly added files to be recognized by the current workflow

I have restarted it at least 20 times. I have several installs of comfyui and have been using it for about 6 months, sad to say I am still new. Is there a way to manually set the security level? There is a possibility I screwed it up by trying to install my own custom nodes by pulling them into my nodes folder like I do with my other instances not in a docker.

5 minutes ago, martial said:

Additional question: are you running it using Docker directly or in Unraid? The fact that you say that you put the files in the correct folder makes me wonder if there is an issue with this step. In general when using Comfy you would need to reload the UI (press r in the WebUI) for newly added files to be recognized by the current workflow

Unraid docker instance. I use my pc to file manage. I reload the ui with every change purely out of habit.

  • Author

Thanks for those details.

In doubt, I would try to reinstall the "run" directory.

First, stop the Docker image.

In a shell prompt (if you used the defaults for directory this ought to work):

 

cd /mnt/user/appdata/comfyui-nvidia

mv mnt mnt.off

 

this will remove the "run" directory

When you restart the container, the content should be generated anew

 

The "mnt" should be owned by nobody / users unless you changed the UID/GID to match any user you would copy data into the folder

any models you copied will not have to be re-downloaded as they should be in the corresponding directory in mnt.off

 

If you manually installed custom nodes (not using Comfy Manager), I wonder if the error is a side effect of the file ownership

 

After you restart, does that change the settings?

If not, can you share the entire logs for me to take a longer look?

 

Hoping this helps

 

 

Edited by martial
expanded on older models location

  • Author

The default directory structure should be as follow within mnt (ignore dates or file size)

drwxr-xr-x 1 nobody users 972 Jan  7 02:04 ComfyUI/
drwxr-xr-x 1 nobody users   6 Aug 24 18:45 HF/
drwxr-xr-x 1 nobody users  66 Aug 24 18:42 venv/

 

the settings file should be ComfyUI/custom_nodes/ComfyUI-Manager

 

Did you say the settings.ini was set to "strong"?

This is a new value, it used to be "strict" or "high".

I need to update the bash script it appears to replace it to "weak"

(details at https://github.com/mmartial/ComfyUI-Nvidia-Docker/blob/main/init.bash#L175 )

 

For the time being, can you manually edit the file and make the change (as listed above)?

 

More details on this at https://github.com/ltdrdata/ComfyUI-Manager?tab=readme-ov-file#security-policy

 

I will attempt to fix this in the coming days (a new release)

Please let me know if this helps you in the meanwhile.

 

Thank you for reporting the issue.

 

Edited by martial

59 minutes ago, martial said:

Thanks for those details.

In doubt, I would try to reinstall the "run" directory.

First, stop the Docker image.

In a shell prompt (if you used the defaults for directory this ought to work):

 

cd /mnt/user/appdata/comfyui-nvidia

mv mnt mnt.off

 

this will remove the "run" directory

When you restart the container, the content should be generated anew

 

The "mnt" should be owned by nobody / users unless you changed the UID/GID to match any user you would copy data into the folder

any models you copied will not have to be re-downloaded as they should be in the corresponding directory in mnt.off

 

If you manually installed custom nodes (not using Comfy Manager), I wonder if the error is a side effect of the file ownership

 

After you restart, does that change the settings?

If not, can you share the entire logs for me to take a longer look?

 

Hoping this helps

 

 

 

log.1.7.2025 I did that and it did not clear up the issue. So I decided to reinstall, to try to reproduce. I think the problem lies in a change they have done to comfyui itself.

It Looks and reads like the same issue.... https://github.com/ltdrdata/ComfyUI-Manager/issues/1049

 

Edited by DeusVault

  • Author
8 hours ago, DeusVault said:

 

log.1.7.2025 I did that and it did not clear up the issue. So I decided to reinstall, to try to reproduce. I think the problem lies in a change they have done to comfyui itself.

It Looks and reads like the same issue.... https://github.com/ltdrdata/ComfyUI-Manager/issues/1049

 

I will try reproducing it with a clean install and let you know when a fixed version is available.

 

I hope that for the time being, manually editing /mnt/user/appdata/comfyui-nvidia/mnt/ComfyUI/custom_nodes/ComfyUI-Manager/config.ini to replace the "security_level = " to use "weak" will solve your current problems.

3 minutes ago, martial said:

I will try reproducing it with a clean install and let you know when a fixed version is available.

 

I hope that for the time being, manually editing /mnt/user/appdata/comfyui-nvidia/mnt/ComfyUI/custom_nodes/ComfyUI-Manager/config.ini to replace the "security_level = " to use "weak" will solve your current problems.

Thank you for all of the help.

  • Author

Figured it out, they moved the config.ini file to be a user configuration.

 

I will make a new release as soon as I can, but for the time being please create this "user_script.bash" in /mnt/user/appdata/comfyui-nvidia/mnt and make sure it is owned by the same user as the mnt directory itself.

 

EDIT: created a GitHub issue for the time being https://github.com/mmartial/ComfyUI-Nvidia-Docker/issues/4#issue-2775729552

 

user_script.bash

Edited by martial
added GH issue

  • Author
On 1/7/2025 at 11:56 PM, DeusVault said:

 

log.1.7.2025 I did that and it did not clear up the issue. So I decided to reinstall, to try to reproduce. I think the problem lies in a change they have done to comfyui itself.

It Looks and reads like the same issue.... https://github.com/ltdrdata/ComfyUI-Manager/issues/1049

 

FYSA, I looked at your error log, and you must have a custom node that uses libGL, which is not installed by default in the container.

Can you take a look at https://github.com/mmartial/ComfyUI-Nvidia-Docker?tab=readme-ov-file#532-comfy_cmdline_base-and-comfy_cmdline_xtra where I have included a user_script.bash script that installs the missing package.

 

4 hours ago, martial said:

FYSA, I looked at your error log, and you must have a custom node that uses libGL, which is not installed by default in the container.

Can you take a look at https://github.com/mmartial/ComfyUI-Nvidia-Docker?tab=readme-ov-file#532-comfy_cmdline_base-and-comfy_cmdline_xtra where I have included a user_script.bash script that installs the missing package.

 

Both getting the user_script.bash creation and placing it in the run folder from either Unraid terminal or the proper docker console is beyond my capability. As I stated I have been using my windows machines file explorer to do any file manipulation. I would appreciate it if you (or anyone else reading this) could walk me through the operation step by step. Sorry for the burden.

  • Author
2 hours ago, DeusVault said:

Both getting the user_script.bash creation and placing it in the run folder from either Unraid terminal or the proper docker console is beyond my capability. As I stated I have been using my windows machines file explorer to do any file manipulation. I would appreciate it if you (or anyone else reading this) could walk me through the operation step by step. Sorry for the burden.

No worries. I am more comfortable with a terminal than a UI, but I will attempt to help.

You are going to need the user_script.bash attached to this reply. It contains a slightly modified version of both independent scripts (you can open it with a text editor if you prefer to verify its content).

 

From your Windows file manager, copy the file into a share on your unraid server.

If you have shared the "appdata" directory, you can place it in "appdata/comfyui-nvidia/mnt"

If you have a different share, it is a matter of knowing which one. Usually, those would be in /mnt/user on Unraid. For example, a "Media" share is likely in "/mnt/user/Media"

 

Once the file is uploaded to the Unraid server, we will need a terminal to place it in the final destination and change its permissions.

On your unraid dashboard, the terminal is accessed using the ">_" symbol in the top right of your browser window (see the red circled icon in the "Preliminary Docker Setup" section of my Unraid post at https://blg.gkr.one/20241022-unraid/#128c678a0f698006ad92d61df8e70cb4 )

 

Once you have the terminal, we will type a few Linux commands (those are consecutive from one another):

 

- let's go to the directory where we will put the user_script.bash file

cd /mnt/user/appdata

cd comfyui-nvidia/mnt

 

- copy the file from the share into that directory (here I will use Media as the share and consider you placed the file in the base of that share):

cp /mnt/user/Media/user_script.bash .

 

- verify the file is present (you will see a list of the directory content)

ls 

we should see something similar to

ComfyUI/  HF/  user_script.bash  venv/

the important part is that we see user_script.bash

 

- change the permissions on the file so it is owned by the id/gid you set in the WANTED_UID and WANTED_GID of the application template (here we will assume the default of 99:100 

chown 99:100 user_script.bash

where 99 is the nobody user and 100 is the users group

 

- now if we check again, we see the file is owned by that user and group

ls -al

should return something similar to 

drwxr-xr-x 1 nobody users 972 Jan  9 02:04 ComfyUI/
drwxr-xr-x 1 nobody users   6 Aug 24 18:45 HF/
-rwxrwxrwx 1 nobody users 473 Sep 11 22:15 user_script.bash
drwxr-xr-x 1 nobody users  66 Aug 24 18:42 venv/

 

You are done and should be able to restart the Docker container from the Docker page on unraid

 

Hopefully, this helps

 

 

 

user_script.bash

  • Author

I will also note that I am likely going to release a new version shortly that will 1) fix the security_level issue (ie we will not need this script anymore) 2) will allow the end user to set the security level from the application template (ie it will be a variable in the future Unraid version) [might have to delete and reinstall for it to show up] 3) will install libgl1 because you are not the first person to report it needed by one of their custom nodes (ie here too remove the need for this script).

Edited by martial

35 minutes ago, martial said:

I will also note that I am likely going to release a new version shortly that will 1) fix the security_level issue (ie we will not need this script anymore) 2) will allow the end user to set the security level from the application template (ie it will be a variable in the future Unraid version) [might have to delete and reinstall for it to show up] 3) will install libgl1 because you are not the first person to report it needed by one of their custom nodes (ie here too remove the need for this script).

I am eagerly anticipating your new upload. Regardless of having to reinstall comfyui from scratch or not is no bother. What you have done for me in your post above I will enjoy as practice and do not mind having to do it over again if necessary. I have all of my models and workflows backed up and set up is generally easy to do. Thank you for all of your assistance and patience. 

On another note YOUR BLOG IS AMAZING! What a wealth of knowledge. This comfyui instance is exactly for the use case you have linked. I am blown away. I have book marked it. Do you have a Patreon or anything so I may show my appreciation?

 

Edit...

Here are my logs. It appears as the libGL did not install from the user script. I may wipe all and try again.

Screenshot 2025-01-09 155017.png

Screenshot 2025-01-09 155207.png

comfyui.log

Edited by DeusVault

  • Author
1 hour ago, DeusVault said:

I am eagerly anticipating your new upload. Regardless of having to reinstall comfyui from scratch or not is no bother. What you have done for me in your post above I will enjoy as practice and do not mind having to do it over again if necessary. I have all of my models and workflows backed up and set up is generally easy to do. Thank you for all of your assistance and patience. 

On another note YOUR BLOG IS AMAZING! What a wealth of knowledge. This comfyui instance is exactly for the use case you have linked. I am blown away. I have book marked it. Do you have a Patreon or anything so I may show my appreciation?

 

Edit...

Here are my logs. It appears as the libGL did not install from the user script. I may wipe all and try again.

Screenshot 2025-01-09 155017.png

Screenshot 2025-01-09 155207.png

comfyui.log 3.92 kB · 0 downloads

From the `ls -al` I see the same size for the file, so I am still a little confused as to why libgl is missing given that we are "sudo apt install"ing it in the first few lines of the script.

 

Unfortunately, the log is missing some earlier lines that be very useful to debug this mystery, around:

 

== Container directory: /comfy/mnt/ComfyUI
== Checking for user script: /comfy/mnt/user_script.bash
===================
== Running ComfyUI
-- Running: python3 ./main.py --listen 0.0.0.0 --disable-auto-launch

 

I ran a version with only the libgl install lines and I get:


 

== Container directory: /comfy/mnt/ComfyUI
== Checking for user script: /comfy/mnt/user_script.bash
== Attempting to make user script executable
  Running user script: /comfy/mnt/user_script.bash

[...]

The following additional packages will be installed:
  libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libelf1 libgl1-amber-dri libgl1-mesa-dri libglapi-mesa libglib2.0-data libglvnd0 libglx-mesa0 libglx0 libicu70 libllvm15 libpciaccess0 libsensors-config
  libsensors5 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxfixes3 libxml2 libxshmfence1 libxxf86vm1 shared-mime-info xdg-user-dirs

[...]

After this operation, 215 MB of additional disk space will be used.

 

  • Author
1 hour ago, DeusVault said:

 

On another note YOUR BLOG IS AMAZING! What a wealth of knowledge. This comfyui instance is exactly for the use case you have linked. I am blown away. I have book marked it. Do you have a Patreon or anything so I may show my appreciation?

 

 

You are quite welcome; I do this because I enjoy sharing my passion for technology

Writing it down also makes it easier for me to reproduce things later; my blog serves me as well :)

I'm glad you are enjoying it, too.

 

I am hoping to make a release tonight which will also be the building block for me being able to make a future ubuntu 24 + CUDA 12.6 update (which will require a different venv but that is going to be later). The branch on GH has my current WiP which so far appears to be working; I generate the demo bottle and can modify the security level as needed.

Now to add those 215MB of new packages 

  • Author

I got the beta on DockerHub; which appears to work for me so far (I get the WebUI) 

 

To test it, edit your "Docker" entry and modify the "Repository" line from "mmartial/comfyui-nvidia-docker" to "mmartial/comfyui-nvidia-docker:ubuntu22_cuda12.3" (the attached screenshot is missing the last part of the 12.3)
You can rename the user_script.bash as user_script.bash.off to avoid having it run this next time.

 

It loaded the default SD1.5 bottle example, I placed the model there and got the resulting image

 

 

 

Screenshot 2025-01-09 at 20.31.38.png

Screenshot 2025-01-09 at 20.39.37.png

26 minutes ago, martial said:

 

 

I am hoping to make a release tonight which will also be the building block for me being able to make a future ubuntu 24 + CUDA 12.6 update (which will require a different venv but that is going to be later). The branch on GH has my current WiP which so far appears to be working; I generate the demo bottle and can modify the security level as needed.

Now to add those 215MB of new packages 

That is great to hear and I will grab it when published. 

As far as my incomplete log it looks like my log saves are cutting off my pre load, so I grabbed a live log from the docker. I know this is probably an edge case due to configuration. Just incase it isn't, I will leave it here.

I am attempting to have my Open Webui generate images with a Flux 8 step gguf (https://huggingface.co/mhnakif/flux-hyp8/tree/main). This will also give me the ability to use style loras for the gguf line of flux.

 

 

comfyui.log

  • Author
2 minutes ago, DeusVault said:

That is great to hear and I will grab it when published. 

As far as my incomplete log it looks like my log saves are cutting off my pre load, so I grabbed a live log from the docker. I know this is probably an edge case due to configuration. Just incase it isn't, I will leave it here.

I am attempting to have my Open Webui generate images with a Flux 8 step gguf (https://huggingface.co/mhnakif/flux-hyp8/tree/main). This will also give me the ability to use style loras for the gguf line of flux.

 

 

comfyui.log 15.55 kB · 0 downloads

 

Thanks for the updated log.

It shows the "== Checking for user script: /comfy/mnt/user_script.bash" line but not that it found or ran the script (see my above log to see the difference)

 

Do you have multiple version or have you modified the default run directory and placed the script in the alternate version?

 

The default "run directory" should be "/mnt/user/appdata/comfyui-nvidia/mnt" (my screenshot shows my second install with the beta I just shared with you)

 

 

Screenshot 2025-01-09 at 20.49.19.png

4 minutes ago, martial said:

I got the beta on DockerHub; which appears to work for me so far (I get the WebUI) 

 

To test it, edit your "Docker" entry and modify the "Repository" line from "mmartial/comfyui-nvidia-docker" to "mmartial/comfyui-nvidia-docker:ubuntu22_cuda12.3" (the attached screenshot is missing the last part of the 12.3)
You can rename the user_script.bash as user_script.bash.off to avoid having it run this next time.

 

It loaded the default SD1.5 bottle example, I placed the model there and got the resulting image

trying it now...

.... and it worked 100% xlabs nodes installed!

It was installed direct over the last install that we had worked on.

Screenshot 2025-01-09 175145.png

  • Author
8 minutes ago, DeusVault said:

I am attempting to have my Open Webui generate images with a Flux 8 step gguf (https://huggingface.co/mhnakif/flux-hyp8/tree/main). This will also give me the ability to use style loras for the gguf line of flux.

 

 

That sounds fun, and I will try it, too ... I used Automatic1111 for OpenWebUI in my tests

3 minutes ago, martial said:

 

Thanks for the updated log.

It shows the "== Checking for user script: /comfy/mnt/user_script.bash" line but not that it found or ran the script (see my above log to see the difference)

 

Do you have multiple version or have you modified the default run directory and placed the script in the alternate version?

 

The default "run directory" should be "/mnt/user/appdata/comfyui-nvidia/mnt" (my screenshot shows my second install with the beta I just shared with you)

 

 

Screenshot 2025-01-09 at 20.49.19.png

 

Screenshot 2025-01-09 175518.png

  • Author
1 minute ago, DeusVault said:

trying it now...

.... and it worked 100% xlabs nodes installed!

It was installed direct over the last install that we had worked on.

Screenshot 2025-01-09 175145.png

 

Great, enjoy the gguf and let me know how it goes.

I will likely make an official release (once I update the unraid template and clean up the readme) this week end.

When I do I will post here again, so you will be able to go back to the default ("latest") tag if you prefer

  • Author
1 minute ago, DeusVault said:

 

Screenshot 2025-01-09 175518.png

I see the difference. Apologies, I should have mentioned using the value of the "run directory" in my earlier instructions instead of /mnt/user/appdata

 

Nonetheless, thank you for testing the new version :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.