Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package comfyui for openSUSE:Factory checked 
in at 2026-08-24 15:43:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/comfyui (Old)
 and      /work/SRC/openSUSE:Factory/.comfyui.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "comfyui"

Mon Aug 24 15:43:50 2026 rev:3 rq:1373274 version:0.33.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/comfyui/comfyui.changes  2026-08-22 
21:37:45.447681427 +0200
+++ /work/SRC/openSUSE:Factory/.comfyui.new.1258/comfyui.changes        
2026-08-24 15:44:03.464649450 +0200
@@ -1,0 +2,18 @@
+Sun Aug 23 17:27:06 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Start on the CPU when the machine has no usable accelerator, instead
+  of aborting during import: add
+  comfyui-fall-back-to-cpu-without-accelerator.patch
+  * comfy/model_management.py assumed a GPU unless --cpu was given, so
+    on a CPU-only installation importing it raised "AssertionError:
+    Torch not compiled with CUDA enabled" and the server never started
+  * openSUSE builds PyTorch without CUDA and without ROCm, so this
+    affected every user who did not know to pass --cpu
+  * the fallback logs a warning naming the cause, because the same
+    condition also holds for a GPU-capable PyTorch whose device is
+    currently unusable, where a silent CPU run would be far slower
+    than the user expects
+- Require python-comfy-aimdo 0.4.14 instead of 0.4.13, so the exact
+  pin keeps resolving once that update is published
+
+-------------------------------------------------------------------

New:
----
  comfyui-fall-back-to-cpu-without-accelerator.patch

----------(New B)----------
  New:  of aborting during import: add
  comfyui-fall-back-to-cpu-without-accelerator.patch
  * comfy/model_management.py assumed a GPU unless --cpu was given, so
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ comfyui.spec ++++++
--- /var/tmp/diff_new_pack.iIIo0D/_old  2026-08-24 15:44:04.153674030 +0200
+++ /var/tmp/diff_new_pack.iIIo0D/_new  2026-08-24 15:44:04.155674101 +0200
@@ -30,6 +30,8 @@
 Source2:        comfyui-packaged-paths.yaml
 # PATCH-FIX-UPSTREAM comfyui-create-custom-nodes-directory.patch 
gh#Comfy-Org/ComfyUI#8110 gh#Comfy-Org/ComfyUI#8434 [email protected] -- create 
custom_nodes under --base-directory, main.py lists it before the server starts
 Patch0:         comfyui-create-custom-nodes-directory.patch
+# PATCH-FIX-UPSTREAM comfyui-fall-back-to-cpu-without-accelerator.patch 
[email protected] -- start on the CPU when no accelerator is present, instead 
of raising AssertionError while importing
+Patch1:         comfyui-fall-back-to-cpu-without-accelerator.patch
 BuildRequires:  %{python_module base}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -43,7 +45,7 @@
 Requires:       %{primary_python}-alembic
 Requires:       %{primary_python}-av >= 16.0.0
 Requires:       %{primary_python}-blake3
-Requires:       %{primary_python}-comfy-aimdo = 0.4.13
+Requires:       %{primary_python}-comfy-aimdo = 0.4.14
 Requires:       %{primary_python}-comfy-kitchen = 0.2.31
 Requires:       %{primary_python}-comfyui-embedded-docs >= 0.5.9
 Requires:       %{primary_python}-comfyui-frontend-package = 1.50.6

++++++ comfyui-fall-back-to-cpu-without-accelerator.patch ++++++
Fall back to the CPU device when no accelerator is present.

comfy/model_management.py sets cpu_state = CPUState.GPU unconditionally at
import time and the only assignment back to CPUState.CPU is behind the --cpu
command line flag. There is no autodetection of "this machine has no usable
GPU at all", so on a CPU-only installation the module-level statement

    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)

reaches torch.device(torch.cuda.current_device()) and raises

    AssertionError: Torch not compiled with CUDA enabled

while ComfyUI is still importing, i.e. the server never starts. openSUSE
builds PyTorch without CUDA and without ROCm, so this is what every user of
the packaged ComfyUI gets unless they know to pass --cpu.

Fall back to the CPU device when none of the accelerator backends the module
already probes is available. The condition mirrors the flags that are bound
above it, and it deliberately leaves cpu_state alone when it is CPUState.MPS,
so Apple silicon is unaffected.

ixuca_available is included in the check so that an Iluvatar CoreX PyTorch
keeps exactly the behaviour it has today: get_torch_device() has no ixuca
branch, so such a build must continue to take the torch.cuda.* path rather
than being silently downgraded to the CPU by this patch. That hardware is not
available for testing, so it is preserved rather than changed.

The message is a warning rather than an informational line on purpose. The
same condition is true both for a PyTorch built without any GPU support and
for a PyTorch that has GPU support whose device is unusable right now (driver
not loaded, CUDA_VISIBLE_DEVICES empty, a container without device
passthrough). In the second case the user previously got a loud failure and
would now get a silent run that is one to two orders of magnitude slower, so
the fallback has to announce itself and name the cause.

--- ComfyUI-0.33.3.orig/comfy/model_management.py
+++ ComfyUI-0.33.3/comfy/model_management.py
@@ -156,6 +156,14 @@
 
 if args.cpu:
     cpu_state = CPUState.CPU
+elif cpu_state == CPUState.GPU and not (directml_enabled or xpu_available
+                                        or npu_available or mlu_available
+                                        or ixuca_available
+                                        or torch.cuda.is_available()):
+    logging.warning("No usable accelerator found (this PyTorch reports no CUDA 
"
+                    "or ROCm device), falling back to the CPU. Generation will 
"
+                    "be very slow.")
+    cpu_state = CPUState.CPU
 
 def is_intel_xpu():
     global cpu_state

Reply via email to