ComfyUI_frontend icon indicating copy to clipboard operation
ComfyUI_frontend copied to clipboard

Pasting an image alters the contrast

Open Koudkunstje opened this issue 3 weeks ago • 2 comments

I don't know if this is a front-end issue, but copy and pasting an image alters the contrast of the image.

How to reproduce:

  • Add 2 Load Image nodes
  • Load an image in the first Load image by using the 'Choose file to upload' button.
  • Open the image in your browser and then copy it.
  • Past the image in the second Load Image node.
  • Now you'll see that the image in the second Load Image node has lost contrast and is lighter of color.
Image

┆Issue is synchronized with this Notion page by Unito

Koudkunstje avatar Nov 25 '25 19:11 Koudkunstje

Hi @Koudkunstje! I'm Dosu and I’m helping the ComfyUI_frontend team.

This contrast change when pasting images is not caused by the ComfyUI front-end code. It's due to how browsers handle images on the clipboard: when you paste, the browser usually re-encodes the image (often as a new PNG or JPEG) and strips out metadata like color profiles, which can alter how the image looks—especially contrast and color fidelity. In contrast, uploading via the file selector or drag-and-drop preserves the original file and its metadata, so the image appears as intended. You can see more technical details about this clipboard behavior and its impact on image appearance here.

If color accuracy is important, use the file upload button or drag-and-drop instead of paste. If you want to experiment, try pasting in different browsers—results may vary depending on how each browser handles clipboard images. Let me know if you want to dig deeper into the backend or have other questions!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

dosubot[bot] avatar Nov 25 '25 19:11 dosubot[bot]

Ok, I see it's a browser issue (in my case Firefox). Copying and pasting from from disk doesn't alter the contrast and copying from with in ComfyUI doesn't alter the contrast. It's only from copying from the browser that alters the contrast.

I guess the problem is solved then.

Koudkunstje avatar Nov 25 '25 20:11 Koudkunstje