Nodes/comfyui-pruna/p-image-edit-lora
ComfyUI Node

p-image-edit-lora

Hosted image editing with a LoRA, bound to Pruna's own trainer

By PrunaAI·Created 4 months ago·Updated 4 months ago· 0
p-image-edit-lora
  • image
  • image
prompt
modelp-image-edit-lora
lora_weightshuggingface.co/username/repo
lora_scale0.50
aspect_ratiomatch_input_image
api_key
hf_api_token

PrunaImageEditLoRA (shown as p-image-edit-lora) is PrunaImageEdit plus a style adapter: you hand it an image and an instruction, and it edits with a custom LoRA steering the look. Everything about the base edit node applies here - hosted API, paid per run, image uploaded to Pruna's servers and downloaded back as an IMAGE tensor. The only new part is lora_weights, and that's where the fine print lives.

Exactly like the pack's text-to-image LoRA node, this is not the local LoRA ecosystem. The lora_weights field wants a HuggingFace URL in the shape huggingface.co/<username>/<repo>[/<filename>], and the adapter must have been trained with Pruna's own p-image-edit-trainer. A CivitAI .safetensors you downloaded or a local file path won't work - the model runs on their servers, so the LoRA has to be reachable by their servers. If you're not training with Pruna's tooling, this node has nothing to offer you.

What you set

  • image - the image to edit, any IMAGE socket.
  • prompt - the edit instruction, plain English.
  • lora_weights - the HuggingFace URL (default is the placeholder huggingface.co/username/repo - fill it in).
  • lora_scale - adapter strength, -1.0 to 3.0, default 0.5. Negative values steer away from the style.
  • aspect_ratio - dropdown with match_input_image default (keeps the source's ratio) plus the seven fixed options.
  • api_key - Pruna key or PRUNA_API_KEY env var.
  • hf_api_token (optional) - only needed if the repo is private; sent to the API only when non-empty.

Output is a single image socket, type IMAGE.

How it works

The node uploads your image to Pruna's files API as a PNG, then POSTs the instruction, image URL, lora_weights and lora_scale to /v1/predictions. Pruna's server merges the adapter, edits, and you poll until the job returns, then the image is downloaded back into a tensor. All the LoRA math happens on their side - which is the entire reason the LoRA has to be hosted on HuggingFace in the first place.

Install

ComfyUI Manager → search ComfyUI Pruna API → Install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/PrunaAI/comfyui-pruna-api
pip install -r comfyui-pruna-api/requirements.txt

Restart and you'll find it under pruna ai. Dependencies are only requests and Pillow; a key from the Pruna developer portal is the real requirement.

Where people get burned

  • The same LoRA trap as the pack's other LoRA node: Pruna-trained LoRA on HuggingFace, or nothing. Pointing it at a local file or a random CivitAI download is the classic first-run failure.
  • The placeholder default. Leave lora_weights untouched and it tries to resolve huggingface.co/username/repo, which fails.
  • Batch images: like PrunaImageEdit, the upload path edits only the first image in a batch. Loop singles.
  • Every run is billed, including the runs where the LoRA wasn't loaded and you're wondering why the style is missing.

Honestly? This is the most niche node in the pack: hosted editing already requires trusting Pruna with your images, and the LoRA requirement narrows it to people using their trainer. If that's you, great. If not, plain PrunaImageEdit is the version with any real reach.

Categorypruna ai

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
promptSTRING
modelCOMBOp-image-edit-lora1 options: p-image-edit-lora
lora_weightsSTRINGhuggingface.co/username/repo
lora_scaleFLOAT0.50-1–3
aspect_ratioCOMBOmatch_input_image8 options: match_input_image, 1:1, 16:9, 9:16, 4:3, 3:4, +2
api_keySTRING
hf_api_tokenoptSTRING

Outputs (1)

NameTypeDescription
imageIMAGE