ComfyUI_frontend icon indicating copy to clipboard operation
ComfyUI_frontend copied to clipboard

Show dropped image in output node

Open bezo97 opened this issue 1 year ago • 2 comments

Closes #497 feature request.

Implementation details:

  • blob url and node id are optional parameters in loadGraphData
  • sets the preview image on ~~all SaveImage nodes~~ the original node it was saved by
  • using the output_node_id metadata when present
  • works for any dropped png or webp, also from the queue
  • PR does not include persistence of queue history

For reviewers:

  1. Drop an image that contains workflow metadata with a SaveImage node
  2. See dropped image in the node preview

bezo97 avatar Oct 07 '24 19:10 bezo97

See https://github.com/Comfy-Org/ComfyUI_frontend/issues/497#issuecomment-2397670656

This solution has a few missing parts:

  • Only handles image output
  • Only populte Preview Image and Save Image nodes
  • Blindly populates all Preview Image and Save Image nodes

huchenlei avatar Oct 07 '24 19:10 huchenlei

Thanks for your review @huchenlei. Here's a task list based on the discussed:

  • [ ] Save output node id in metadata: https://github.com/comfyanonymous/ComfyUI/pull/5235
  • [x] Should work with any node, not just SaveImage and PreviewImage
  • [x] Only populate the node it was saved by
  • [ ] Handle audio output as well

Persisting the queue history would be a way bigger task so I'm going with your 2nd suggestion ("single asset that has workflow as metadata back to correct output node")

bezo97 avatar Oct 13 '24 15:10 bezo97

Closing for inactivity.

huchenlei avatar Apr 16 '25 23:04 huchenlei