Files
chflame163-ComfyUI_LayerStyle/py
zhaoruizhe df8de069d8 perf: vectorize shift_image with NumPy, fixes #520
Replace the per-pixel getpixel/putpixel loop in shift_image
(py/imagefunc.py:328-349) with NumPy slicing: np.roll for the cyclic
branch, boolean row/col masks + np.ix_ for the non-cyclic branch.
Function signature is unchanged; none of the 14 call sites (ImageShift,
DropShadow v1-v3, InnerShadow v1-v2, ChannelShake) need edits.

Benchmark on Apple M4, CPU only, mean of N runs:
- 1024x1024 non-cyclic: 0.563s -> 0.030s (18.5x)
- 2048x2048 non-cyclic: 2.448s -> 0.117s (21.0x)
- 1024x1024 cyclic:     0.608s -> 0.004s (159x)

RGB output verified pixel-identical against the original implementation
across 2592 parameter combinations plus six full-1024x1024 cases.

Fixes #520
2026-10-10 17:05:21 +08:00
..
2024-12-15 18:16:27 +08:00
2024-12-19 19:17:46 +08:00
2026-01-11 12:52:41 +08:00
2024-12-16 16:40:17 +08:00
2024-12-15 10:19:51 +08:00
2024-12-15 10:19:51 +08:00
2024-12-11 23:40:28 +08:00
2025-03-26 11:39:50 +08:00
2024-12-19 19:17:46 +08:00
2025-02-13 13:07:10 +08:00
2024-12-06 00:09:12 +08:00
2024-12-05 17:53:25 +08:00
2024-12-05 18:58:38 +08:00