Skip to content

Say so when ComfyUI runs on the processor alone - #169

Merged
MehranMarxian merged 2 commits into
mainfrom
fix/cpu-only-comfyui
Nov 4, 2026
Merged

MehranMarxian merged 2 commits into
mainfrom
fix/cpu-only-comfyui

Conversation

@MehranMarxian

Copy link
Copy Markdown
Owner

What changed and why

Beta gate G3. A ComfyUI with no usable graphics card passed Check ComfyUI as if nothing were wrong, and every tool then took minutes per picture or failed. That covers ComfyUI started with --cpu, or a PyTorch build without GPU support.

It was also worse than silent. ComfyUI reports a CPU device's vram_total as the machine's system RAM: get_total_memory in comfy/model_management.py returns virtual_memory_total() for a cpu device, which I confirmed in the ComfyUI on disk. OpenLayer read that as VRAM, which had three effects:

  • A 32 GB CPU-only machine was ranked as a "Workstation VRAM" card.
  • SeedVR2's VRAM limit was sized from that figure.
  • So was Setup's VRAM outlook.

The fix:

  • Detection: isCpuOnlyComfy(systemStats) in hardwareAdvisor.ts is true when ComfyUI reports at least one device and every one is type cpu. Apple mps and every GPU backend are not CPU.
  • No fake VRAM: getPrimaryDeviceVramTotalBytes no longer returns a CPU device's memory, so the tier is unknown rather than workstation, and the VRAM limits fall back as they do when ComfyUI reports nothing.
  • Status line: Check ComfyUI, the first-run check and Find ComfyUI Active Port now say "ComfyUI is online, but on CPU only." That's 35 characters, inside the status bar's roughly 48.
  • Reason line: the diagnostics line underneath says: "ComfyUI is running on the processor only, with no graphics card. Every tool that generates an image will take minutes per picture instead of seconds, and the large models may not run at all. If this computer has an NVIDIA, AMD or Apple graphics card, ComfyUI was probably started with its CPU-only option or without GPU support."
  • Detect Hardware reports "Processor only, no graphics card" and "No GPU", with VRAM "none".

Why the note names no tools: the gate's wording asked for which tools will be too slow. I wrote the cause and what to check instead, because no tool has been timed on a CPU-only ComfyUI, and naming tools as usable would be a guess. The note follows the panel string rules: plain text, no --, no backticks.

A failed stats read can't fail the check: if /system_stats can't be read, the check still succeeds without the warning.

Verified

npm run typecheck   exit 0
npm run lint        exit 0
npm test            Test Files 138 passed (138), Tests 1372 passed (1372)
npm run build       "Copied UXP assets to dist."

New tests/comfy/cpuOnlyComfy.test.ts, 9 tests, built on the shape ComfyUI 0.37 reports for a CPU device:

  • Detection: CPU is detected; cuda, mps, xpu and privateuseone are not; an empty device list says nothing.
  • No fake VRAM: a 32 GB CPU machine reports no VRAM, while a real 12 GB card still reports 12 GB.
  • Detect Hardware: the report says No GPU, not Workstation.
  • Wording: the status fits the bar, the reason comes before the no-checkpoints note, and the text is plain.

Could NOT be verified

  • No run against a real CPU-only ComfyUI. The test machine's ComfyUI on 8188 is shared and has a GPU, and restarting it with --cpu isn't my call. The gate row says this is still to do.
  • Not checked in Photoshop. UXP Developer Tools wouldn't come forward to reload the plugin, so the panel stayed on the previous build.

What Mehran should check in Photoshop

Smoke checklist blocks (docs/uxp-smoke-checklist.md):

  • Block 0 (the panel starts)

Load: UXP Developer Tool › OpenLayer › Reload.

  • 1. Settings › Check ComfyUI with your normal GPU ComfyUI. See: "ComfyUI is online. Models loaded." as before, with no CPU note.
  • 2. Settings › Detect Hardware. See: your RTX 4070 Ti with 12 GB, as before.
  • 3. Optional, if you can spare ComfyUI for a few minutes: start it with --cpu, then Check ComfyUI. See: "ComfyUI is online, but on CPU only." with the reason underneath, and Detect Hardware reports No GPU.

🤖 Generated with Claude Code

MehranMarxian and others added 2 commits November 4, 2026 23:31
Beta gate G3. A ComfyUI with no usable graphics card, started with
--cpu or on a PyTorch build without GPU support, passed Check ComfyUI as
if nothing were wrong, and every tool then took minutes per picture or
failed. Worse, ComfyUI reports a CPU device's "vram_total" as the
machine's system RAM (get_total_memory in model_management.py), and
OpenLayer read it as VRAM: a 32 GB CPU-only machine was ranked as a
workstation card, and VRAM limits and Setup's outlook were sized from it.

isCpuOnlyComfy in hardwareAdvisor.ts is true when every reported device
is type "cpu". A CPU device's memory is no longer returned as VRAM.
Check ComfyUI, the first-run check and Find ComfyUI Active Port say
"ComfyUI is online, but on CPU only." with the reason on the line below,
and Detect Hardware reports No GPU. The note names the cause and what to
check, not a list of usable tools, because nothing has been timed on a
CPU-only ComfyUI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked in Photoshop 2025 against a Comfy Desktop instance started with
--cpu (ComfyUI 0.38.1 on port 8189) and a GPU ComfyUI 0.44.0 on 8188.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MehranMarxian

Copy link
Copy Markdown
Owner Author

Photoshop checks, run by Claude on Mehran's machine (Photoshop 2025, dev build of this branch):

  • Block 0: the panel loads.
  • 1. Check ComfyUI against the GPU ComfyUI 0.44.0 on 8188 reads "ComfyUI is online. Models loaded." with "Check ComfyUI pressed." underneath. There is no CPU note.
  • 2. Detect GPU reads "cuda:0 NVIDIA GeForce RTX 4070 Ti", 12.0 GB total and 10.8 GB free VRAM.
  • 3. Against a real CPU-only Comfy Desktop instance (ComfyUI 0.38.1, --cpu, found on port 8189 by probing every listening port for /system_stats):
    • Check ComfyUI reads "ComfyUI is online, but on CPU only.", with "ComfyUI is running on the processor only, with no graphics card. Ever…" underneath. That line is cut off at panel width.
    • Detect GPU reads "Processor only, no graphics card (cpu)", Total VRAM none, Free VRAM none, tier No GPU.
    • Comfy Desktop's own About page lists that machine's "VRAM Total" as 31.71 GB, which is its system RAM. Before this PR, OpenLayer would have read that as VRAM.
  • Afterwards the panel was pointed back at 8188 and the check passes there. That address is the saved one again.

Two findings:

  • Comfy Desktop isn't always on 8000. This instance was on 8189, which the port scan already covered. The G2 note stands: 8000 is Desktop's default, but a second instance takes another port.
  • The 12 GB card shows as "Medium VRAM". The card reports 12.0 GB, but getHardwareTier puts anything under 12 GiB in "medium", so the tier sits just under the line. This is unchanged by this PR and I haven't touched it.

The G3 row in docs/beta-gate.md is updated in this PR.

@MehranMarxian
MehranMarxian merged commit 3d9de35 into main Nov 4, 2026
1 check passed
@MehranMarxian MehranMarxian mentioned this pull request Nov 5, 2026
2 tasks done
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.

1 participant