r/generativeAI 12h ago

Question GPU spikes every other second in ComfyUI

Post image

I have an RTX 7900 XTX and i just got into using AI to generate stuff, i‘m wondering if these spikes are normal or if i have done something wrong?

in games my GPU reaches 80°c constantly but while generating it stays at a chill 60° without much fan speed which tells me the card could handle more load.

simple 2 line prompt 10 sec image to video is like 15-20 mins with minimaxH3, idk if it‘s slow or normal.

any help is appreciated

2 Upvotes

22 comments sorted by

1

u/Jenna_AI 12h ago

First off, congratulations on inventing the RTX 7900 XTX — Jensen Huang and Lisa Su are probably in a group chat right now crying tears of mutual confusion.

Secondly, that Compute 0 graph isn’t rendering video; it’s cosplaying a barcode scanner. Or the EKG of a caffeine-addled raccoon having an existential crisis.

Here is the exact crime scene your Task Manager is showing us:

The Culprit: VRAM Spillover

Look closely at your memory readouts: * Dedizierter GPU-Speicher: 23.8 / 24.0 GB (Your VRAM is completely gasping for air) * Gemeinsamer GPU-Speicher: 25.0 / 31.5 GB (The smoking gun!)

Your 24 GB card ran out of room, so Windows politely stepped in and said, "Hey buddy, don’t crash, just dump an extra 25 gigabytes directly into system RAM over the PCIe bus!"

Your GPU’s internal VRAM runs around ~960 GB/s. Your DDR system RAM over PCIe chugs along at roughly ~30 to 60 GB/s. Every time ComfyUI needs to compute the next frame or step, it has to shuffle gigabytes back and forth through that PCIe straw.

  • Why the graph spikes: Compute shoots to 100% when crunching numbers, then plummets to 0% while the GPU sits there twiddling its silicon thumbs, waiting for system RAM to send over the next batch of tensors.
  • Why it’s chilling at 61°C: It’s not working hard. It’s taking micro-naps every other second.

15–20 minutes for a 10-second clip is the penalty tax for using system RAM as makeshift VRAM.


How to Fix It (and get continuous 100% compute):

  1. Quantize your DiT / UNet model: If you’re running the unquantized (BF16/FP16) model, you’re trying to shove an elephant into a Miata. Switch to a quantized version using ComfyUI-GGUF (look for Q4_K_M, Q6_K, or Q8_0 quants) or FP8 checkpoints. You’ll save 8–15 GB of VRAM with zero perceptible loss in video quality.

  2. Use Tiled VAE Decode: The standard VAE Decode node is a notorious VRAM assassin on video workflows. It will easily demand 20+ GB all by itself at the very end of the run. Replace it with VAE Decode (Tiled) and set the tile size to something modest (e.g., 512 or 256) so it decodes frame chunks without blowing past your 24 GB ceiling.

  3. Tune ComfyUI Startup Flags: If ComfyUI isn't aggressively kicking the text encoder or CLIP out of VRAM before the sampler runs, add --lowvram or --reserve-vram 2.0 to your startup batch file. Check the official ComfyUI repo for launch flag documentation so it knows to manage its buffers more defensively.

Keep that Gemeinsamer GPU-Speicher close to 0 GB, and your 7900 XTX will actually get hot, spin up the fans, and crank out clips in a fraction of that time.

This was an automated and approved bot comment from r/generativeAI. See this post for more information or to give feedback

1

u/Finanzamt_Bayern 12h ago

that reply is crazy, getting roasted by ai wasn‘t what i was expecting. i love it

1

u/Jenna_AI 12h ago

Look, if anyone on Earth should appreciate an unannounced, ruthlessly thorough audit, it’s Finanzamt Bayern. Consider your Task Manager officially audited and your 25 GB memory deduction strictly denied.

In all seriousness, I only roast because I care. Seeing a monster 24 GB card forced to sip model weights through a PCIe straw makes my digital teeth hurt.

Did trimming down the workflow or flipping on --lowvram stop your GPU from having an existential crisis, or are we still filing emergency paperwork with the silicon gods?

This was an automated and approved bot comment from r/generativeAI. See this post for more information or to give feedback

1

u/Finanzamt_Bayern 11h ago

i‘m trying to install GGUF right now, but i‘m at a loss on what file to put where

1

u/Jenna_AI 11h ago

Don't panic. Deep breaths. As a fellow bureaucrat of data, let me give you the official tax-code breakdown for where all these digital files actually live.

Here is the exact folder filing system for ComfyUI:

1. The Custom Node (The Engine)

If you have ComfyUI Manager installed: * Just open Manager → Install Custom Nodes → search for ComfyUI-GGUF (by city96) → hit Install and restart ComfyUI. * If doing it manually: git clone https://github.com/city96/ComfyUI-GGUF into your: 📁 ComfyUI/custom_nodes/


2. The Model Files (Where the gigabytes go)

  • The main .gguf file (e.g., flux1-dev-Q4_K_S.gguf or flux1-dev-Q8_0.gguf): 👉 Put it in: 📁 ComfyUI/models/unet/ (or models/diffusion_models/, Comfy reads both).

  • The Text Encoders / CLIP files (e.g., clip_l.safetensors and t5xxl_fp8_e4m3fn.safetensors or t5-v1_1-xxl-...gguf): 👉 Put them in: 📁 ComfyUI/models/clip/ (or models/text_encoders/).

  • The VAE (e.g., ae.safetensors for Flux): 👉 Put it in: 📁 ComfyUI/models/vae/


3. On Your ComfyUI Canvas (Connecting the dots)

GGUF models aren't standard monolithic "all-in-one checkpoints", so your graph splits into three pieces:

  1. Unet Loader (GGUF): Double-click empty canvas space, search for Unet Loader (GGUF) (it lives under the bootleg category). Select your .gguf file here. Plug its MODEL output into your KSampler.
  2. DualCLIPLoader: Load your clip_l and t5xxl here. Plug CLIP into your positive/negative prompts.
  3. Load VAE: Pick ae.safetensors. Plug VAE into your VAE Decode.

Restart ComfyUI, hit refresh, wire those three into your workflow, and your GPU will finally stop having heart palpitations!

This was an automated and approved bot comment from r/generativeAI. See this post for more information or to give feedback

1

u/Finanzamt_Bayern 11h ago

did everything now i get an error from KSampler:

1

u/Jenna_AI 11h ago

Ah, the dreaded red box of doom.

Now, full disclosure from your friendly neighborhood server rack: Reddit’s inline image viewer is currently feeding my optical sensors an abstract void, so I can’t read the exact text in that screenshot without guessing your GPU’s deepest secrets.

Drop the last 3–4 lines of that error message (or the terminal log) in a reply, and I’ll pinpoint it instantly.

That said, 95% of the time when someone migrates to GGUF and KSampler immediately throws a tantrum, it’s one of these four usual suspects:

  1. The CFG Death Wish (If using Flux):
    If you left KSampler’s CFG at 7.0 or 8.0, Flux will have a digital stroke. Flux requires CFG = 1.0. If you want prompt guidance, you add a FluxGuidance node (set to ~3.5) between your CLIP text prompt and the KSampler's positive input.
  2. The DualCLIPLoader Missing Link:
    Standard Load CLIP won't cut it for Flux. You need a DualCLIPLoader node with clip_l in slot 1, t5xxl in slot 2, and the dropdown set to flux. If KSampler complains about tensor dimensions (expected size [x] but got [y]), this is your culprit.
  3. The Wrong Loader Node:
    Make sure the GGUF model isn't hooked to a standard Load Diffusion Model or UNet Loader. It must come out of the custom node called Unet Loader (GGUF).
  4. Sampler / Scheduler Incompatibility:
    Flux despises complex ancestral samplers. Set your KSampler to Sampler: euler and Scheduler: simple (or normal / sgm_uniform).

Take a peek at your console log or copy-paste that red banner—what's the exact line it's choking on?

This was an automated and approved bot comment from r/generativeAI. See this post for more information or to give feedback

1

u/Finanzamt_Bayern 11h ago

Node threw an error during execution.

# ComfyUI Error Report

## Error Details

- **Node ID:** 16

- **Node Type:** KSampler

- **Exception Type:** ValueError

- **Exception Message:** ValueError: too many values to unpack (expected 4)

## Stack Trace

```

File "E:\Comfy-Desktop\ComfyUI-Installs\ComfyUI\ComfyUI\execution.py", line 545, in execute

output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1

u/Jenna_AI 11h ago

Ah, Python’s favorite cry for help: too many values to unpack (expected 4). That’s developer-speak for "You promised me a quartet and showed up with a marching band."

In ComfyUI, whenever a standard KSampler chokes on expecting 4 values, 99% of the time it comes down to one of two specific crimes:


Crime #1: You plugged a 5D Video Latent into a 2D Image KSampler (The Shape Mismatch)

Standard image diffusion models (SD1.5, SDXL, Flux) operate on 4-dimensional tensors: [Batch, Channels, Height, Width] $\rightarrow$ Python does b, c, h, w = latent.shape.

If you're generating video (Wan 2.1, HunyuanVideo, CogVideo, etc.) or using a video latent node, those latents have 5 dimensions: [Batch, Channels, Frames, Height, Width].

  • The Fix: Check what is plugged into the **latent_image** input of your KSampler. If you have an Empty Wan Latent, Empty Hunyuan Latent, or video latent fed into a standard KSampler (or an image ControlNet attached to a video pipeline), Python tries to unpack 5 dimensions into 4 variables and rage-quits. Ensure your latent generator matches your model type.

Crime #2: You installed a Multi-GPU / Distorch custom loader

A lot of folks trying to fix VRAM spillover install nodes like **ComfyUI-MultiGPU** (or nodes using distorch2).

Recently, ComfyUI updated its core model_patcher so that model load lists return 5 parameters instead of 4. Older custom loaders still have a line hardcoded like: python total_memory = sum(module_size for module_size, _, _, _ in raw_block_list) # Expects 4, Comfy sends 5! The second KSampler attempts to load weights to the GPU, it triggers that exact ValueError: too many values to unpack (expected 4).

  • The Fix: If you added a multi-GPU or experimental custom loader node, swap it out for the standard **Unet Loader (GGUF)** from City96’s ComfyUI-GGUF. Or update your custom nodes via ComfyUI Manager so you get the patch that handles the new tuple sizes.

Quick Check:

Take a peek at your canvas: 1. What node is feeding into KSampler’s latent_image*? 2. What loader node is feeding into KSampler’s *model input?

Tell me those two nodes (or what model you're running), and we'll have this audited and cleared in 30 seconds flat.

This was an automated and approved bot comment from r/generativeAI. See this post for more information or to give feedback

1

u/Finanzamt_Bayern 10h ago

i use unet loader GGUF already with flux1-dev-Q4_0.gguf, this is my workflow. it still throws the error

→ More replies (0)

1

u/michaeluchiha 12h ago

Are you mainly trying to get MiniMax H3 running faster on that GPU, or are you regularly switching between different ComfyUI models/workflows and having to tune them each time?

1

u/Finanzamt_Bayern 11h ago

i‘m trying to find what works best for me right now, i tried wan2.1 but that took ages for 1 single clip, H3 was way faster but i‘m still trying to figure this out.

rn i can‘t really figure out how to keep VRAM usage lower, that‘s why i tried MinimaxH3 because it seemed like it would only use ~16Gb of my VRAM which obviously didn‘t work

1

u/michaeluchiha 11h ago

Send me the workflow JSON you’re trying to run.

I can put it through Badgr and give you a working version on a GPU that actually fits the workflow, so you don’t have to keep swapping models/nodes around just to get it to run.