Repository navigation
1.1.1
Fix: stale CUDA graph replay crash in Describe Reference
Fixes a hard crash (Windows access violation / "scatter gather kernel index out of bounds") that could happen in Describe Reference when describing a second image right after a first one.
Cause: ComfyUI's dynamic-VRAM text generation caches a CUDA graph per transformer layer during a generate() call and replays it on the next call as long as the model's weights match — but that check never accounts for the input shape (token count) of the current call. Describing a second image with a different token count than the first could replay a graph captured for the previous call's buffer sizes, corrupting GPU memory and crashing the whole ComfyUI process.
Fix: Describe Reference now drops any cached CUDA graph on the text encoder before every generation call, forcing a fresh capture each time instead of a mismatched replay.
Impact: if you were using --disable-cuda-graphs as a workaround for this crash, you can remove it — the fix is scoped to this node's model only, so the rest of your pipeline keeps the CUDA graph optimization.