Load Image Comal
Paste or Drag an Image Straight Into a ComfyUI Node — No File Dialog
- IMAGE
- MASK
The dumbest recurring chore in ComfyUI is getting an image in. You screenshot something, alt-tab over, click the little folder icon, hunt through your input directory, and maybe re-upload. This node ("Load Image Comal" on the canvas) kills that whole dance: you copy an image to your OS clipboard - or drag a file onto the node - and it just appears, ready to wire into the rest of the graph. If you do inpainting, img2img, or face swaps, you'll want it on day one.
It's the image half of the comal-node_clipboard-bridge pack, a small four-node suite that turns your OS clipboard into a live input bus for ComfyUI. No model downloads, no keys, no API calls - it's pure plumbing, the kind of node that lives in the "why doesn't this ship by default" category.
How it works
The pack starts a background watcher thread the moment ComfyUI boots. Every half-second it checks the OS clipboard; when it finds a new image it saves it to ComfyUI/input/clipboard/clip_<timestamp>.png and pushes a clipboard.image event to the browser. The node's front-end extension picks that up, and any ClipboardImageBridge with its listen switch flipped on shows the image and stores it in a small history.
On the Python side, load() resolves a file path and turns it into a proper IMAGE tensor. No image available yet? It returns a plain 512×512 black placeholder rather than crashing - which is handy for building a workflow before you've actually copied anything.
The inputs and outputs that matter
The one you set is listen (default OFF - flip it to "Listening"). Everything else is either hidden or you can leave it alone:
listen- the ON/OFF switch that decides whether this node reacts to the clipboard.image_path/image- where the image lives under your input directory; the front-end fills these for you, they're hidden from view.history_json/history_index- hidden bookkeeping for the Undo/Redo buttons.
Outputs are the two things ComfyUI image work is built from:
IMAGE- wire this intoVAE Encode,Image To Latent, or any node that takes an image tensor.MASK- if your pasted image has an alpha channel, this is it (inverted, so the painted area is the mask). Plug it into an inpaint sampler or a mask combine. No alpha? You get an all-zero mask, which is exactly what "no selection" should be.
The node also shows a live preview of the current image, and gives you ◀ Undo / Redo ▶ buttons for the last 5 clipboard images.
Installing it
ComfyUI Manager is the easy path: Install via Git URL → https://github.com/comal0731/comal-node_clipboard-bridge. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/comal0731/comal-node_clipboard-bridge
cd comal-node_clipboard-bridge
pip install -r requirements.txt
Then restart ComfyUI and do one hard browser refresh (Ctrl+Shift+R) - the extension won't load from cache otherwise. Dependencies are just pillow and pyperclip; no models. Note the README tells you to install pywin32 for Windows, but the shipped code never imports it - the clipboard sequence detection uses Python's built-in ctypes, so don't sweat that step.
Where people get burned
listenstarts OFF, every time. If you paste and nothing happens, check the switch first. It's a deliberate safety default.- This is a Windows-first node. The watcher leans on
ImageGrab.grabclipboard()and the Windows clipboard API; on macOS/Linux image detection may simply not fire. Text usually works; images are the dicey part. - Copies made inside ComfyUI are filtered out. The extension tracks a ~2-second window after any in-page Ctrl+C, so if you just copied something inside ComfyUI and paste immediately, it's blocked. Copy from another app, or turn on "Allow Comfy Image" in the Global Options node.
- Paste needs the node selected; drop needs the cursor over it. If a silent nothing happens, click the node itself first - the console logs explain exactly why it ignored you.
It's a niche pack from a new author, so don't expect a big community trail - but for the inpainting-and-img2img crowd this node is quietly the most useful thing in it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| listen | BOOLEAN | false | — |
| image_path | STRING | — | |
| history_json | STRING | [] | — |
| history_index | INT | 0 | — |
| imageopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |