Running Nemotron-Labs-Image-30B-A3B on GMKtec EVO-X2 with ROCm and ComfyUI
Contents

A community ComfyUI node and quantized weights were released for NVIDIA’s image generation model Nemotron-Labs-Image-30B-A3B.
The smallest checkpoint is 21.6 GB, which fits in the 64 GB memory of a GMKtec EVO-X2 (Radeon 8060S).
However, the node’s fast path is written specifically for NVIDIA GPUs. Since it is not a diffusion model, character LoRAs do not apply here; instead, I focused on whether it can generate images at all on an AMD GPU with ROCm PyTorch, and how many minutes one image takes if it works.
Nemotron-Labs-Image-30B-A3B and the Quantized Files
Nemotron-Labs-Image-30B-A3B is an autoregressive model that generates an image one token at a time like a language model. It uses a Mixture of Experts (MoE) architecture with 30B total parameters and 3B active parameters per token.
For each token, it selects a subset of small layers (experts) to compute, emits each 16×16 pixel patch as a code (like a dictionary index) from the top row down, and converts the final code sequence back into pixels with an image decoder. According to the node’s README, one 1024×1024 image takes 4,250 tokens.
| Item | Details |
|---|---|
| Model | nvidia/Nemotron-Labs-Image-30B-A3B |
| License | NVIDIA License (non-commercial research and evaluation only) |
| Official reference setup | vLLM on 4× NVIDIA H100 80GB |
| ComfyUI node | PedroMarinhoDev/ComfyUI-Nemotron-Image (commit 8f0d8e2) |
| Quantized weights | PedroMarinhoDev/Nemotron-Labs-Image-ComfyUI |
| Recommended resolutions | 1024×1024, 1184×880, 1248×832, 880×1184 |
| Recommended sampling settings | temperature 0.9, top-p 1.0, top-k none (disabled) |
Five community quantized checkpoints are available, from smallest to largest: W4A8 int8 dense (21.64 GB), W4A8 (22.67 GB), W6A8 (30.02 GB), INT8 ConvRot (35.52 GB), and BF16 (65.30 GB). W4A8 stores weights in 4-bit and activations (the values fed into matrix multiplication) in 8-bit, BF16 is a 16-bit floating-point format, and ConvRot is a rotation-based quantization method.
I used the smallest W4A8 int8 dense file together with the required image decoder (1.24 GB).
The node’s README lists generation times on RTX 4090 and RTX 3090: for W4A8 int8 dense at 1024×1024, the second and subsequent images take 21.8 seconds on an RTX 4090 and 26.7 seconds on an RTX 3090.
Those numbers come from the node’s custom CUDA kernels (dedicated GPU compute programs). The README makes no mention of AMD GPUs or ROCm.
Test Environment
| Item | Details |
|---|---|
| Machine | GMKtec EVO-X2 (Ryzen AI Max+ 395, Radeon 8060S, gfx1151) |
| Memory | ~59 GiB visible to the OS (base-1024 units), 8 GB swap; GPU allocation limit (GTT) set to 56 GiB |
| OS | Ubuntu 26.04.1 LTS, Linux kernel 7.0.0-44-generic |
| Software | Python 3.12.16, PyTorch 2.12.0a0+rocm7.13.0a20260411, ComfyUI 0.46.0, comfy-kitchen 0.2.42 |
| Generation settings | seed 42, temperature 0.9, top-p 1.0, top-k 0 (node defaults) |
The EVO-X2 GPU has no dedicated VRAM and shares main memory with the CPU, so whatever the GPU allocates reduces free OS memory by the same amount.
Generation time was measured from sending the request to the ComfyUI API until the output image was saved. Each condition was run once, so differences of a few seconds to a few tens of seconds fall within run-to-run variance.
Running One Image Out of the Box
When I ran the node as-is, the runtime log printed:
Nemotron Image: plain decode (no CUDA device with NVRTC)
Checking kernels.py in the node, available() returns True only when the device is CUDA and kernels can be compiled at runtime with NVRTC (NVIDIA Runtime Compilation).
ROCm PyTorch exposes AMD GPUs as cuda devices, so the device-type check passes, but without NVRTC available() returns False and execution falls back to the plain PyTorch implementation (plain decode), advancing one token at a time with standard PyTorch ops.
I first tried a quick 256×256 run with the prompt A red apple on a white table, studio photograph, soft light.. It finished without error in 235.1 seconds, but produced a solid gray image. 256×256 is not in the recommended resolution list.
Before trying the recommended 1024×1024 resolution, I measured per-token latency directly to estimate total runtime. The median was 0.628 seconds per token on the GPU. Since 1024×1024 takes roughly 4,250 tokens, one image was going to take about 44 minutes.
I then ran 1024×1024 with the perfume bottle prompt from the node’s README:
Product photo of a clear glass perfume bottle with a brushed brass cap, standing on wet black slate, water droplets on the glass, a slice of blood orange beside it, dark background, hard rim light from behind, sharp reflections and caustics on the slate
In 2,651.2 seconds (44 minutes 11 seconds), it produced an image of the perfume bottle and blood orange.
During this run, the ComfyUI process used about 17 GB on the CPU (host) side and about 18 GB on the GPU side, totaling roughly 36 GB—still leaving plenty of headroom out of 59 GiB.
Per-Token Time Breakdown
To see where the time was going, I profiled the average per-token breakdown over 200 image tokens.
The model consists of three layer types: E (the MoE layers described above), M (Mamba layers, which process sequences in order while carrying state), and Attention (which computes relationships between tokens).
| Stage | Time per token |
|---|---|
| E layers (23 layers) | 627.9 ms |
| — of which, dequantizing weights | 585.4 ms (322 calls) |
| M layers | 23.8 ms |
| Attention layers | 4.8 ms |
| Output head (final layer predicting the next token) | 5.0 ms |
Because each stage synchronized GPU completion for timing, the sum is slightly larger than the 0.628 seconds measured earlier.
Nearly 90% of the time was spent dequantizing weights inside the E layers. Every time an expert weight is used, the plain path unpacks the entire 4-bit matrix into BF16 before multiplying.
Each token activates 23 layers × 6 routed experts = 138 experts, each with an up-projection and down-projection matrix (276 calls). Adding the always-active shared experts (23 layers × 2 matrices = 46 calls) brings the total to 322 dequantization calls per token. Each call took about 1.8 ms, and the unpacked matrix was discarded immediately after the multiplication.
Trying a Cache for Dequantized Weights
Keeping unpacked matrices on the GPU instead of discarding them avoids re-dequantizing the same experts. I added an LRU cache to the node that retains dequantized weights up to a memory cap and evicts the least recently used entries when full.
Setting the cap to 24 GiB and starting a 1024×1024 run triggered CUDA out of memory in PyTorch after about 4 minutes (40.17 GiB allocated), and 3 minutes later the Linux OOM killer (which terminates processes when the OS kernel runs out of memory) killed ComfyUI with 0 swap left.
Host memory (~17 GB), GPU model weights (~18 GB), and ~22 GB of cache exhausted all 59 GiB of RAM plus 8 GB of swap.
The coding agent running in the same terminal was terminated at the same time.
Even though ComfyUI had been detached from the terminal, under systemd (Linux’s process manager) it still belonged to the same scope (process grouping unit) as the terminal. With the default user-session setting (OOMPolicy=stop), the OOM killer terminating one process stops the entire scope. After that, I started launching ComfyUI in its own separate unit:
systemd-run --user --unit=nemotron-comfy --collect -p OOMPolicy=continue \
--working-directory=$PWD \
python main.py --base-directory $PWD --listen 127.0.0.1 --port 8798
Estimating Hit Rate by Cache Cap
With 24 GiB exhausting memory, I disabled the cache and logged which experts were selected over 400 image tokens for the perfume bottle prompt.
Using that trace, I simulated the LRU cache at different caps to find the hit rate (the fraction of expert lookups already cached).
The model has 23 layers × 128 routed experts = 2,944 experts in total, of which 1,651 were used across the 400 tokens. One expert’s BF16 weights (both up and down matrices) take about 19 MiB (base-1024 MB).
| Cap | Experts held | Hit rate | Misses per token (out of 138) |
|---|---|---|---|
| 2 GiB | 107 | 0.0% | 138.0 |
| 4 GiB | 215 | 73.1% | 37.1 |
| 8 GiB | 430 | 88.5% | 15.9 |
| 12 GiB | 645 | 91.8% | 11.3 |
| 16 GiB | 860 | 95.1% | 6.8 |
| 24 GiB | 1,291 | 97.5% | 3.5 |
At 2 GiB, the 107 cached entries are fewer than the 138 experts needed in a single token, so nothing hits. Beyond 8 GiB, raising the cap yields diminishing returns, so I re-ran the same prompt and seed with an 8 GiB cache cap.
Generation time dropped from 2,651.2 seconds to 820.4 seconds (13 minutes 40 seconds, about 3.2× faster), and the output image matched the uncached run pixel for pixel. GPU memory stabilized at about 28.7 GB, leaving about 10.8 GB of free OS memory.
However, the actual hit rate over the full image was 78.4%, roughly 10 percentage points lower than the 88.5% estimated from the first 400 tokens.
Switching to comfy-kitchen’s AMD Kernel
Spending roughly 10 GB of extra memory for a 3.2× speedup felt heavy, so I looked for a faster option.
Checking where dequantization happens led to comfy-kitchen, the quantization library used by ComfyUI. The node’s plain path pins dequantization to comfy-kitchen’s eager backend (a generic implementation written in pure PyTorch ops).
According to a comment in the node, comfy-kitchen 0.2.41’s CUDA kernel did not support W4A8/W6A8 with ConvRot group size 64, which is why it forced eager.
Inspecting the installed comfy-kitchen 0.2.42 showed that besides eager, it includes a hip backend (AMD’s GPU compute stack) whose supported GPU list (architectures.json) already includes the EVO-X2 GPU (gfx1151).
Along with BF16 dequantization, the hip backend provides a kernel that reads W4A8 weights directly in 4-bit and performs matrix multiplication without unpacking the whole matrix to BF16 first.
I timed a single matrix multiplication on one expert’s up-projection matrix (1856×2688) across four methods. The down-projection matrix gave nearly identical numbers.
| Method | Time per call | Difference vs. eager dequantize |
|---|---|---|
Dequantize with eager, then multiply (node default) | 1.981 ms | Baseline |
Dequantize with hip, then multiply | 0.496 ms | None |
Multiply directly in 4-bit (hip kernel) | 0.070 ms | ~1% relative error |
| Multiply with cached BF16 matrix (cache hit) | 0.052 ms | None |
Multiplying directly in 4-bit is almost as fast as a BF16 cache hit and uses no extra memory. The ~1% difference comes from this kernel also quantizing the input activations to 8-bit during computation.
I added an environment variable NEMOTRON_PLAIN_EXPERTS to the node to switch between three modes (defaulting to eager when unset):
eager(default): Original node behavior—dequantize to BF16 with theeagerbackend, then multiplydecode: Removeuse_backend("eager")insidedequantized(), letting comfy-kitchen use its default backend (hipon this machine)packed: Pass the quantized weights directly to PyTorch’s matrix multiplication functionF.linear, invoking the 4-bit multiplication kernel
The packed implementation takes only about a dozen lines. Passing a quantized weight tensor to F.linear lets comfy-kitchen dispatch it to the W4A8 kernel. Expert computation routes through this helper only when packed is selected:
PLAIN_EXPERTS = os.environ.get("NEMOTRON_PLAIN_EXPERTS", "eager")
def quantized_linear(x, w):
"""x @ w.T for one quantized expert weight in the "packed" mode, in x's dtype."""
return F.linear(x, w.to(x.device)).to(x.dtype)
# Inside the per-expert loop in Experts.forward
if PLAIN_EXPERTS == "packed" and isinstance(self.up_proj.weight, QuantizedTensor):
h = relu2(quantized_linear(x[r], self.up_proj.expert_weight(i)))
out.index_add_(0, r, quantized_linear(h, self.down_proj.expert_weight(i)).float() * w[start:start + n, None])
start += n
continue
# SharedExpert.forward
if PLAIN_EXPERTS == "packed":
return quantized_linear(relu2(quantized_linear(x, self.up_proj.weight)), self.down_proj.weight)
Generation Time After Patching
With the patch in place, I ran the perfume bottle prompt (seed 42, 1024×1024) and compared all four configurations:
| Configuration | Generation time (speedup) | Extra memory | Image difference vs. unpatched |
|---|---|---|---|
Unpatched (eager dequantize) | 2,651.2s (1.0×) | — | — |
| 8 GiB dequantized weight cache | 820.4s (3.2×) | ~10 GB on GPU | Pixel-identical |
decode (hip dequantize) | 840.3s (3.2×) | None | Different image |
packed (4-bit direct multiply) | 230.1s (11.5×) | None | Different image |
In packed mode, a 1024×1024 image dropped to 3 minutes 50 seconds, using about 19 GB of GPU memory with about 20.8 GB of free OS memory. Even so, compared with the 21.8 seconds listed in the node’s README for an RTX 4090 (dedicated CUDA kernel, second image onward), it is still about 10× slower.
Here are the unpatched and packed outputs side by side:
2,651.2s

230.1s

packed produced a different image even with the same seed, though this is expected rather than a broken run. Because an autoregressive model samples the next code from a probability distribution at every token, even a slight numerical difference eventually flips a chosen code, and generation diverges into a different image from that point on. All elements requested in the prompt still appeared in both images.
decode also produced a different image. Since the single-expert check in the previous section showed no difference from eager, I checked hip vs. eager dequantization across all 23 layers.
Checking 16 routed experts per layer (every 8th expert, 2 matrices × 23 layers = 736 matrices) showed exact agreement everywhere, but all 46 shared-expert matrices (23 layers × 2 matrices) had slight discrepancies of up to 0.00049 on some elements. That small difference likely caused token selection to diverge partway through.
In terms of speed, decode took 840.3 seconds—nearly the same as the 8 GiB cache and much slower than packed (230.1 seconds).
Standing Portrait and Dynamic Scene Tests
Now that generation was down to under four minutes, I also generated the two test subjects I usually use for image model comparisons—a standing portrait on a white background and a dynamic scene—using packed mode at the recommended 880×1184 resolution and seed 42.
Because this model expects natural-language prompts rather than tag lists, I rewrote the usual tags into English sentences and specified an anime illustration style in prose.
225.1s

235.1s

Even in anime style, the outputs followed the requested outfit and composition. At 880×1184, generation time was roughly the same as 1024×1024, putting the EVO-X2 just under 4 minutes per image.
Prompts
Standing portrait (English prose used)
Anime illustration of a single girl with long blonde hair and blue eyes, wearing a white robe with gold embroidery, a capelet, a gold sash, long sleeves and a long dress. She is standing and looking at the viewer. Full body, plain white background.
Standing portrait (original tag list)
1girl, solo, long blonde hair, blue eyes, white robe, gold embroidery, capelet, gold sash, long sleeves, long dress, standing, looking at viewer, full body, white background
Dynamic scene (English prose used)
Anime illustration of a single girl with long blonde hair and blue eyes, wearing a white robe with gold embroidery, a capelet, a gold sash, long sleeves and a long dress. She is running in a dynamic pose, her hair blowing in the wind, across a grass field in a fantasy landscape, with a castle in the background under a sunset sky with dramatic clouds.
Dynamic scene (original tag list)
1girl, solo, long blonde hair, blue eyes, white robe, gold embroidery, capelet, gold sash, long sleeves, long dress, running, wind, hair blowing, dynamic pose, fantasy landscape, castle in background, sunset sky, dramatic clouds, grass field
References
- nvidia/Nemotron-Labs-Image-30B-A3B (Hugging Face)
- PedroMarinhoDev/ComfyUI-Nemotron-Image (GitHub)
- PedroMarinhoDev/Nemotron-Labs-Image-ComfyUI (Hugging Face)
- Training a 1024px Character LoRA for MOSS-Image on EVO-X2 ROCm — Another experiment on the same EVO-X2 ROCm setup (a separate model that supports LoRA training)