⚡ Latent Motion Sharpener:
The LatentMotionSharpener node is designed to enhance the clarity of images by applying motion-adaptive spatial sharpening. This node is particularly useful in scenarios where images are part of a sequence, such as video frames, and there is a need to sharpen them based on the motion detected between frames. The sharpening is adaptive, meaning it adjusts according to the magnitude of motion detected between frames, ensuring that areas with more motion receive more sharpening. This approach helps in maintaining the natural look of the image while enhancing details, especially in dynamic scenes. The node is intended to be used before the LatentTemporalUpsampler to ensure optimal results.
⚡ Latent Motion Sharpener Input Parameters:
latent
The latent parameter is the primary input for the node, representing the latent space data that needs to be sharpened. This data is typically a multi-dimensional tensor containing the image or video frame information.
base_sharpen
The base_sharpen parameter controls the baseline level of sharpening applied to the image. It is a float value with a default of 0.08, a minimum of 0.0, and no specified maximum. This parameter sets the foundational sharpening level before any motion-based adjustments are applied.
motion_sharpen
The motion_sharpen parameter determines the additional sharpening applied based on the detected motion between frames. It is a float value with a default of 0.55, a minimum of 0.0, and a maximum of 2.0. This parameter allows for increased sharpening in areas with significant motion, enhancing details in dynamic scenes.
motion_thresh
The motion_thresh parameter sets the threshold for motion detection, influencing when additional sharpening should be applied. It is a float value with a default of 0.04, a minimum of 0.0, and a maximum of 0.5. This threshold helps in distinguishing between static and dynamic areas, ensuring that only areas with sufficient motion are sharpened further.
temporal_smooth_mask
The temporal_smooth_mask is a boolean parameter that, when enabled, applies a smoothing mask over time to the motion map. This helps in reducing noise and ensuring a more consistent sharpening effect across frames. The default value is True.
⚡ Latent Motion Sharpener Output Parameters:
latent
The output latent parameter is the processed latent space data with enhanced sharpness. This output retains the original structure of the input but with improved clarity and detail, particularly in areas with detected motion. The sharpening effect is adaptive, ensuring that the output maintains a natural appearance while highlighting important details.
⚡ Latent Motion Sharpener Usage Tips:
- Use the
base_sharpenparameter to set a general sharpening level that suits your overall image quality needs before adjusting for motion. - Adjust the
motion_sharpenparameter to enhance details in areas with significant motion, but be cautious of over-sharpening, which can lead to unnatural artifacts. - Set the
motion_threshparameter to a level that effectively distinguishes between static and dynamic areas in your specific sequence to optimize sharpening. - Enable
temporal_smooth_maskto ensure consistent sharpening across frames, especially in sequences with varying motion.
⚡ Latent Motion Sharpener Common Errors and Solutions:
"Expected 5D, got {samples.shape} - passthrough"
- Explanation: This error occurs when the input latent data does not have the expected five-dimensional shape, which is necessary for processing.
- Solution: Ensure that the input data is correctly formatted as a five-dimensional tensor, typically representing batch size, channels, frames, height, and width.
"MotionSharpener output: {result.shape} does not match input shape"
- Explanation: This error indicates a mismatch between the shape of the output data and the expected shape based on the input.
- Solution: Verify that all input parameters are set correctly and that the input data is properly structured to avoid shape mismatches during processing.
