Skip to content

Lower peak mem usage for 8 bit formats with pyav.#13626

Merged
comfyanonymous merged 1 commit intomasterfrom
temp_pr
Apr 30, 2026
Merged

Lower peak mem usage for 8 bit formats with pyav.#13626
comfyanonymous merged 1 commit intomasterfrom
temp_pr

Conversation

@comfyanonymous
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

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: 7c6a86fc-dca0-40b6-84b1-31ced46c02ae

📥 Commits

Reviewing files that changed from the base of the PR and between a164c82 and b2c916c.

📒 Files selected for processing (1)
  • comfy_api/latest/_input_impl/video_types.py

📝 Walkthrough

Walkthrough

The video frame decoding logic in the video types module has been modified to dynamically determine both the pixel format and post-processing function based on the decoded frame's characteristics. Previously, alpha channel detection would only modify the pixel format to a single hard-coded float format. Now, the system selects an appropriate post-processing function alongside the pixel format, which is applied to the final image and alpha tensors after collection. This allows format-specific normalization to float [0,1] while preserving other formats as-is.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the memory optimization approach and any performance implications of the changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main optimization: reducing peak memory usage for 8-bit formats when using PyAV for video decoding.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.


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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant