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
9 hours ago, derp456789 said:

Has any attempted to run this on older hardware and ran into the following error ?
Fatal Python error: Illegal instruction

As far as i can tell it looks like something to do with Kornia and maybe the avx support ?
Unraid 7.3.1
dual xeon E5-2680 v2
RTX 3090
Repo: mmartial/comfyui-nvidia-docker:ubuntu24_cuda13.2-latest

Snippet of the error
Fatal Python error: Illegal instruction

Stack (most recent call first):

File "<frozen importlib._bootstrap>", line 488 in callwith_frames_removed

File "<frozen importlib._bootstrap_external>", line 1297 in exec_module

File "<frozen importlib._bootstrap>", line 935 in loadunlocked

File "<frozen importlib._bootstrap>", line 1331 in findand_load_unlocked

File "<frozen importlib._bootstrap>", line 1360 in findand_load

File "/comfy/mnt/venv/lib/python3.12/site-packages/kornia_rs/__init__.py", line 1 in <module>

File "<frozen importlib._bootstrap>", line 488 in callwith_frames_removed

File "<frozen importlib._bootstrap_external>", line 995 in exec_module

File "<frozen importlib._bootstrap>", line 935 in loadunlocked

File "<frozen importlib._bootstrap>", line 1331 in findand_load_unlocked

File "<frozen importlib._bootstrap>", line 1360 in findand_load

File "/comfy/mnt/venv/lib/python3.12/site-packages/kornia/io/io.py", line 24 in <module>

File "<frozen importlib._bootstrap>", line 488 in callwith_frames_removed

File "<frozen importlib._bootstrap_external>", line 995 in exec_module

File "<frozen importlib._bootstrap>", line 935 in loadunlocked

File "<frozen importlib._bootstrap>", line 1331 in findand_load_unlocked

File "<frozen importlib._bootstrap>", line 1360 in findand_load
/comfyui-nvidia_init.bash: line 953: 2609 Illegal instruction ${COMFY_CMDLINE_BASE} ${COMFY_CMDLINE_EXTRA}

!! ERROR: ComfyUI failed or exited with an error

!! Exiting script (ID: 97)

!! ERROR: subscript failed

!! Exiting script (ID: 1)

The crash comes from ComfyUI itself so I would not be able to comment too much on what the issue is.

When I see this kind of behavior, I rename the run folder to run.old and re-run the container which will re-create a new installation.

In general this fixed things for me, knowing that the custom nodes and images are in basedir, everything in "run" should be able to be deleted.

  • Replies 189
  • Views 104.1k
  • 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

3 hours ago, martial said:

The crash comes from ComfyUI itself so I would not be able to comment too much on what the issue is.

When I see this kind of behavior, I rename the run folder to run.old and re-run the container which will re-create a new installation.

In general this fixed things for me, knowing that the custom nodes and images are in basedir, everything in "run" should be able to be deleted.

Got it thanks for the quick reply
I've attempted a fresh install ( removing the appdata files ) plus a lower version and no luck
open to any suggestions

  • Author
23 hours ago, derp456789 said:

Got it thanks for the quick reply
I've attempted a fresh install ( removing the appdata files ) plus a lower version and no luck
open to any suggestions

When you deleted the run folder you downloaded a fresh install of ComfyUI during the next startup, so we can expect this to be something else.

Doing a quick gpt search seems to say that it might be a CPU issue and you might have to compile kornia from source.

You can try to use the userscript (check the README for instructions) to attempt to run the build manually: /comfy/mnt/venv/bin/pip install kornia-rs --force-reinstall --no-cache-dir --no-binary :all: (also copied from the GPT answer)

The Fatal Python error: Illegal instruction coming directly from kornia_rs means that the pre-compiled Rust binaries in that library are attempting to use CPU instruction sets (specifically AVX, AVX2, or FMA3) that your host machine's CPU does not support, or that your Docker/VM hypervisor configuration is masking from the container.

Not sure exactly what is happening, google is telling me that the wrong version of pytorch, not sure the google solutions will work as a i don't know that i can console in and correct this as it's happening during the container startup.

== Pre-installing/Upgrading torch

== Installing torch using uv with backend: cu130

Installing: torch torchvision torchaudio

== Installing/Updating from ComfyUI's requirements

!! ERROR: ComfyUI requirements install/upgrade failed

!! Exiting script (ID: 100)

!! ERROR: subscript failed

!! Exiting script (ID: 1)

Edited by WyoFarr

  • Author
On 7/18/2026 at 5:49 AM, WyoFarr said:

Not sure exactly what is happening, google is telling me that the wrong version of pytorch, not sure the google solutions will work as a i don't know that i can console in and correct this as it's happening during the container startup.

== Pre-installing/Upgrading torch

== Installing torch using uv with backend: cu130

Installing: torch torchvision torchaudio

== Installing/Updating from ComfyUI's requirements

!! ERROR: ComfyUI requirements install/upgrade failed

!! Exiting script (ID: 100)

!! ERROR: subscript failed

!! Exiting script (ID: 1)

That log looks very bare, as if nothing happened.

The previous step completed (installing torch), then it goes into installing Comfy's requirements.txt which should run uv pip install -r and be a little bit more verbose, especially in case of error. Here it is like it was not able to start the command.

  • 4 weeks later...

Was having problems finding this and found the issue listed under statistics.

ComfyUI-Nvidia-Docker is currently missing from Community Apps because the template is being rejected as invalid XML.

Apps → Statistics → Invalid Templates reports:

char '&' is not expected.

The issue appears to be the August 5 changelog line:

- Included full ffmpeg/sqlite3 for sub-scripts compilations & video support

The & needs to be escaped as &amp; (or replaced with and).

  • Author
11 hours ago, TwistUnraId said:

Was having problems finding this and found the issue listed under statistics.

The & needs to be escaped as &amp; (or replaced with and).

Thanks for reporting it, it is fixed, it might take a couple hours to show up again.

  • 4 weeks later...

Hey,

sorry to drop in but also got issues. No matter what Nvidia Driver is use or which repo im not able to get comy running again

mmartial/comfyui-nvidia-docker:ubuntu24_cuda12.9-latest

3090 FE with v580.173.02

RuntimeError: Detected that PyTorch and TorchAudio were compiled with different CUDA versions. PyTorch has CUDA version 13.0 whereas TorchAudio has CUDA version 12.9. Please install the TorchAudio version that matches your PyTorch version.

How to fix this ?

  • Author
18 hours ago, schubdog said:

Hey,

sorry to drop in but also got issues. No matter what Nvidia Driver is use or which repo im not able to get comy running again

mmartial/comfyui-nvidia-docker:ubuntu24_cuda12.9-latest

3090 FE with v580.173.02

RuntimeError: Detected that PyTorch and TorchAudio were compiled with different CUDA versions. PyTorch has CUDA version 13.0 whereas TorchAudio has CUDA version 12.9. Please install the TorchAudio version that matches your PyTorch version.

How to fix this ?

This is a strange error, the "max" for now is cu130

I have it running with driver 610 with the 12.9 version and I do not see any error.

I would recommend attempting to add a new variable called TORCH_LOCK

torch==2.13.0+cu128 torchaudio==2.11.0+cu128 torchvision==0.28.0+cu128

(I am not sure those are the right values, I adapted them from my cu130 line below)

The next step would be to move the driver up (check with nvidia-smi in a terminal so you can get CUDA to at least 13.0) and try with

torch==2.13.0+cu130 torchaudio==2.11.0+cu130 torchvision==0.28.0+cu130

with the CUDA 13.0 (and up to CUDA 13.2) version

I'm trying to download models in the UI, but it downloads them into my browser itself. Is there any way to force it to download them into the appropriate dirs inside the comfy installation?

  • Author
On 9/9/2026 at 5:24 PM, drbaltar said:

I'm trying to download models in the UI, but it downloads them into my browser itself. Is there any way to force it to download them into the appropriate dirs inside the comfy installation?

Not directly, the tool is just a frontend to ComfyUI, it does not know anything about your host or directory structure.

If you want to make your life easier, I recommend you look at custom nodes. I use "Lora Manager" https://github.com/willmiao/ComfyUI-Lora-Manager and I pay the author for its browser integration and CivitAI download capabilities. You do not have to pay if you are comfortable pasting the url in the tool's WebUI to do direct download..

There are likely other similar nodes I just started using this one and have not looked back.

The container won't start for me either.

Repository: mmartial/comfyui-nvidia-docker:ubuntu24_cuda13.2-latest
TORCH_LOCK: torch==2.13.0+cu130 torchaudio==2.11.0+cu130 torchvision==0.28.0+cu130

/comfyui-nvidia_init.bash: line 1057: 814 Illegal instruction ${COMFY_CMDLINE_BASE} ${COMFY_CMDLINE_EXTRA}

!! ERROR: ComfyUI failed or exited with an error

!! Exiting script (ID: 115)

!! ERROR: subscript failed

!! Exiting script (ID: 1)

  • Author
9 hours ago, JoergHH said:

The container won't start for me either.

Repository: mmartial/comfyui-nvidia-docker:ubuntu24_cuda13.2-latest
TORCH_LOCK: torch==2.13.0+cu130 torchaudio==2.11.0+cu130 torchvision==0.28.0+cu130

/comfyui-nvidia_init.bash: line 1057: 814 Illegal instruction ${COMFY_CMDLINE_BASE} ${COMFY_CMDLINE_EXTRA}

!! ERROR: ComfyUI failed or exited with an error

!! Exiting script (ID: 115)

!! ERROR: subscript failed

!! Exiting script (ID: 1)

This log tells us one thing: Line 1057 is the line that starts ComfyUI using python so the crash for ComfyUI and is AFTER the container has done all its getting things ready steps.

The error is something within Comfy, not with the container.

You will have to look at the error Comfy logged for details on how to make it work.

Luckily Comfy usually provide some details (usually in the lines above that ERROR) as to why it failed.

On 9/16/2026 at 4:53 AM, martial said:

You will have to look at the error Comfy logged for details on how to make it work.

Isn't fixing errors YOUR job as the maintainer of the app/Docker container?

When I install an app from the Community Applications, I should be able to expect it to work right out of the box, and not have to tinker with it as a user just to get it to work eventually, right?

So, buddy, do your job! 😉

Never mind, the AI and I figured it out.

TL;DR

kornia_rs ships precompiled Rust binaries built with an x86-64-v3 baseline (AVX2 + FMA3 + BMI2). On older Xeons (Ivy Bridge-EP and earlier) the import crashes with "Fatal Python error: Illegal instruction", so the container never reaches ComfyUI. Fix by placing a user_script.bash in the run folder that (1) disables AVX2/FMA3 for NumPy at runtime, (2) installs cmake, nasm, build-essential, pkg-config via sudo apt-get, (3) deletes the broken /comfy/mnt/venv/bin/cmake wrapper with rm -f, and (4) rebuilds kornia-rs from source — guarded by a pip show check so it only happens once. Full script below.

ComfyUI-Nvidia-Docker fails to start on older Xeon CPUs (no AVX2) — kornia_rs "Illegal instruction" and cmake build failures — with fix

Hardware/Software in question:

- CPU: 2x Intel Xeon E5-2690 v2 (Ivy Bridge-EP, no AVX2 / FMA3)

- GPU: NVIDIA RTX 3060 12 GB

- Unraid 7.3.2

- Image: mmartial/comfyui-nvidia-docker:ubuntu24_cuda12.6.3-latest (also affects ubuntu24_cuda12.8-latest)

- NVIDIA driver 610.43.03 (CUDA 13.3 host-side)

SYMPTOM

The container never reaches the ComfyUI server. Log ends with:

Fatal Python error: Illegal instruction

...

File "/comfy/mnt/venv/lib/python3.12/site-packages/kornia_rs/__init__.py", line 1 in <module>

...

/comfyui-nvidia_init.bash: line 1057: 1359 Illegal instruction ${COMFY_CMDLINE_BASE} ${COMFY_CMDLINE_EXTRA}

!! ERROR: ComfyUI failed or exited with an error

ROOT CAUSE

kornia_rs ships precompiled Rust binaries built with an x86-64-v3 baseline (AVX2 + FMA3 + BMI2). CPUs older than Haswell (like the Xeon E5-2690 v2) don't support these instructions, so the import crashes immediately. This is not an Unraid or Docker problem — it's a CPU-feature mismatch.

A secondary issue appears once you try to rebuild kornia-rs from source inside the container:

Traceback (most recent call last):

File "/comfy/mnt/venv/bin/cmake", line 4, in <module>

from cmake import cmake

ModuleNotFoundError: No module named 'cmake'

The venv contains a broken Python cmake wrapper at /comfy/mnt/venv/bin/cmake. The Rust build script for turbojpeg-sys (a kornia-rs dependency) picks that wrapper from PATH and fails. "pip install cmake" makes it worse; "pip uninstall cmake" leaves the wrapper file behind.

FIX

The project supports a user_script.bash placed in the run folder (/comfy/mnt), which is executed on every container start. Use it to:

1. Disable AVX2/FMA3 for NumPy at runtime (prevents the Illegal instruction crash).

2. Install the required system packages (cmake, nasm, build-essential, pkg-config) via sudo apt-get.

3. Delete the broken cmake wrapper (rm -f), so the Rust build picks up /usr/bin/cmake instead.

4. Rebuild kornia-rs from source — but only once, guarded by a pip show check, so subsequent container starts are fast.

user_script.bash content (place in your run folder, e.g. /mnt/user/appdata/comfyui-nvidia/mnt/user_script.bash):

#!/bin/bash

set -e

# Disable AVX2/FMA3 (Xeon E5-2690 v2 does not support these)

export NPY_DISABLE_CPU_FEATURES="AVX2,FMA3"

# Install build dependencies (sudo required - container runs as user 'comfy')

sudo apt-get update && sudo apt-get install -y cmake nasm build-essential pkg-config

# Remove the broken Python cmake wrapper from the venv

rm -f /comfy/mnt/venv/bin/cmake

# Make sure the system cmake is found

export PATH="/usr/bin:/usr/local/bin:$PATH"

# Build kornia-rs from source only once

if ! /comfy/mnt/venv/bin/pip show kornia-rs > /dev/null 2>&1; then

echo "== kornia-rs not installed, building from source..."

/comfy/mnt/venv/bin/pip install kornia-rs --force-reinstall --no-cache-dir --no-binary :all:

else

echo "== kornia-rs already installed, skipping build."

fi

# Optional: enable Matrix sharing in ComfyUI-Manager

/comfy/mnt/venv/bin/pip install matrix-nio

Ownership matters. The container runs as UID 99 / GID 100 (nobody:users on Unraid). Set ownership before starting:

chown 99:100 /path/to/run/user_script.bash

chmod +x /path/to/run/user_script.bash

NOTES / GOTCHAS ENCOUNTERED ALONG THE WAY

- FORCE_CHOWN does not help for bind-mounted folders. If you see "Directory /comfy/mnt owned by unexpected user/group, expected 99:100, actual 0:0", run "chown -R 99:100 <host-path>" on the host.

- apt-get inside the user script must use sudo. Without it you'll get "E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)".

- Do NOT run "pip install cmake" in the venv — it creates the wrapper that breaks the build. If it's already there, "rm -f /comfy/mnt/venv/bin/cmake" is the fix (a plain "pip uninstall cmake" leaves the wrapper in place).

- The "cu130 or higher" warning from comfy_kitchen in the startup log can be ignored on Ampere (RTX 30xx). It is only relevant for RTX 50xx / Blackwell.

- First start is slow (Rust compile of kornia-rs can take several minutes on Ivy Bridge). Subsequent starts are fast because of the pip show guard.

- Do not rename/delete the run folder between attempts unless the venv is genuinely broken. Editing user_script.bash in place is enough; the script runs on every container start.

RESULT

Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync

pytorch version: 2.14.0+cu126

ComfyUI version: 0.36.0

Starting server

To see the GUI go to: http://0.0.0.0:8188

Everything works: GPU is detected, PyTorch uses CUDA, ComfyUI + Manager start normally.

Hope this saves someone else a weekend. 😇

Edited by JoergHH

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.