https://github.com/fofr/comfyui-fofr-toolkit
Simple building block nodes
https://github.com/fofr/comfyui-fofr-toolkit
Last synced: 2 months ago
JSON representation
Simple building block nodes
- Host: GitHub
- URL: https://github.com/fofr/comfyui-fofr-toolkit
- Owner: fofr
- License: mit
- Created: 2024-07-22T14:32:15.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-08-09T11:36:38.000Z (10 months ago)
- Last Synced: 2025-03-24T12:07:24.683Z (3 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-comfyui - **comfyui-fofr-toolkit**
README
# 🪴 comfyui-fofr-toolkit
Simple building block nodes for ComfyUI
## Nodes
### Incrementer
A simple counter with a max value.
Inputs:
- `current_index` (required): An integer representing the current index. Default is 0.
- `max` (optional): The maximum value before the counter resets. Default is 10.### Width and height from aspect ratio
Calculates width and height based on a given aspect ratio and ideal target size.
Inputs:
- `aspect_ratio` (required): Choose from predefined aspect ratios (eg "1:1", "16:9", "21:9").
- `target_size` (required): The target size
- `multiple_of` (optional): Ensure the output dimensions are multiples of this value (default 8, range 1-1024).### Width and height for scaling image to ideal resolution
Calculates width and height for scaling an input image to a target resolution (for example 1024x1024 is a common ideal size) while maintaining its aspect ratio.
For example, an image that is 3:2 with a target of 1024x1024 pixels will be scaled to 1256x840 (rather than the less ideal 1024x682).
Inputs:
- `image` (required): The input image to be scaled.
- `target_size` (required): The target size for scaling. Default is 1024, range 64-8192.
- `multiple_of` (optional): Ensure the output dimensions are multiples of this value (default 8, range 1-1024).