Commit Graph
12 Commits
Author SHA1 Message Date
EnragedAntelope f3a02e2d7d Refactor ConstrainResolution class and methods 2025-11-08 09:10:43 -05:00
EnragedAntelope 81364107cb Refactor ConstrainResolution class and methods 2025-11-08 09:02:46 -05:00
EnragedAntelope e07274aab3 Refactor ConstrainResolution class and methods 2025-11-08 08:56:03 -05:00
EnragedAntelope b6f17385d5 Refactor enums and update ConstrainResolution class 2025-11-08 08:40:28 -05:00
Claude 27c854454b Update defaults and limits for production use
Changes:
- Set crop_as_required default to True (was False)
  Rationale: Most users need exact dimensions for image-to-video and
  other strict requirements. Cropping is now the default behavior for
  immediate compatibility with downstream processes.

- Increase max resolution limit from 16384 to 65536 (64k)
  Rationale: No technical reason to limit at 16k. Users working with
  high-resolution content need flexibility up to 64k range.

- Update node description to reflect crop-enabled-by-default behavior

- Comprehensive README overhaul:
  * Added "Why Use This Node?" section explaining use cases
  * Detailed documentation of all inputs with ranges and recommendations
  * Comprehensive outputs section with descriptions
  * Added multiple workflow examples (I2V, SDXL, batch, portraits)
  * Advanced tips section for edge cases
  * Technical details on algorithms and validation
  * Installation instructions for ComfyUI Manager and manual
  * ComfyUI v3 compatibility notes
  * Version history and support information

No version bump - still v2.1.0 as functionality unchanged
2025-11-08 13:11:56 +00:00
Claude 7e60424416 Add image resizing with intelligent cropping support
Features:
- Actual image resizing using torch bilinear interpolation
- Optional cropping to preserve aspect ratio when rounding causes deviations
- Configurable crop position (center, top, bottom, left, right)
- Resized image now output first, followed by original passthrough
- Input validation with detailed error messages
- Comprehensive tooltips on all inputs and outputs
- Reorganized UI with logical grouping of parameters
- Enhanced description with usage tips
- Max value constraints added to prevent unreasonable inputs

Technical improvements:
- Use torch.nn.functional.interpolate for high-quality resizing
- Smart crop algorithm that resizes first then crops to preserve quality
- Proper tensor shape handling [batch, height, width, channels]
- Aspect ratio deviation warnings when crop is disabled
- min/max bounds on all numeric inputs

Breaking changes:
- Output order changed: resized_image is now first output
- Output names simplified (width/height instead of constrained_width/constrained_height)
- execute() signature expanded with crop parameters

Bump version to 2.1.0
2025-11-08 13:06:46 +00:00
Claude de432c6fbe Migrate ConstrainResolution node to ComfyUI v3 spec
- Convert node to use comfy_api.latest with io.ComfyNode base class
- Replace INPUT_TYPES() with define_schema() returning io.Schema
- Convert execution method from process() to execute() classmethod
- Implement ConstraintModeEnum as io.ComboInput for dropdown options
- Update all inputs to use v3 type system (io.Image, io.Int, etc.)
- Update all outputs to use io.NodeOutput wrapper
- Replace NODE_CLASS_MAPPINGS with comfy_entrypoint() pattern
- Add ConstrainResolutionExtension class for node registration
- Update __init__.py to export comfy_entrypoint
- Add comfy_api dependency to pyproject.toml and requirements.txt
- Bump version to 2.0.0 to reflect major API change
2025-11-07 23:00:32 +00:00
EnragedAntelope e035ed905f Update nodes.py 2025-07-26 07:44:49 -04:00
EnragedAntelope 4024ff8851 Add multiple of as a constraint 2025-01-24 21:50:14 -05:00
EnragedAntelope baf7d4a75c Update nodes.py 2025-01-24 14:46:47 -05:00
EnragedAntelope faf9eec196 Standardize output naming convention 2025-01-24 14:01:37 -05:00
EnragedAntelope eb702ddcff Initial code. 2025-01-24 13:42:40 -05:00