Jpeg compression artifacts in unmasked areas of image2image generation #1779
Replies: 1 comment 6 replies
-
I know what you are talking about, but it is not related to jpeg compression if we are talking about the same thing, it doesn't even use jpeg format, the image used in the nodes is an uncompressed matrix of pixels. For masked image to image you need to use the ImageCompositeMasked node after to filter the masked area, the KSampler does alter a little bit the parts not masked, for one generation it isn't that noticeable but if you do multiple generations you will see it. I noticed it on my workflow for upscaled inpaint of masked areas, without the ImageCompositeMasked there is a clear seam on the upscaled square, showing that the whole square image was altered, not just the masked area, but adding the ImageCompositeMasked solved the problem, making a seamless inpaint. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm doing a lot of iterative image2image generation with masks, and I've noticed that the areas of the image which should stay the same are instead degrading with each generation. It looks like they're undergoing repeated lossy jpeg compression. Is there a way to force ComfyUI to use a lossless image format during this stage? My current workflow has me manually cutting the newly generated image sections into an uncompressed version of the original image with a photo editor and it adds a lot of extra time.
Here's a dark region of an image generated within ComfyUI:

And here's that same region after several generations of image2image

Beta Was this translation helpful? Give feedback.
All reactions