Gerald LonlasandClaude Opus 4.8 33d700a07e fix(drag): correct off-by-one in profile drag-and-drop reorder
When the dragged profile came from an earlier index than the drop target,
`splice(sourceIndex, 1)` shifted every subsequent element left by one,
making the raw `targetIndex` point one slot past the original drop target.
The moved item landed AFTER the target card instead of AT it.

Fix: extract `reorderProfiles()` pure helper that uses
`targetIndex - 1` when `sourceIndex < targetIndex`, and delegate
the drop handler to it.

Adds 10 regression tests covering forward drags (the bug case),
backward drags (unchanged), adjacent-element edge cases, and
immutability of the input array.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 10:43:58 +08:00
2026-03-05 19:34:04 +08:00

ComfyUI Image Profile Node

ComfyUI custom node for managing multiple reusable image profiles with custom resolution and step settings directly inside one node UI.

ComfyUI Image Profile Screenshot

Great helper for content creators who want to generate fast drafts at small image sizes first (faster generation), then switch to HD profiles once composition and prompt direction are validated.

This node is handy because it avoids complex workflow setup for multiple image configurations and avoids repeatedly keying in width, height, and steps by hand.

Node

  • Image Profile
    • Outputs:
      • Latent (LATENT)
      • Steps (INT)
    • Find it in the category: Latent/Profile
    • Create as much as image profile your want. Set size and set
    • Drag-and-drop reorder
    • Includes resolution presets plus custom WxH input

Default profiles

Node start with 4 presets (that you can delete)

  • Landscape Low resolution -> 404x204, 5 steps

  • Landscape High resolution -> 1152x864, 8 steps

  • Portrait Low resolution -> 204x404, 5 steps

  • Portrait High resolution -> 864x1152, 8 steps

How to install?

  1. Put this folder in ComfyUI/custom_nodes/comfyui-image-profile
  2. Restart ComfyUI
  3. Add node Image Profile from category Latent/Profile

References

S
Description
No description provided
Readme
442 KiB
Languages
JavaScript 61.6%
Python 38.4%