Comfy-Org / Comfy-Org/ComfyUI

[Bug] VAE Decode (Tiled) shifts color and contrast on images

Open
#500 8 comments 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 10h
Merged PRs (30d)
153

Description

This is an issue I noticed when using img2img to upscale and add detail to generated images. When either I manually add a `VAE Decode (Tiled)` node, or when the normal `VAE Decode` node hits a VRAM limit and automatically switches to a tiled mode, the resulting image will have a very noticiable shift in both saturation and contrast. See examples below (first is mine, second is from fellow user mxRoot):

Before | After
:-------------------------:|:-------------------------:
|
|

To further test how this effect may compond over multiple uses of this node, I created a workflow that would take an image from a file and run it through a chain of 9 pairs of encode and decode nodes on each combination (normal+normal, normal+tiled, tiled+normal, tiled+tiled). You can find the JSON for the workflow on the link below if you want to run the test yourself:

https://pastebin.pl/view/044d18da

![image](https://user-images.githubusercontent.com/5044664/231747113-0960c57a-e0ba-46cb-b407-5c44aabef5e1.png)

Here is the original image I created for the test:

![image-test](https://user-images.githubusercontent.com/5044664/231751345-4271aa38-8be5-4c31-b283-612731c8a1b9.png)

And here is an example of the resulting images after completing each chain:

![image](https://user-images.githubusercontent.com/5044664/231751482-7c6ab365-0776-4d8a-a71a-9a89fb9baffa.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.