Files
Ewald 831b072943 Add professional compositing engines, HDR fixes, and native VIDEO support
Core (nodes/core/): alpha, masks, batch consolidation, blend, transform
matrix, bbox, parameters, validation engines shared across nodes, each with
unit tests.

Fix an unconditional RGB clamp to [0,1] that silently destroyed HDR/negative
values in Merge, Transform, Color Correct, Comp, CornerPin, Distort,
Spherize, Crop Stitch, and the shared masked-compositing helpers. Alpha
stays clamped everywhere; RGB no longer does.

Fix Grain applying `amount` twice in overlay/soft_light modes (quadratic
instead of linear falloff).

Add STMap mode to Distort (absolute UV remap vs relative displacement).
Add bbox output/input wiring between Crop and Crop Stitch. Add edge_grow
and edge_color_match to Crop Stitch. Add despill to Keyer. Add shuffle mode
to Channel (R/G/B/A routed from any source). Add size/luma_response to
Grain. Add grid mode to Constant. Add frame/layer accumulation limits to
Preview and Draw, plus a font-path containment fix and supersampling in
Text.

Make Frame Range and Append recognize a real ComfyUI VIDEO input (not only
this pack's internal media wrapper), preserving true fps/audio instead of
silently dropping them, and add a native VIDEO output alongside the
existing IMAGE output on both.

Add node_replacements.py (empty registry, wired into the extension
lifecycle) for future schema migrations.

Add a CI matrix pinning the verified requires-comfyui floor, and
.comfyignore for Registry packaging.
2026-09-27 11:55:49 +02:00

29 lines
779 B
Python

"""Comp must not silently clamp scene-linear/HDR RGB when compositing a layer."""
from __future__ import annotations
import torch
from nodes._helpers import _composite_comp_layer, _make_comp_canvas
def test_rect_placement_preserves_hdr_layer():
canvas = _make_comp_canvas(1, 8, 8, torch.device("cpu"), torch.float32)
layer = torch.full((1, 4, 4, 3), 3.0) # HDR RGB, fully covering placement
out = _composite_comp_layer(
canvas,
layer,
None,
mode="over",
opacity=1.0,
center_x=0.5,
center_y=0.5,
scale=1.0,
rotate_deg=0.0,
)
assert out[..., :3].max() > 1.0
# alpha stays canonical regardless of RGB range
assert out[..., 3].max() <= 1.0
assert out[..., 3].min() >= 0.0