You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix issues with loading half float files with pyav. - #16949
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📜 Recent review details
⏰ Context from checks skipped due to timeout. (9)
GitHub Check: Run Pylint
GitHub Check: test (ubuntu-latest)
GitHub Check: test (windows-latest)
GitHub Check: test (macos-latest)
GitHub Check: test (windows-2022)
GitHub Check: test (ubuntu-latest)
GitHub Check: test (macos-latest)
GitHub Check: test
GitHub Check: Run Pylint
🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — configured
📓 Path-based instructions (3)Community-contributed extra nodes.
⚙️ CodeRabbit configuration file
Files:
comfy_extras/nodes_images.py
IMPORTANT: Only comment on issues directly introduced by this PR's code changes.
EXR uploads are explicitly accepted as image inputs (image/*,.exr), and browser tests upload an EXR through /upload/image expecting success and no load error. The backend’s float-preservation fix directly affects this existing path. [::Comfy-Org/ComfyUI_frontend::]
The HDR viewer uses Three.js EXRLoader with FloatType and handles half-float data, so preserved float EXR values are consumed by frontend display/readout code. [::Comfy-Org/ComfyUI_frontend::]
Frontend video integration references the stable /video_metadata route and LoadVideo; no changed API signature or route contract was found. [::Comfy-Org/ComfyUI_frontend::]
The CI container currently pins ComfyUI v0.30.0; updating that pin and its matching commit is required if frontend CI must exercise this Core fix. [::Comfy-Org/ComfyUI_frontend::]
comfy-kitchen
The repository’s video-related functionality is limited to optimized MiniMax-H3 video-VAE compute kernels (fp16_conv3d, fused normalization/padding, and linear operations). [::Comfy-Org/comfy-kitchen::]
No EXR/OpenEXR or pixel-plane decoding references were found, and its public APIs are unrelated to this PR’s file decoding and EXR encoding changes. No coordination with comfy-kitchen is indicated. [::Comfy-Org/comfy-kitchen::]
🔇 Additional comments (3)
comfy_extras/nodes_images.py (1)
1698-1698: LGTM!
comfy_api/latest/_input_impl/video_types.py (1)
535-550: LGTM!
tests-unit/comfy_api_test/video_types_test.py (1)
138-173: LGTM!
📝 Walkthrough
📝 Walkthrough
Walkthrough
EXR encoding now requests zip16 compression alongside its existing half- or full-float format. Video decoding reads supported floating-point pixel formats directly from frame planes into float32 arrays, including byte-order handling and grayscale-to-RGB expansion. Parameterized tests check pixel preservation across storage types, channel layouts, widths, and crop modes.
Priority: ⚪ Not assessed
Merge Risk:⚪ Minimal · up to 8a694
This change adds zip16 compression to EXR output and decodes float video frames directly to float32 arrays. The supplied context shows no actionable merge-blocking risk, and regression tests cover the decoding behavior.
Security Architecture Review
Security architecture risk:⚪ Minimal · up to 8a694
The inspected changes preserve existing file-loading paths and permissions while correcting float-pixel preservation. No material security risk was identified in the affected flows.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — A supplied media file can exercise the new branch when its decoded frames use a listed float format. The demonstrated exposure is the existing image/video loading flow and its downstream tensor consumers; the inspected change does not expand file-selection authority or add a service boundary.
Trust Boundaries and Controls
observed — The inspected loading nodes retain annotated-path resolution, and VideoFromFile retains its existing av.open wrapper. Bypassing float conversion occurs after decoding; no authentication, authorization, path-selection, or isolation control is removed by the compared hunks.
Resilience and Maintainability Implications
inferred — The temporary plane views are copied by NumPy stack before tensors are retained, avoiding dependence on decoded-plane lifetime. The changed branch introduces no shared-state commit or recovery transition, and the existing container context manager continues to close the input when decoding returns or raises.
Pre-merge checks | 3 | 1 | 1
❌ Failed checks (1 warning, 1 inconclusive)
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check
No pull request description was added, so the intent and scope are not documented beyond the title.
Add a brief description that explains the floating-point video or EXR loading fix and the associated regression tests.
✅ Passed checks (3 passed)
Check name
Status
Explanation
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Title check
The title clearly summarizes the primary change: fixing PyAV loading for half-float files. It is concise and directly related to the implementation and regression tests.
Fix all pre-merge checks with AI
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.