Metadata-Version: 2.5
Name: laidline-comfyui
Version: 1.0.0
Summary: ComfyUI custom node `LaidlineSaveImage`: sign and watermark images on save (remote via LAIDLINE_URL or embedded via LAIDLINE_CONFIG).
Project-URL: Homepage, https://laidline.com
Project-URL: Documentation, https://laidline.com/docs/quickstart
Project-URL: Changelog, https://laidline.com/docs/changelog
Author: Laidline LLC
License-Expression: LicenseRef-Laidline-Source-Available
License-File: LICENSE
Keywords: ai-act,c2pa,comfyui,provenance,watermark
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.12
Requires-Dist: httpx
Requires-Dist: laidline<2,>=1.0
Requires-Dist: numpy>=1.26
Requires-Dist: pillow>=10
Description-Content-Type: text/markdown

# laidline-comfyui

ComfyUI custom node `LaidlineSaveImage` ("Save Image (Laidline: sign + watermark)", category `image/laidline`). It replaces
ComfyUI's Save Image node: each image in the batch is watermarked with TrustMark, signed with a C2PA manifest, logged to
the evidence sinks, and written to ComfyUI's output directory.

## Modes

- **Remote** (sidecar): set `LAIDLINE_URL` to the Laidline server (and `LAIDLINE_API_KEY` if it requires one). Takes
  precedence when both are set.
- **Embedded**: set `LAIDLINE_CONFIG` to a `laidline.yaml`; marking runs in the ComfyUI process.

With neither set, the node fails with `Laidline: set LAIDLINE_URL (sidecar) or LAIDLINE_CONFIG (embedded)`.

## Inputs and outputs

- `images` (`IMAGE`): the batch to save.
- `filename_prefix` (`STRING`, default `laidline`): as in Save Image; may include a subfolder.
- `format`: `png`, `jpeg` or `webp`.
- `request_id` (`STRING`, optional): recorded in the evidence log.

The node passes `images` through unchanged. Its `ui` output lists the saved files under `images` and, under `laidline`,
one entry per file with `asset_id`, `manifest_id` and `warnings` (for example `watermark_skipped:too_small` when the
short side is under `watermark.min_side_px`, default 128). A marking failure is raised as a `RuntimeError` shown on the node.

There is no `LaidlineMarkImage` node: a marked tensor cannot carry a C2PA manifest and any downstream node re-encodes it,
so only the saved file can be signed.

## Installation

Copy or symlink `laidline_comfyui` into ComfyUI's `custom_nodes/` and `pip install laidline[image]`. The pack uses relative imports only, so ComfyUI's custom-node loader can import it from `custom_nodes/`.

Proven against a real ComfyUI v0.37.0 on CPU (remote mode, PNG and JPEG: watermark, Trusted manifest and evidence
entry with `route: comfyui:LaidlineSaveImage`). Setup and the full guide:
https://laidline.com/docs/integrations/comfyui.
