ComfyUI/web/scripts
Michael Abrahams 6f70227b8c Add support for pasting images into the graph
It can be useful to paste images from the clipboard directly into the node graph.
This commit modifies copy and paste handling to support this.

When an image file is found in the clipboard, we check whether an image node is selected.
If so, paste the image into that node. Otherwise, a new node is created.
If no image data are found in the clipboard, we call the original Litegraph paste.
To ensure that onCopy and onPaste events are fired, we override Litegraph's ctrl+c and ctrl+v handling.

Try to detect whether the pasted image is a real file on disk, or just pixel data copied from e.g. Photoshop.
Pasted pixel data will be called 'image.png' and have a creation time of now.
If it is simply pasted data, we store it in the subfolder /input/clipboard/.

This also adds support for the subfolder property in the IMAGEUPLOAD widget.
2023-09-03 12:08:04 -04:00
..
api.js add system stats function 2023-08-04 08:29:51 +01:00
app.js Add support for pasting images into the graph 2023-09-03 12:08:04 -04:00
defaultGraph.js Change the default prompt to something more impressive. 2023-04-08 01:10:15 -04:00
logging.js add logging 2023-08-04 08:30:01 +01:00
pnginfo.js Add CheckpointSave node to save checkpoints. 2023-06-26 12:22:27 -04:00
ui.js Display history in reverse order to make it easier to load last gen. 2023-09-02 15:49:16 -04:00
widgets.js Add support for pasting images into the graph 2023-09-03 12:08:04 -04:00