Views
No views yet

ComfyUI/custom_nodes folder with git clone https://github.com/palant/image-resize-comfyui and restart ComfyUI.resize only mode, the image will only be resized while keeping its side ratio. The side_ratio setting is ignored then.crop to ratio mode, parts of the image will be removed after resizing as necessary to make its side ratio match side_ratio setting.pad to ratio mode, transparent padding will be added to the image after resizing as necessary to make its side ratio match side_ratio setting.smaller_side set, the target size is determined by the smaller side of the image. E.g. with the action being resize only and the original image being 512x768 pixels large, smaller_side set to 1024 will resize the image to 1024x1536 pixels.larger_side set, the target size is determined by the larger side of the image. E.g. with the action being resize only and the original image being 512x768 pixels large, larger_side set to 1024 will resize the image to 683x1024 pixels.scale_factor can be set as an explicit scaling factor. Values below 1.0 will reduce image size, above 1.0 increase it.reduce size only mode, images already smaller than the target size will not be resized. In the increase size only mode, images already larger than the target size will not be resized. The any mode causes the image to be always resized, regardless of whether downscaling or upscaling is required.action setting enables cropping or padding of the image, this setting determines the required side ratio of the image. The format is width:height, e.g. 4:3 or 2:3.512:768. You then set smaller_side setting to 512 and the resulting image will always be 512x768 pixels large.0.0 means that only the right/bottom side is cropped. The value 1.0 means that only left/top side is cropped. The value 0.3 means that 30% are being cropped on the left/top side and 70% on the right/top side.0.0 means that all padding is inserted on the right/bottom side. The value 1.0 means that all padding is inserted on the left/top side. The value 0.3 means that 30% of the padding are inserted on the left/top side and 70% on the right/top side.