Get Prompt_Id
Get Prompt_Id — ComfyUI Node Guide
- promt_id
If you're clicking "Queue Prompt" in the browser and looking at pictures, you don't need this node. GetPromptId exists for the other kind of ComfyUI user: the one driving the server from outside, through the API, with some backend or bot that needs to know which job just ran.
What it actually does
Every time a workflow gets queued - whether you hit the button in the UI or POST to /prompt directly - ComfyUI's server hands that execution a unique ID, the prompt_id. That ID is how the system (and you) correlate "the job I just kicked off" with "the output that eventually lands in /history." Normally that ID is something only the server-side API response sees; the graph itself has no way to know its own name. GetPromptId's whole job is to reach into the currently-running execution and hand that ID back to you as a plain string, right there on the canvas, so you can route it wherever it's useful - most obviously into a callback that reports the job as done, which is exactly what this pack's sibling node, SuccessCallback, is built to receive.
It's a one-trick node, and the trick is genuinely useful if you're building anything that treats ComfyUI as a headless generation backend rather than a UI you sit in front of.
Inputs and outputs
There's really one control worth knowing about:
- seed (optional, INT, default
1) - has no effect on the ID itself. It's there because GetPromptId has no required inputs, and ComfyUI caches a node's output when none of its inputs change between runs. Without something to vary, you'd risk getting served a stale, cached prompt_id from a previous execution instead of the current one. Wire a random or incrementing value intoseed(or just leave it on its default and bump it manually if you're testing) to force a fresh execution every time you queue.
The output is promt_id (STRING) - yes, missing a "p," that's the pack's own spelling, not a typo on this page. Don't spend ten minutes wondering why your wire won't connect to a socket named "prompt_id"; it isn't spelled that way.
Installing it
Two options, same as almost any custom node:
- ComfyUI Manager - open the Manager, search for "Comfyui_Get_promptId," install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/xs315431/Comfyui_Get_promptId.git, then restart ComfyUI.
The README doesn't list any Python dependencies or model downloads, and there aren't any hiding in there either - this is about as light a custom node as you'll install. No pip install, no waiting on a multi-gigabyte checkpoint. Given how much of the custom-node ecosystem's pain comes from exactly that (conflicting requirements.txt files fighting over the same environment), that's a genuine point in its favor for a node this small.
Where it trips people up
The one real gotcha isn't in the README, it's in how ComfyUI decides what to execute at all. Look at the node's own schema and you'll see is_output_node: false - which matters more than it sounds like. ComfyUI's executor doesn't run every node sitting in your graph; it starts from nodes actually marked as outputs (SaveImage, PreviewImage, and similar) and works backward, only running what those outputs transitively depend on. GetPromptId isn't marked as an output itself, so if you drop it into a graph and don't wire promt_id into anything, ComfyUI may just prune it out of the run entirely - no error, it simply never fires.
The fix is the obvious one: connect promt_id to something that's actually part of the execution path - SuccessCallback's prompt_id input is the intended target, and chaining the two together is presumably the entire reason this pack ships them side by side. If you're using GetPromptId for something else, make sure that "something else" eventually leads to a real output node, or the ID you worked to grab never gets used.
Beyond that, there's not much community wear on this one to report - it's a small, low-traffic personal utility with no open issues or forum threads to speak of, so if something behaves unexpectedly, you're mostly debugging against the two-line README and the schema above.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| seedopt | INT | 11–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| promt_id | STRING | — |