Decompress HDR from VAE output, tonemap for preview, optionally save EXR. Place after VAE Decode in an HDR IC-LoRA workflow. Recovers linear HDR values from the compressed latent space and tonemaps them to SDR for display. When ``save_exr`` is enabled, also writes the raw linear HDR
| 86 | |
| 87 | @comfy_node(name="LTXVHDRDecodePostprocess") |
| 88 | class LTXVHDRDecodePostprocess: |
| 89 | """Decompress HDR from VAE output, tonemap for preview, optionally save EXR. |
| 90 | |
| 91 | Place after VAE Decode in an HDR IC-LoRA workflow. Recovers linear HDR |
| 92 | values from the compressed latent space and tonemaps them to SDR for |
| 93 | display. When ``save_exr`` is enabled, also writes the raw linear HDR |
| 94 | frames as an EXR image sequence. |
| 95 | make sure to set OPENCV_IO_ENABLE_OPENEXR=1 environment in the command line # Must be set before cv2 import |
| 96 | |
| 97 | |
| 98 | Outputs: |
| 99 | tonemapped: SDR preview [0, 1] after Reinhard tonemap + sRGB gamma. |
| 100 | hdr_linear: Raw linear HDR values [0, inf) for further processing. |
| 101 | """ |
| 102 | |
| 103 | @classmethod |
| 104 | def INPUT_TYPES(s): |
| 105 | return { |
| 106 | "required": { |
| 107 | "image": ("IMAGE",), |
| 108 | }, |
| 109 | "optional": { |
| 110 | "exposure": ( |
| 111 | "FLOAT", |
| 112 | { |
| 113 | "default": 0.0, |
| 114 | "min": -10.0, |
| 115 | "max": 10.0, |
| 116 | "step": 0.1, |
| 117 | "display": "slider", |
| 118 | "tooltip": ( |
| 119 | "Exposure in stops (EV). 0 = no change, " |
| 120 | "+1 = 2x brighter, -1 = half brightness." |
| 121 | ), |
| 122 | }, |
| 123 | ), |
| 124 | "save_exr": ( |
| 125 | "BOOLEAN", |
| 126 | { |
| 127 | "default": False, |
| 128 | "tooltip": "Save raw linear HDR frames as EXR sequence.", |
| 129 | }, |
| 130 | ), |
| 131 | "output_dir": ( |
| 132 | "STRING", |
| 133 | { |
| 134 | "default": "output/hdr_exr", |
| 135 | "tooltip": ( |
| 136 | "Directory for EXR frames (relative to ComfyUI " |
| 137 | "output directory, or absolute path)." |
| 138 | ), |
| 139 | }, |
| 140 | ), |
| 141 | "filename_prefix": ( |
| 142 | "STRING", |
| 143 | {"default": "frame"}, |
| 144 | ), |
| 145 | "half_precision": ( |
nothing calls this directly
no outgoing calls
no test coverage detected