Files
EwaldandClaude Sonnet 5 019a5c9172 Load through comfy_entrypoint and adopt current ComfyUI APIs
Defining NODE_CLASS_MAPPINGS made ComfyUI skip comfy_entrypoint, so
/imageops/viewmedia and node replacements were never registered. Load
as a V3 extension only, move server.py to routes.py so it stops
shadowing ComfyUI's server module, and transcode animated previews
with PyAV instead of an external ffmpeg.

- Require ComfyUI 0.19.0 (has_intermediate_output); CI floor updated.
- Process 11 nodes on ComfyUI's torch device when the frames fit in
  free memory (IMAGEOPS_COMPUTE_DEVICE=cpu disables it).
- Add core CURVE input to Color Correct, BOUNDING_BOX output/input to
  Crop and Crop Stitch, LAYERS output to Comp (ComfyUI 0.31+),
  essentials_category, and Merge blend modes with golden parity.
- Report progress through the public set_progress API and drop the
  hidden unique_id input.
- Add ImageOps settings and a refresh-previews command.
- Fix ImageOpsComp rotation and preview saving (undefined
  to_display_range) and masked Transform edge colors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 14:53:14 +02:00

23 lines
1.3 KiB
JavaScript

import { PREVIEW_DEFAULTS, PREVIEW_SETTING_IDS } from "./shared/preview-defaults.js";
function buildPreviewSettings(onChange) {
const slider = (key, name, tooltip, min, max, step) => ({
id: PREVIEW_SETTING_IDS[key],
name,
type: "slider",
defaultValue: PREVIEW_DEFAULTS[key],
attrs: { min, max, step },
tooltip,
onChange
});
return [
slider("canvasSize", "ImageOps live preview size (px)", "Longest side of the live preview when idle.", PREVIEW_DEFAULTS.minCanvasSize, PREVIEW_DEFAULTS.maxCanvasSize, 64),
slider("playbackCanvasSize", "ImageOps preview size during playback (px)", "Longest side while a video preview plays. Capped by the idle size.", PREVIEW_DEFAULTS.minCanvasSize, PREVIEW_DEFAULTS.maxCanvasSize, 64),
slider("interactionCanvasSize", "ImageOps preview size while editing (px)", "Longest side while dragging handles or sliders. Capped by the playback size.", PREVIEW_DEFAULTS.minCanvasSize, PREVIEW_DEFAULTS.maxCanvasSize, 64),
slider("debounceMs", "ImageOps preview refresh delay (ms)", "Wait after the last change before the preview re-renders.", 0, 2e3, 10),
slider("maxGraphNodes", "ImageOps preview max graph nodes", "Above this many nodes the live preview turns itself off.", 1, 1e4, 10)
];
}
export {
buildPreviewSettings
};