Giter VIP home page Giter VIP logo

comfyui-hq-image-save's Introduction

ComfyUI-HQ-Image-Save

Nodes:

  • Image
    • Load EXR (Individual file, or batch from folder, with cap/skip/nth controls in the same pattern as VHS load nodes)
    • Save EXR (RGB or RGBA 32bpc EXR, with full support for batches and either relative paths in the output folder, or absolute paths with version and frame number formatting, and overwrite protection)
    • Save Tiff (RGB 16bpc TIFF, needs update to match SaveEXR functionality)
  • Latent
    • Load Latent EXR (Same VHS style controls now)
    • Save Latent EXR (4 channel latent -> RGBA 32bpc EXR)

Overview

Save and load images and latents as 32bit EXRs

Recommend adding the --fp32-vae CLI argument for more accurate decoding.

Scatterplot of raw red/green values, left=PNG, right=TIFF. PNG quantizes the image to 256 possible values per channel (2^8), while the TIFF has 65,536 possible values per channel (2^16)

comparison

For latent EXR viewing purposes, if you want a cheap approximation of RGB values from the four latent channels, use this formula:

r = (0.298 * r + 0.187 * g - 0.187 * b - 0.184 * a) * 0.18215
g = (0.207 * r + 0.286 * g + 0.189 * b - 0.271 * a) * 0.18215
b = (0.208 * r + 0.173 * g + 0.264 * b - 0.473 * a) * 0.18215

Known Issues

  • No workflow metadata is saved to the TIFF or EXR images
  • No load TIFF node yet

If you get this error OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. To fix it, you need to set an environment variable. The nodes.py should be setting it automatically, but if not, you can manually add it to your ComfyUI startup script.

On windows, run_nvidia_gpu.bat (etc) add this line at the top of the batch script:
set OPENCV_IO_ENABLE_OPENEXR=1

On linux, it should be:
export OPENCV_IO_ENABLE_OPENEXR=value (untested)

comfyui-hq-image-save's People

Contributors

spacepxl avatar woshin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.