OpenKatana · Photo file:
OpenKatanaImageFile brings a photo or other still image into your ComfyUI workflow so you can use it in later image-processing steps. Located in the OpenKatana/Media category, it lets you choose an available image or upload one, and supports skipping the image when the selection is empty. It applies any orientation correction recorded in the image’s EXIF metadata, helping camera photos appear the right way up, then converts the picture to standard three-channel RGB color. It also scales pixel values into the numerical format commonly used by ComfyUI image nodes. The node does not resize, crop, generate, or enhance the picture, making it a straightforward way to prepare an existing image while preserving its pixel dimensions, apart from dimensions exchanged by an orientation correction.
OpenKatana · Photo file Input Parameters:
image
A required COMBO[STRING] selection that identifies the image to load. You can choose from the image choices supplied by the extension or use the supported image-upload control. The available options are generated dynamically by input_choices('image'); the provided code does not show the exact list, accepted filename extensions, or an explicit default selection. Minimum and maximum values do not apply because this is a file selection rather than a number. Your selection determines which picture is opened through ComfyUI’s annotated file-path resolver. Although the interface marks this parameter as required, the loading method explicitly handles an empty selection by returning no image, so the field must exist but can represent a skipped image when the choice list and validation permit it. Validation is delegated to check_choice(image); its exact rules and error messages are not included in the supplied source.
OpenKatana · Photo file Output Parameters:
image
An IMAGE value containing the selected picture as a single-image, three-channel RGB tensor. Its shape is [1, height, width, 3]: the first dimension indicates one image, followed by its height, width, and red, green, and blue channels. Pixel values use 32-bit floating-point numbers scaled from 0 to 1 by dividing the converted RGB values by 255, making the result suitable for downstream ComfyUI nodes that accept IMAGE data. EXIF orientation is applied before conversion, so some pictures may have their width and height exchanged to match the corrected orientation. Grayscale images are converted to RGB, and any transparency channel is discarded rather than returned as a mask. The node performs no resizing. If the selection is empty and execution reaches the loading method, this output is None, not a blank or black image; any connected node must be able to handle that absence.
OpenKatana · Photo file Usage Tips:
- Choose or upload your image using the
imagecontrol, then connect theimageoutput to a node that accepts IMAGE data. This node has no additional quality, resolution, or processing settings to configure. - Use an empty selection only when the rest of your workflow supports a missing image. Skipping here does not automatically disable connected nodes or provide a replacement picture.
- For camera photos, check the preview before adding a rotation step. The node already applies EXIF orientation, so an additional manual rotation may turn an otherwise correctly oriented picture sideways.
- If you need transparency, use a separate loading method that preserves an alpha channel or provides a mask. This node converts everything to RGB and does not composite transparent areas onto a chosen background.
- Resize very large pictures beforehand, or add a resize node afterward if later processing needs smaller dimensions. Loading preserves the image’s dimensions, and the resulting float32 image data uses approximately
width × height × 3 × 4bytes, with additional memory needed during decoding and conversion. - Use another node for cropping, color adjustments, or image enhancement. OpenKatanaImageFile only loads and standardizes the picture; it does not offer controls for those operations.
OpenKatana · Photo file Common Errors and Solutions:
Image selection fails validation
- Explanation: The node validates the selection through
check_choice(image). Its implementation is not provided, so the exact rejection conditions and message cannot be confirmed; an unavailable or no-longer-valid selection is a possible cause. - Solution: Refresh the available choices and select the picture again, or upload it again. If you want to skip the image, use the empty choice offered by the interface rather than entering an arbitrary placeholder.
FileNotFoundError: [Errno 2] No such file or directory
- Explanation: The resolved image path does not point to an existing file. This can happen if a previously selected picture was moved, renamed, or deleted after the selection was saved.
- Solution: Upload the picture again or select an existing file from the current choices. If you moved the workflow to another ComfyUI installation, make sure the image is available there too.
PIL.UnidentifiedImageError: cannot identify image file
- Explanation: Pillow, the image-reading library used by this node, cannot recognize the selected file as a supported image. The file may be damaged, incomplete, or a different type of file with an image extension.
- Solution: Open the file in an image editor and export a fresh PNG or JPEG, then upload that copy. Changing only the filename extension does not convert the file’s contents.
OSError: image file is truncated
- Explanation: The image file appears incomplete or damaged, so Pillow cannot finish reading its pixel data. The precise message may include additional details about the unread data.
- Solution: Download, copy, or upload the original image again. If an image editor can open it successfully, export a new copy and select that copy in the node.
PermissionError: [Errno 13] Permission denied
- Explanation: ComfyUI cannot read the selected file because the operating system denies access to it or its containing folder.
- Solution: Upload a copy through ComfyUI or place it in a location that the ComfyUI process can read. If you manage the installation, check the file and folder permissions.
PIL.Image.DecompressionBombError: Image size exceeds limit
- Explanation: Pillow can reject unusually large images as a safety precaution. The full message normally includes the pixel count and limit; a related
DecompressionBombWarningmay appear for images that trigger a warning rather than an immediate failure. - Solution: Resize the picture in an image editor before uploading it. Prefer reducing the dimensions instead of disabling image-library safety limits.
MemoryError or an out-of-memory error while loading
- Explanation: A large image can require substantial system memory because the node decodes it, converts it to RGB, and creates floating-point image data. The exact message depends on which operation runs out of memory.
- Solution: Reduce the image’s pixel dimensions before loading it and close other memory-intensive applications. A smaller compressed file size alone does not guarantee lower memory usage if the pixel dimensions remain unchanged.
A downstream node reports a NoneType or missing-image error
- Explanation: An empty selection produces
None. The loader can therefore finish without supplying a usable image, while a connected node may fail because it expects actual pixel data. The exact error comes from that downstream node, not from a custom error in this loader. - Solution: Select a valid image, or bypass the image-dependent branch when skipping it. Do not treat the empty selection as a transparent, black, or default image.
