Image Upscale With Model Batched(ImageUpscaleWithModelBatched)
This node technically first converts the input image data into a tensor format suitable for model processing, then batches the images according to the user-defined `per_batch` value and feeds them into the specified super-resolution model for processing.
Image Upscale With Model Batched
The Image Upscale With Model Batched node technically first converts the input image data into a tensor format suitable for model processing. It then feeds the images in batches into the specified super-resolution model for processing, based on the user-defined per_batch value.
Image Upscale With Model Batched is an image super-resolution processing node that utilizes pre-trained AI models to upscale input images and enhance their resolution. Compared to native nodes, its core advantage lies in allowing users to set the sub-batch size, thereby effectively controlling VRAM usage. This makes it suitable for processing large batches of images or working at high resolutions.
Node Functionality
Technically, this node first converts the input image data into a tensor format suitable for model processing. It then feeds the images in batches into the specified super-resolution model for processing, based on the user-defined per_batch value. It supports multiple numerical precisions (e.g., float32, float16) to balance speed and quality. It also optionally scales down the results after upscaling, providing various downsampling algorithms such as nearest-exact and lanczos for selection.
Node Parameter Description - Image Upscale With Model Batched
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
upscale_model | UPSCALE_MODEL | Yes | - | - | Specifies the AI model used for image super-resolution upscaling. This parameter determines the algorithm and quality of image upscaling. |
images | IMAGE | Yes | - | - | Input the image(s) or batch of images to be upscaled. Supports processing single or multiple images simultaneously. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
per_batch | INT | Yes | 16 | 1 - 4096 (Step: 1) | Sets the number of images processed per batch, ranging from 1 to 4096. Used to control VRAM usage; this value can be lowered when processing large batches of images. |
downscale_method | COMBO | No | lanczos | "nearest-exact", "bilinear", "area", "bicubic", "lanczos" | - |
precision | COMBO | No | float32 | "float32", "float16", "bfloat16" | - |
downscale_ratio | FLOAT | No | 1.0 | 0.01 - 1.0 (Step: 0.01) | - |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| IMAGE | IMAGE | Outputs the image(s) after processing by the model for upscaling. |
Usage Scenarios
In an actual workflow, after obtaining a batch of low-resolution images from a "Load Image" node, you can connect this node and select a super-resolution model such as ESRGAN. By adjusting the per_batch parameter, you can avoid VRAM overflow when processing high-resolution images like 4K. Finally, the upscaled images are output to subsequent nodes like "Preview Image" or "Save Image" for viewing or storage.
Notes
Please note that the node's processing speed and quality are affected by the selected super-resolution model, batch size, and computational precision. A batch size that is too small may reduce processing efficiency, while a batch size that is too large may lead to insufficient VRAM.
Image Upscale With Model Batched Node Source Code Link
The Image Upscale With Model Batched node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.