Files
sugarkworkandClaude Opus 4.7 026d537859 Replace psd-tools with bundled PSD writer
Port the MyPsdWriter C# implementation (https://github.com/.../mypsd) to
Python. The writer uses only the standard library plus numpy/PIL, so the
psd-tools dependency can be dropped entirely.

- New psd_writer.py with PsdLayer + write_psd / write_psd_from_pil_layers
  APIs. Supports Raw / RLE / Zip / ZipPredict compression, defaulting to
  RLE for broad reader compatibility (Photoshop, Affinity, CSP).
- Keep the C# trick of writing a 3-channel RGB header while individual
  layer records carry RGBA, so Photoshop does not surface a phantom
  unnamed alpha layer.
- extract_segments.save_images_to_psd is now a thin wrapper around the
  new writer; the psd-tools-based implementation and the internal
  header.channels hack are gone.
- Drop psd-tools from requirements.txt and pyproject.toml.

Verified by round-tripping multi-layer PSDs (RLE and Raw) back through
psd-tools: layer names match, per-layer pixel diff = 0, composite
preview diff = 0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 17:36:35 +09:00

19 lines
452 B
TOML

[project]
name = "comfyui-auto-mosaic"
description = "Auto detect and process sensitive areas using YOLO with mosaic, blur, white out, and PSD export."
version = "1.0.0"
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"ultralytics",
"opencv-python-headless"
]
[project.urls]
Repository = "https://github.com/sugarkwork/comfyui-auto-mosaic"
[tool.comfy]
PublisherId = "sugarknight"
DisplayName = "ComfyUI AutoMosaic"
Icon = ""