p-image-edit
Text-instruction image editing, with the whole model living on someone else's GPU
- image
- image
PrunaImageEdit (shown as p-image-edit) is the pack's hosted image editor: you give it an image and a plain-English instruction - "make the background a rainy city street", "turn this into a watercolor" - and Pruna's API sends back an edited image. It's the same pay-per-run idea as the pack's text-to-image node, but with an upload step: your image leaves your machine, gets edited on their servers, and comes back as a normal IMAGE tensor.
The pitch is exactly the one that makes any hosted node attractive: the model is closed-source, runs on Pruna's GPUs, and needs zero VRAM and zero setup from you. The instruction-edit category is genuinely useful in a ComfyUI workflow - it's the "second opinion from a different model family" pass you drop after a generation you mostly like but want reimagined - and it's the sort of thing local setups usually reach for Qwen-Edit or an inpainting pass to do. Here you get it with one node and a key instead of a model download and a VRAM budget. The trade-off is that it's a paid API, so a full "edit every image in a batch" habit adds up fast.
What you set
image- any IMAGE. Load it from disk, or wire it straight off a generation/upscale node and edit the result.prompt- the edit instruction, multiline. Plain descriptive English.aspect_ratio- a dropdown with a special default:match_input_imagekeeps the source's proportions. The other seven (1:1…2:3) force a specific output shape instead.model- single choice,p-image-edit.api_key- Pruna key, or blank to use thePRUNA_API_KEYenv var.
Output is one image socket, type IMAGE, straight into Preview or Save.
How it works
Two calls under the hood. First the node uploads your image to Pruna's files API (/v1/files) as a PNG and gets back a URL; then it POSTs a payload with your prompt, that image URL, and the aspect ratio to /v1/predictions. It polls until the job is done (every 3 seconds, up to a 5-minute cap) and downloads the result back into a tensor. Worth knowing: your image is PNG-encoded and re-decoded on their side, so there's a small quality round-trip, and the output is whatever resolution the model settles on - match_input_image keeps the ratio, not necessarily the exact pixel count.
One gotcha straight from the source code: if you feed the node a batch of images, it quietly edits only the first one. The upload path takes tensor[0] and ignores the rest. Loop over single images rather than expecting batch handling.
Install
ComfyUI Manager → search ComfyUI Pruna API → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/PrunaAI/comfyui-pruna-api
pip install -r comfyui-pruna-api/requirements.txt
The requirements are just requests and Pillow - nothing heavy lands on your disk, because everything heavy happens on their servers. Grab a key from the Pruna developer portal.
Where people get burned
- No key, no upload, no edit. Missing key gives you "No Pruna API key provided"; a 401/403 means the key's bad. Check that before anything else.
- Edits cost money per run, and unlike a local img2img pass you can't iterate for free. Tune your prompt deliberately, not by brute force.
- Upload failures surface as "Pruna file upload failed" with an HTTP code - usually a network issue or an expired key rather than anything you did wrong in the graph.
- Batch inputs are silently truncated to one image (see above). If only one image out of several comes back edited, that's why.
The verdict: a clean, zero-local-cost way to put an instruction editor in your graph. It won't replace a local Qwen-Edit workflow if you already have one tuned - but if you don't have the GPU for that, this is a genuinely useful stand-in.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | — | |
| model | COMBO | p-image-edit | 1 options: p-image-edit |
| aspect_ratio | COMBO | match_input_image | 8 options: match_input_image, 1:1, 16:9, 9:16, 4:3, 3:4, +2 |
| api_key | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |