48 Commits
Author SHA1 Message Date
Ewald a4154ccf05 Fix P0 bugs, remove Append V2/Lens Artifacts, and fix crop reload reset
- Fix batch bypass tuple handling, memory budget device-awareness, grain
  RNG device, roto payload limits, preview temp-file cleanup, and route
  double-registration.
- Add native VIDEO output (fps/audio) to effect nodes that previously
  only returned IMAGE/MASK when fed a VIDEO input.
- Split the oversized src/preview/ops/geometry.ts and add a starting
  golden-fixture test harness (spherize, transform) comparing backend
  and frontend math.
- Remove ImageOpsAppendV2 (Autogrow) and ImageOpsLensArtifacts; inline
  Append's helper back into its single caller.
- Collapse the Color Correct curve widget behind a toggle so the node
  no longer grows too tall.
- Fix Crop/generic-node video preview playback running at the RAF rate
  instead of the source video's real fps.
- Fix Crop losing its saved output size after a workflow reload:
  syncCropWidgets recomputed height from width and a preset aspect
  ratio on every resync (including onConfigure on load), discarding
  the restored value. It now only refreshes aspect-ratio bookkeeping
  on a resync.
2026-09-30 12:49:42 +02:00
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
EwaldandClaude Sonnet 5 1b0e112cf8 Add ImageOps Roto node and raise live preview quality
Add ImageOpsRoto: bezier, ellipse, rectangle and freehand shapes with add/subtract/intersect, feather/expand, keyframe animation and a live-preview editor. Raise preview canvas sizes and enable high-quality smoothing. Update node-count tests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 10:53:40 +02:00
Ewald 23dcd1c2d9 Add lens/compositing effect nodes and depth-based Defocus, A/B compare on Preview
- Add ImageOpsVignette, ImageOpsChromaticAberration, ImageOpsBloom, and
  ImageOpsLensArtifacts for common lens/compositing effects.
- Add ImageOpsDefocus: depth-driven defocus/bokeh with shaped aperture
  kernels (circle/hexagon/octagon/custom) and highlight bloom.
- Add input_space (srgb/linear) to ImageOpsColorAjust so scene-linear/HDR
  sources aren't gamma-encoded twice.
- Add image_b + compare_mode/wipe_position to ImageOpsPreview for a real
  A/B comparison, plus a separate live on-demand A/B toggle while editing.
- Redesign the live-preview HUD: unified pill-style badges, frame counter
  now shows the real total and hides for single-frame sources, and the
  Output overlay only appears for Pad Out with the real pixel size.
- Align README with the current node set and fix stale blend-mode docs.
2026-09-28 00:19:49 +02:00
Ewald 7a1ecafc3b Fix preview/backend WYSIWYG bugs and clean up dead code across the pack
- FrameRange: reattach interactive controls on onConfigure instead of
  leaving them permanently dead after a workflow load/undo/paste
- FrameRange: stop silently swapping an inverted trim range in the
  preview - match _timeline_indices' documented zero-frame contract
- Append: bypass no longer concatenates audio/fps from clips that
  aren't part of the bypassed output
- Append: preview loop point now accounts for bypass
- Crop: bypass now returns a full-frame bbox instead of a 2-tuple that
  broke the node's declared 3-output contract
- Channel: shuffle preview now errors like the backend when "Mask" is
  selected without a connected mask, instead of faking success
- host.ts: RAF loop keeps polling instead of stopping for good when
  the canvas is briefly detached from the DOM
- Text: fix drag miscalibration when the preview is zoomed
- Eyedropper: restore picking from any canvas (VHS/WAS previews
  included), only excluding the LiteGraph graph canvas
- video_io.py: stop swallowing comfy_api import failures
- Remove dead code: compat/comfy_v3.py (V3NodeBase), core/parameters.py,
  core/validation.py, dbl-click-reset.ts, unused MEDIA_INPUT_TYPE
  imports, an unreachable fragment in _ensure_rgba
- memory.py: narrow an overly broad except clause
- distort.py: finish the first progress bar before starting the second
- keyer.py: fix inconsistent indentation
2026-09-27 19:50:21 +02:00
MajoorWaldi cc11328d5f chore(release): implement Codex 5.6 Sol hardening (PR 12) 2026-08-23 21:24:37 +02:00
MajoorWaldi 5b5cb6cb72 fix(nodes): use io.MultiType.Input for image/video inputs and update gitignore 2026-08-22 16:29:40 +02:00
MajoorWaldi ac06dabd89 feat(v3): migrate nodes to native Node 2.0 API and fix ComfyExtension entrypoint
- Refactor 26 nodes to io.ComfyNode with define_schema and execute\n- Implement ComfyExtension subclass with async comfy_entrypoint\n- Preserve majoor_imageops synthetic namespace loader to avoid nodes module collision\n- Update and validate unit, registry and frontend test suites\n- Rebuild frontend dist files
2026-08-22 13:40:04 +02:00
MajoorWaldi 3728ceddee fix: clean up duplicate extractions in preview ops 2026-08-22 12:25:14 +02:00
MajoorWaldi 9f3edbe033 feat: complete P3 roadmap tasks (V3 nodes, ImageOpsMedia, HDR support) 2026-08-22 12:21:32 +02:00
MajoorWaldi c10d02aebd chore: P0-P2 implementations (CI gate, Memory budget, MultiType, Golden Parity test) 2026-08-22 11:46:44 +02:00
MajoorWaldi 882c909e6b fix: restore previews and V3 node registration 2026-08-21 22:56:44 +02:00
MajoorWaldi 43a8180131 feat(vnext): complete Immediate First Sprint vNext migration and frontend parity tests 2026-08-21 22:13:27 +02:00
Ewald 40a8002a86 Fix ImageOps preview state and crop stitch 2026-06-12 00:42:31 +02:00
Ewald 9eef24e275 feat(imageops): add Crop Stitch node and improve crop functionality
- Add ImageOpsCropStitch node for cropping and stitching images
- Update ImageOpsCrop node to include a crop mask output
- Implement crop region mask generation for improved cropping functionality
- Update related metadata and widget configuration for new and updated nodes
2026-06-10 12:01:27 +02:00
Ewald ce750057fd fix(preview): improve pointer event handling and preview widget stability
- Add 'lostpointercapture' event listeners to handle pointer capture loss
- Implement reset button for image operations live preview
- Optimize preview widget height calculation to prevent layout jumps
2026-06-09 14:54:08 +02:00
Ewald ee2b519a87 chore: update imageops files and add example All Nodes MIO 2026-06-08 11:57:42 +02:00
Ewald e9183f86a2 fix(preview): improve interaction handling and remove unused features
- Add { passive: false } to event listeners for better control
- Remove color swatches and related logic from constant node
- Reset view instead of fit all in pad-out node
- Refine pan and zoom interactions in preview navigation
- Stop unnecessary event propagation in some cases
2026-06-08 08:11:26 +02:00
Ewald f1e74cef92 feat: Nodes Ui Refacto 2026-05-26 07:52:30 +02:00
Ewald 917509078e feat: optimize canvas context retrieval with willReadFrequently option
- Updated multiple instances in keyer.ts, nodestream.ts, and ops.ts to use the `willReadFrequently: true` option when obtaining 2D rendering contexts from HTMLCanvasElement. This change aims to improve performance when reading pixel data frequently.
- Enhanced navigation.ts to support aborting wheel event listeners using an AbortController.
- Modified state.ts and types.ts to include an optional AbortController in the NodeState interface for better management of event listeners.
2026-05-23 11:14:15 +02:00
Ewald 52a25b40ed Fix append video preview sync and docs 2026-05-21 08:10:34 +02:00
Ewald 980e2933a8 Fix imageops previews and frame count batching 2026-05-20 22:01:50 +02:00
Ewald 2cddb1ba1f fix(preview): include all numeric widgets in compact panel
Remove NATIVE_NUMERIC_WIDGET_NAMES exclusion list (rotate_deg, scale, strength, width, height, rotate). Excluded widgets were left visible as native LiteGraph sliders at the bottom of nodes, creating vertical empty space and duplicate UI (notably CameraShake/Transform/Spherize). Also includes prior session work: P1-P4 UX improvements, video preview anti-blink/anti-stutter fixes in source.ts, README and REFACTO docs cleanup.
2026-05-20 01:12:28 +02:00
Ewald c2f25dcd41 Fix live preview media refresh 2026-05-01 20:03:25 +02:00
Ewald 40171fa0fd v0.1.4: channel/distort/spherize fixes, comp+draw widget sync, blur_map, version bump 2026-04-25 01:17:24 +02:00
Ewald 068792c764 feat(color-correct): add zone-based color adjustment and soft brush drawing
- Implement global, shadows, midtones, and highlights zones for color correction
- Add brightness, contrast, saturation, vibrance, and gamma controls per zone
- Include temperature and tint adjustments with improved hue adjustment range
- Introduce soft brush drawing feature with adjustable softness
- Enhance draw tool with improved cursor feedback and eraser functionality
- Optimize performance with requestAnimationFrame for certain interactions
- Refactor color correction widget synchronization and reset logic
2026-04-24 23:52:41 +02:00
Ewald ec7925bc1a fix(preview): Pointer events broken in Node 2.0.21+
- Wheel zoom and pan on middle-click stopped working due to recent
  changes in Node's graph canvas container.
- Implement capture-phase wheel event handling on the document to
  regain control of preview zoom independent of Node version.
- Add safety checks against zero-size or detached canvases.
- Ensure pointer events reach preview canvases even if parent
  containers have pointer-events:none applied.
- Improve compatibility with Node 2.0 by adding fallbacks for
  widgets without proper addDOMWidget support.
2026-04-20 16:47:51 +02:00
Ewald a9dc8ef193 fix(preview): prevent auto-expanding unsupported image nodes
- Add a check for IMAGEOPS_CLASSES before auto-expanding image nodes
- This prevents auto-expanding for nodes that aren't in the IMAGEOPS_CLASSES set
- Applies to both JS and TypeScript versions of the code
2026-04-20 14:34:32 +02:00
Ewald 5085f85598 refactor(video): remove syncVideoToTick function and streamline video playback handling 2026-04-20 10:43:46 +02:00
Ewald ae8adfbe43 feat(imageops): improve draw node preview with zooming and panning
- Add Ctrl+mousewheel zooming to draw node preview
- Implement grab+drag panning for draw node preview
- Double-click to reset zoom/pan
- Adjust brush cursor size for zoom level
- Refactor preview rendering and interaction handling
2026-04-20 10:31:09 +02:00
Ewald 8330025ffe feat(imageops): add spherize and other transformations
- Implement spherize, fisheye, defisheye, latlong, and unlatlong transformations
- Add support for custom strength and invert options
- Update pad out functionality with improved bounds drawing and source handling
- Fix color widget type in corner pin node
- Add sync_dimensions toggle to crop node for linked/free aspect ratio
2026-04-17 22:05:16 +02:00
Ewald 532ac9920d refactor(imageops): enhance color correction capabilities
- Add new color correction parameters: tint, vibrance, shadows, midtones, highlights
- Remove padOutStitcher and related functions
- Update color correction wheel and widget interactions
- Modify renderColorCorrect to include new parameters
- Improve syncColorCorrectWidgets to handle new parameters
2026-04-17 18:04:15 +02:00
Ewald 901ac98117 feat(corner-pin): add bicubic interpolation option
- Implement bicubic interpolation function for smoother image resampling
- Add logic to switch between nearest, bilinear, and bicubic sampling methods
- Update both Python and JavaScript implementations for consistency
- Modify safe denominator calculation to preserve sign for negative values
2026-04-17 16:09:47 +02:00
Ewald bd61c74b6a perf(preview): improve noise node performance and zoom/pan interactions
- Optimize Perlin noise gradient calculations by using precomputed tables
- Reduce canvas resolution for noise node previews to match canvas size
- Implement screen-to-world coordinate conversion for consistent zoom/pan across widgets
- Remove unused renderNonce from NodeState
2026-04-17 15:44:20 +02:00
Ewald 50d3ce5a98 feat(comp): add corner pin functionality to composition layers
- Implement corner pin controls for composition layers
- Add functions to handle corner pin normalization and validation
- Update composition layer serialization and deserialization to include corner pin data
- Modify comp layer rect calculation to support corner pin
- Add utility functions for link handling in the graph
2026-04-17 09:37:18 +02:00
MajoorWaldi e1abaf9366 feat(imageops): add ImageOpsPadOutStitch node for enhanced outpainting
- Implement new ImageOpsPadOutStitch node in Python and JavaScript
- Add stitching functionality to combine original and outpainted areas
- Introduce feathering option for smooth transitions between areas
- Update adapter and ops to support new node in both environments
- Extend preview host to recognize and process new node type
2026-04-08 09:46:53 +02:00
MajoorWaldi e6696e7f09 feat: add new properties to NodeState and CropPreviewGeometry interfaces
- Added drawOverlayFormatSelect, drawPressureSizeInput, drawPressureOpacityInput, and drawTiltSizeInput to NodeState for enhanced drawing options.
- Introduced bbox property in CropPreviewGeometry to provide detailed bounding box information for cropping functionality.
2026-04-08 08:08:39 +02:00
MajoorWaldi e94965a5e2 feat: add pad out and corner pin image operations
- Implemented `ImageOpsPadOut` for adding padding to images with customizable padding values and fill color.
- Implemented `ImageOpsCornerPin` for applying corner pin transformations to images, allowing for perspective adjustments.
- Added helper functions for rendering padded canvases and corner pin transformations in the preview.
- Updated type definitions to include new states and geometry for corner pin and pad out operations.
- Enhanced the main operations file to support new image operations and their respective masks.
2026-04-08 00:45:49 +02:00
Ewald f88dab1e4a feat: add image to mask preview canvas functionality and enhance rendering capabilities
- Implemented `imageToMaskPreviewCanvas` function to convert images to mask previews based on alpha values.
- Updated `renderCompPreview` to support additional parameters for center positioning and rotation of layers.
- Modified `buildRenderer` to utilize `getInputOriginSlot` for improved input handling.
- Enhanced `NodeState` interface with additional properties for drawing and color management.
- Expanded `CropDragMode` and `CompDragMode` types to include new drag options.
2026-04-06 02:30:33 +02:00
Ewald 58561c4859 refactor: optimize node stream processing and improve canvas handling
- Replace queue.shift() with index pointer in resolveNodeStreamPreview to reduce O(n) complexity.
- Introduce MaskCanvas type and caching mechanisms for prepared mask canvases in ops.ts.
- Enhance fitCanvas to check for prepared mask canvases and mark them accordingly.
- Update extractCanvasField to utilize caching for performance improvements.
- Refactor renderCompPreview to handle alpha compositing more efficiently.
- Implement syncVideoToTick function to manage video playback timing based on render ticks.
- Modify ensureVideoFrameCanvas to support tick-based synchronization for video frames.
- Change waveform and vectorscope data types from Uint16Array to Uint32Array to prevent overflow.
- Update types to include new properties for interaction handling and static render caching.
2026-04-03 11:05:32 +02:00
MajoorWaldi 97619b45fc feat: Add media preview support with video and image handling in LivePreview 2026-03-27 10:54:16 +01:00
MajoorWaldi 83fe6ef4b9 feat: Enhance live preview rendering and state management
- Introduced new state properties in ensureState to manage rendering state, including lastRenderTick, renderInFlight, queuedRenderTick, and renderNonce.
- Added hashText and serializePreviewValue functions for efficient preview value serialization.
- Implemented buildPreviewRenderKey to create a unique key for rendering based on node state and inputs.
- Improved rendering logic in registerImageOpsLivePreview to handle queued renders and prevent unnecessary re-renders.
- Refactored blit function to accept various source types and improved canvas handling.
- Added ensureCanvasSize and renderImageSourceToCanvas functions to streamline canvas creation and image rendering.
- Updated ops and renderer modules to utilize new rendering functions and improve performance.
- Enhanced error handling during rendering processes to provide clearer feedback.
2026-03-27 09:15:50 +01:00
MajoorWaldi 314efcdbe6 feat: Add progress tracking to image operations
- Introduced a new progress tracking system for image operations, allowing for better user feedback during processing.
- Updated `invert.py`, `merge.py`, `noise.py`, `preview.py`, and `transform.py` to utilize the new progress tracking.
- Added unique ID handling for progress tracking to each operation.
- Enhanced the noise generation to support frame length and FPS settings.
- Modified the image operations adapter to accommodate changes in function signatures for progress tracking.
- Implemented procedural animation handling in the preview system to support animated values.
- Created a new `nodes_progress.py` file to encapsulate the progress tracking logic.
2026-03-27 08:49:56 +01:00
MajoorWaldi 8f0249b81c Refactor canvas context retrieval and error handling in renderer
- Updated canvas context retrieval to handle potential null values gracefully in `renderer.ts`.
- Enhanced error handling by returning null when context cannot be obtained.
- Added a `tick` parameter to the adapter apply context in `types.ts`.
- Introduced new distortion and noise nodes in Python, implementing image distortion and noise generation functionalities.
- Improved memory management by closing previous bitmaps in `source.ts`.
2026-03-27 00:23:29 +01:00
MajoorWaldi d270911c05 feat(renderer): enhance rendering with output slot support and input info tracking
- Updated the render function to accept an optional outputSlot parameter.
- Modified renderNode to handle output slots and gather input information.
- Introduced RenderInputInfo interface to encapsulate details about each input.
- Added logic to create placeholder canvases for missing upstream nodes.
- Updated signature function to include outputSlot in cache key.

ci: add nightly build and stable release workflows

- Created nightly.yml for automated nightly builds and uploads to GitHub.
- Added release-on-tag.yml for creating stable releases on version tags.
- Implemented steps to create zip archives excluding unnecessary files.
- Configured GitHub Actions to publish releases and custom nodes to the registry.
2026-03-19 22:20:43 +01:00
MajoorWaldi 2abd0673b8 feat: add image operations nodes for composition, cropping, and drawing
- Implemented ImageOpsComp for image composition with multiple layers and blending modes.
- Created ImageOpsCrop for interactive cropping with aspect ratio support.
- Developed ImageOpsDraw for drawing on images with customizable tools and overlays.
- Added utility functions for handling crop and draw operations, including aspect ratio resolution and canvas management.
- Introduced TypeScript interfaces and utility functions for managing composition layers and crop rectangles in the preview.
2026-03-18 15:19:58 +01:00
MajoorWaldi f7967be180 feat: add image processing scopes and media handling
- Implemented `computeScopes`, `drawHistogram`, `drawWaveform`, `drawRgbWaveform`, and `drawVectorscope` functions for image analysis.
- Created `parseAnnotated`, `makeViewUrl`, `ensureBitmap`, and `ensureVideoFrameCanvas` functions for media source handling.
- Added TypeScript definitions for ComfyUI integration, including node state, media state, and scopes options.
- Established project structure with `package.json`, `tsconfig.json`, and `package-lock.json` for dependency management and TypeScript configuration.
2026-03-18 06:40:43 +01:00
MajoorWaldi 16bf08d9b2 feat(preview): implement shared ops for live preview with various image processing functions
- Added ops.ts for image processing operations including color adjustments, blurring, transformations, and more.
- Introduced progress.ts to manage execution progress for ImageOps nodes.
- Created registry.ts to build an adapter registry for ImageOps and interop.
- Developed renderer.ts for recursive rendering of nodes with support for interop.
- Implemented scopes.ts for histogram, waveform, and vectorscope computations and visualizations.
- Added source.ts for media source helpers, including parsing and ensuring bitmap/video frame canvases.
2026-03-18 06:40:22 +01:00