Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(copy): der AMD-Resttext in HardwareSettings sagt wieder die Wahrheit

purple59e313cb1625
diff --git a/src/components/create/experimental/CreateExperimental.tsx b/src/components/create/experimental/CreateExperimental.tsx
index be3402cb..c96bae24 100644
--- a/src/components/create/experimental/CreateExperimental.tsx
+++ b/src/components/create/experimental/CreateExperimental.tsx
@@ -170,12 +170,14 @@ function CreateExperimentalInner() {
Linux AMD wants a ROCm torch inside ComfyUI's own venv.
Since 2.6.7 the ComfyUI installer picks the ROCm wheels itself
on an AMD Linux box, so the fix is a reinstall and not a pip
- line the user has to type by hand. Windows has no ROCm wheel at
- all, so it gets the honest version instead of a channel that
- does not exist there. */}
+ line the user has to type by hand. The Windows half said there
+ was no Windows ROCm wheel at all and pointed at DirectML, which
+ the round 12 research disproved: AMD publishes its own Windows
+ wheels, LU installs them for the cards AMD supports, and
+ DirectML has been frozen on an old PyTorch since 2024. */}
{isLinux()
? ' AMD GPU? LU installs the ROCm build of PyTorch for AMD cards now. Reinstall the ComfyUI environment from Settings → ComfyUI, then set Settings → Hardware → ComfyUI GPU to Auto.'
- : ' AMD GPU? PyTorch ships no ROCm wheels for Windows, so this card needs a DirectML or ZLUDA ComfyUI of your own. Point LU at it and set Settings → Hardware → ComfyUI GPU to force GPU.'}
+ : " AMD GPU? LU installs AMD's own ROCm build of PyTorch for RX 7000 and RX 9000 cards on Windows. Reinstall the ComfyUI environment from Settings → ComfyUI to try that again. For any other AMD card you need a ZLUDA ComfyUI of your own: point LU at it and set Settings → Hardware → ComfyUI GPU to force GPU."}
</span>
</div>
)}
diff --git a/src/components/settings/HardwareSettings.tsx b/src/components/settings/HardwareSettings.tsx
index 60be89b5..ecac60c5 100644
--- a/src/components/settings/HardwareSettings.tsx
+++ b/src/components/settings/HardwareSettings.tsx
@@ -205,7 +205,7 @@ export function HardwareSettings() {
<div className="grid grid-cols-1 gap-1">
{([
['auto', 'Auto (recommended)', 'NVIDIA runs on the GPU. On an AMD / other card LU checks whether your ComfyUI has a GPU-capable torch (ROCm or ZLUDA) and uses it, otherwise falls back to CPU.'],
- ['gpu', 'Force GPU', 'Never fall back to CPU. Use if you run a DirectML / ROCm ComfyUI that LU cannot auto-detect. If your ComfyUI has no working GPU torch it will fail to start.'],
+ ['gpu', 'Force GPU', 'Never fall back to CPU. Use if you run a ROCm or ZLUDA ComfyUI of your own that LU cannot auto-detect. If your ComfyUI has no working GPU torch it will fail to start.'],
['cpu', 'Force CPU', 'Always run image / video on the CPU. Slow but stable, useful if generation crashes your GPU by running out of VRAM.'],
] as const).map(([val, label, help]) => (
<label key={val} className="flex items-start gap-2 cursor-pointer p-1.5 rounded hover:bg-white/[0.04] border border-transparent has-[input:checked]:border-white/10 has-[input:checked]:bg-white/[0.03]">
@@ -223,8 +223,17 @@ export function HardwareSettings() {
</label>
))}
</div>
+ {/* Written before 2.6.7 and untrue since: LU picks the wheels by card
+ now (57196b31, 6d5dc61e, 3570ce53), so "installs an NVIDIA / CPU
+ ComfyUI by default" would send an AMD user looking for a ComfyUI of
+ his own that the app has already installed for him. The families no
+ wheel carries kernels for are named too, because staying on the
+ processor there is a decision and not a failure. */}
<div className="text-[0.55rem] text-gray-500 mt-1 leading-relaxed">
- AMD image / video needs a ComfyUI built for your card (ROCm or ZLUDA). LU installs an NVIDIA / CPU ComfyUI by default. Takes effect on next ComfyUI start.
+ AMD image / video: on Linux LU installs the ROCm build of PyTorch, except for the cards
+ no ROCm wheel carries kernels for, which stay on the processor build on purpose. On
+ Windows LU installs AMD's own ROCm build for RX 7000 and RX 9000 cards, and the
+ processor build for everything else. Takes effect on next ComfyUI start.
</div>
</div>
)}
diff --git a/src/components/settings/__tests__/amd-copy-is-current.test.ts b/src/components/settings/__tests__/amd-copy-is-current.test.ts
new file mode 100644
index 00000000..7814e61c
--- /dev/null
+++ b/src/components/settings/__tests__/amd-copy-is-current.test.ts
@@ -0,0 +1,101 @@
+/**
+ * The AMD sentences the user reads, against what the app actually does.
+ *
+ * Befund 5d of the round 12 research (recherche-amd-rundum.md): three user
+ * texts were still describing the app of before 2.6.7. Two of them were fixed
+ * in round 12 with the code that made them wrong; these are the leftovers.
+ *
+ * src/components/settings/HardwareSettings.tsx:227
+ * "LU installs an NVIDIA / CPU ComfyUI by default"
+ *
+ * That has not been true since 57196b31 on Linux and since 6d5dc61e on
+ * Windows, and it sends an AMD owner looking for a ComfyUI of his own that the
+ * app has already installed for him. The DirectML pointer next to it is stale
+ * in its own right: torch-directml has had no release since 2024-09-15, pins
+ * torch 2.4.1, and is in Microsoft's declared maintenance mode.
+ *
+ * The same stale claim sat in the Create tab's CPU banner, on the Windows half
+ * ("PyTorch ships no ROCm wheels for Windows, so this card needs a DirectML or
+ * ZLUDA ComfyUI of your own"), which is the very sentence the research
+ * disproved. It is fixed here with its twin, because leaving one of two
+ * identical false sentences standing is not a smaller change, it is a worse
+ * one.
+ *
+ * The copy is pinned against the switch that decides, so the two cannot drift
+ * apart again in silence.
+ *
+ * Run: npx vitest run src/components/settings/__tests__/amd-copy-is-current.test.ts
+ */
+import { describe, it, expect } from 'vitest'
+import { readFileSync } from 'node:fs'
+import { fileURLToPath } from 'node:url'
+import { dirname, resolve } from 'node:path'
+
+const here = dirname(fileURLToPath(import.meta.url))
+const repo = resolve(here, '../../../..')
+const read = (rel: string) => readFileSync(resolve(repo, rel), 'utf8')
+
+const hardware = read('src/components/settings/HardwareSettings.tsx')
+const createTab = read('src/components/create/experimental/CreateExperimental.tsx')
+const wheels = read('src-tauri/src/commands/torch_wheels.rs')
+
+describe('THE FIX: the AMD copy says what the app does', () => {
+ it('the ComfyUI GPU note no longer claims an NVIDIA / CPU install by default', () => {
+ expect(hardware).not.toMatch(/installs an NVIDIA \/ CPU ComfyUI by default/)
+ expect(hardware).toMatch(/on Linux LU installs the ROCm build of PyTorch/)
+ expect(hardware).toMatch(/RX 7000 and RX 9000 cards/)
+ })
+
+ it('and it names the cards that stay on the processor on purpose', () => {
+ expect(hardware).toMatch(/no ROCm wheel carries kernels for, which stay on the processor/)
+ })
+
+ it('the frozen DirectML pointer is gone from both surfaces', () => {
+ expect(hardware).not.toMatch(/DirectML/)
+ expect(createTab).not.toMatch(/DirectML or ZLUDA ComfyUI of your own/)
+ expect(createTab).not.toMatch(/PyTorch ships no ROCm wheels for Windows/)
+ })
+
+ it("the Create banner's Windows half names AMD's own build instead", () => {
+ expect(createTab).toMatch(/LU installs AMD's own ROCm build of PyTorch for RX 7000 and RX 9000 cards on Windows/)
+ // ZLUDA is still the answer for the cards AMD does not serve, so it stays
+ expect(createTab).toMatch(/you need a ZLUDA ComfyUI of your own/)
+ })
+
+ it('the copy matches the switch that decides, on both branches', () => {
+ // Windows: AMD's own index, for the cards measured as supported
+ expect(wheels).toMatch(/os == "windows" && coverage == AmdCoverage::Supported/)
+ expect(wheels).toMatch(/ROCM_WINDOWS_CHANNELS/)
+ // Linux: ROCm wheels, except for the families no wheel carries
+ expect(wheels).toMatch(/if coverage == AmdCoverage::NoKernels \{\s*\n\s*return WheelPlan::Cpu/)
+ })
+})
+
+describe('NEGATIVE CONTROL: the sentences that were already true', () => {
+ it('the Auto and Force GPU help still describe the two modes correctly', () => {
+ expect(hardware).toMatch(/NVIDIA runs on the GPU\./)
+ expect(hardware).toMatch(/Never fall back to CPU\./)
+ expect(hardware).toMatch(/If your ComfyUI has no working GPU torch it will fail to start\./)
+ })
+
+ it('the Linux half of the Create banner is untouched', () => {
+ expect(createTab).toMatch(/AMD GPU\? LU installs the ROCm build of PyTorch for AMD cards now\./)
+ expect(createTab).toMatch(/Reinstall the ComfyUI environment from Settings/)
+ })
+
+ it('and the CPU warning itself still says why it is there', () => {
+ expect(createTab).toMatch(/ComfyUI is running on the CPU \(no usable GPU detected\)/)
+ })
+
+ it('no em dash in the new copy', () => {
+ const from = (text: string, a: string, b: string) => {
+ const i = text.indexOf(a)
+ expect(i).toBeGreaterThan(-1)
+ const j = text.indexOf(b, i)
+ expect(j).toBeGreaterThan(i)
+ return text.slice(i, j)
+ }
+ expect(from(hardware, 'Written before 2.6.7', 'Takes effect on next ComfyUI start')).not.toMatch(/[–—]/)
+ expect(from(createTab, 'The Windows half said', 'to force GPU."}')).not.toMatch(/[–—]/)
+ })
+})