WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.15k stars 170 forks source link

Respect exif transpose #138

Closed mastfissh closed 1 year ago

mastfissh commented 1 year ago

Currently if you have images that store their rotation as exif attributes (very common for photos from smartphones), and you load it as a batch, it will not respect those attributes.

This changes it so that they will have the correct rotation.

WASasquatch commented 1 year ago

Did you test it? I tried to add transpose for my Samsung but the images were coming out rotated 90 degrees

mastfissh commented 1 year ago

Yup - I have a bunch of photos that I've been using for img2img, and without this patch a fair few of them come out sideways or upside down when loaded as a batch, but not through the original comfyUI image load.

With this patch, the images have the same orientation as windows photo viewer, the windows file viewer, and the original image loader node from comfyUI; see https://github.com/comfyanonymous/ComfyUI/blob/master/nodes.py#L1264 .

WASasquatch commented 1 year ago

With this patch, the images have the same orientation as windows photo viewer, the windows file viewer, and the original image loader node from comfyUI; see https://github.com/comfyanonymous/ComfyUI/blob/master/nodes.py#L1264 .

Oh that's newly added. I based off that node originally. Weird, when I tried this it was giving me sideways images, though I don't remember simply passing the image.