OCIO Read:
OCIORead is a node designed to facilitate the reading of image files while preserving their raw pixel data, bypassing any color space transformations. This node is particularly useful when you need to work with images in their original form without any alterations to their color information. It ensures that the pixel data is passed through untouched, which is crucial for tasks that require precise color fidelity. The node is part of the OpenColorIO (OCIO) framework, which is widely used in the film and visual effects industry for color management. By using OCIORead, you can seamlessly integrate images into your workflow, maintaining their integrity and ensuring that any subsequent color processing is based on the original data. This capability is essential for artists and developers who need to maintain control over the color pipeline and ensure consistency across different stages of production.
OCIO Read Input Parameters:
source
The source parameter specifies the file path of the image you wish to read. It is crucial as it determines the source of the pixel data that will be processed by the node. The path should be accurate and accessible to ensure the node can successfully read the image. There are no specific minimum or maximum values, but the path must be valid and point to an existing file.
frame_mode
The frame_mode parameter defines how frames are handled when reading image sequences. In the context of OCIORead, it is set to "single," indicating that the node processes a single frame at a time. This is particularly useful when dealing with still images or when you want to isolate a specific frame from a sequence.
input_colorspace
The input_colorspace parameter represents the color space of the input image. Although OCIORead operates in raw mode and ignores color spaces, this parameter is still required for validation purposes within ComfyUI. It ensures that the node's configuration is complete and adheres to the expected input structure.
output_colorspace
Similar to input_colorspace, the output_colorspace parameter is used for validation purposes. It specifies the intended color space for the output, even though the node does not perform any color space conversion in raw mode. This parameter helps maintain consistency in the node's configuration.
raw_data
The raw_data parameter is a boolean flag that, when set to True, indicates that the node should pass the pixel data through without any modifications. This is the core functionality of OCIORead, ensuring that the image data remains unaltered during the reading process.
start_frame
The start_frame parameter specifies the starting frame number when dealing with image sequences. In the context of OCIORead, it is set to 0, indicating the beginning of the sequence. This parameter is essential for workflows involving animations or multi-frame sequences.
end_frame
The end_frame parameter defines the ending frame number for image sequences. Like start_frame, it is set to 0 in OCIORead, which is relevant when processing single frames or when the sequence length is not a concern.
frame_shift
The frame_shift parameter allows you to offset the frame number by a specified amount. In OCIORead, it is set to 0, meaning no shift is applied. This parameter can be useful when synchronizing frames with other elements in a project.
missing_frames
The missing_frames parameter determines how the node handles missing frames in a sequence. In OCIORead, it is set to "black," meaning that any missing frames will be replaced with black frames. This ensures continuity in the sequence and prevents errors during playback or processing.
edge_mode
The edge_mode parameter specifies how the node handles the edges of the image. In OCIORead, it is set to "hold," which means that the edge pixels are held constant. This is important for maintaining the integrity of the image when transformations or effects are applied.
fps
The fps parameter stands for frames per second and is set to 0.0 in OCIORead. It is relevant when dealing with video sequences, as it defines the playback speed. In the context of single-frame processing, this parameter is not actively used.
OCIO Read Output Parameters:
class_type
The class_type output parameter indicates the type of node, which in this case is "OCIORead." This information is useful for identifying the node within a larger workflow or when debugging.
inputs
The inputs output parameter provides a dictionary of all the input parameters and their current values. This output is essential for verifying the node's configuration and ensuring that all parameters are set correctly before processing.
OCIO Read Usage Tips:
- Ensure that the
sourceparameter points to a valid and accessible file path to avoid errors during the reading process. - Use the
raw_dataparameter to maintain the original pixel data, especially when precise color fidelity is required. - Set the
missing_framesparameter to "black" to handle any missing frames gracefully, ensuring continuity in image sequences.
OCIO Read Common Errors and Solutions:
"missing 'src'"
- Explanation: This error occurs when the
sourceparameter is not provided or is empty, preventing the node from accessing the image file. - Solution: Ensure that the
sourceparameter is correctly set with a valid file path to the image you wish to read.
"RuntimeError: This node needs OpenColorIO. Install it: pip install opencolorio."
- Explanation: This error indicates that the OpenColorIO library is not installed, which is required for the node to function.
- Solution: Install the OpenColorIO library by running the command
pip install opencolorioin your terminal or command prompt.
