tensor_convert_rgb is typed for NHWC torch tensors, but with prefer_copy it called image.copy(), which torch.Tensor does not have, so every RGBA image raised AttributeError. Use clone() for a tensor and keep copy() for a numpy array.
Fixes#1194, fixes#1178.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves `AttributeError: 'DifferentialDiffusion' object has no attribute
'execute'` on older ComfyUI (<0.3.63) where the V3 schema migration has
not landed yet. The prior code called `.execute(model)[0]` directly,
breaking anyone still on the legacy `.apply(model)` API.
Introduce `modules/impact/utils.apply_differential_diffusion(model)`
which uses `hasattr` to pick the correct branch at runtime:
- `.execute` -> V3 classmethod (ComfyUI >= 0.3.63)
- `.apply` -> legacy instance method (older)
- otherwise -> AttributeError with upgrade guidance
Replace all 7 direct call sites (animatediff_nodes, core x2,
impact_pack x2, segs_nodes, segs_upscaler) with the helper. The
existing import guard in segs_upscaler is preserved; the helper's
deferred import means ImportError still propagates for very old
ComfyUI builds without `comfy_extras.nodes_differential_diffusion`.
Fixes GitHub issue #1177.
Also add an E2E test harness:
- docs/E2E_TEST_STRATEGY.md — isolated-launch workflow with
--disable-all-custom-nodes + --whitelist-custom-nodes, Playwright
smoke test, workflow execution via /prompt + /history + /view,
verification criteria, operational notes.
- tests/e2e_dd_compat.py — reference test that runs SEGSDetailer
with noise_mask_feather=20 on a real input image, asserting
status==success and non-zero pixel delta between input and paste
previews (proves the detailer loop and compat shim actually ran).
This enhancement adds support for properly handling RGBA images in the tensor_paste function.
The previous implementation caused errors when pasting images with alpha channels.
Now the function can handle all combinations of RGB and RGBA images:
- RGB to RGB (unchanged)
- RGBA to RGBA (with proper alpha compositing)
- RGB to RGBA
- RGBA to RGB
Fix for the error: "RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 3"
improve: add max_size for Detailers
- breaking changes
improve: placeholder for detailer wildcard
bugfix: side-effect when cropping region are overlapped between SEGS
bugfix: crash when bitwise operation with empty mask