Skip to content

Fix VOID failing with RuntimeError (CORE-205)#13873

Merged
comfyanonymous merged 1 commit into
masterfrom
fix-void
May 13, 2026
Merged

Fix VOID failing with RuntimeError (CORE-205)#13873
comfyanonymous merged 1 commit into
masterfrom
fix-void

Conversation

@Talmaj

@Talmaj Talmaj commented May 13, 2026

Copy link
Copy Markdown
Contributor

start (0) + length (464) exceeds dimension size (461).

Some very short and long clips were failing within tiled_scale_multidim function.

Root cause: The output buffer is pre-allocated using round(get_scale(dim, total_size)), but when a callable index_formula is used (as the void 3D VAE does to handle non-linear temporal upscaling), the formula applied to an individual tile position + tile size can round up to 1-3 more pixels than what the total allocation computed. You got 464 but the buffer only had 461 slots.

Fix: Before narrowing into the output buffer o, clamp l to o.shape[d+2] - upscaled[d] — the actual remaining space. If a tile is trimmed, we narrow ps_view and mask_view from position 0 to the same l, so shapes stay consistent. Dropping the last 3 pixels of a tile that overlaps a border is harmless because those pixels are feathered to near-zero by the mask anyway.

@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2b625a2f-2af0-47af-ad97-ee4f0b6f87aa

📥 Commits

Reviewing files that changed from the base of the PR and between a5189fe and dce0c22.

📒 Files selected for processing (1)
  • comfy/utils.py

📝 Walkthrough

Walkthrough

This PR fixes a tile-accumulation bug in tiled_scale_multidim where edge tiles could produce output slices smaller than their corresponding tile (ps) and mask tensors. The fix replaces the previous unconditional narrowing approach with a per-dimension loop that crops both the output accumulators and tile/mask views to match when partial tiles occur, then performs the weighted accumulation using aligned tensor shapes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title correctly identifies the main issue being fixed (VOID RuntimeError) and is directly related to the core change in the changeset.
Description check ✅ Passed The description is clearly related to the changeset, providing detailed context about the error, root cause, and the implemented fix for the tiled_scale_multidim function.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alexisrolland alexisrolland self-requested a review May 13, 2026 12:31
@comfyanonymous comfyanonymous merged commit 74c17a2 into master May 13, 2026
16 checks passed
@comfyanonymous comfyanonymous deleted the fix-void branch May 13, 2026 19:37
@alexisrolland alexisrolland changed the title Fix VOID failing with RuntimeError: … May 14, 2026
simonri pushed a commit to simonri/ComfyUI-flash-attention-3 that referenced this pull request May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants