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

p-image-lora

Text-to-image with a LoRA, but not your LoRA

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

    PrunaTextToImageLoRA (shown as p-image-lora) is the LoRA version of the pack's text-to-image node: same hosted API, same paid-per-image model, but with a lora_weights field that lets the model adopt a custom style. The catch, and it's a big one, is what "LoRA" means here.

    This is not your local LoRA ecosystem. You can't point this at a .safetensors file you trained or downloaded from CivitAI - there's no file path, no model folder, no local disk involved at all. The node takes a HuggingFace URL of the form huggingface.co/<username>/<repo>[/<filename>], and the README is explicit that the LoRA must have been trained with Pruna's own p-image-trainer. If you don't have a Pruna-trained LoRA sitting on HuggingFace, the field is dead weight. That's the honest framing: this node is for people inside Pruna's training loop, not for the wider community's LoRA library.

    What you set

    • prompt - same plain-English multiline input as p-image.
    • lora_weights - the HuggingFace URL above. This is the field that matters, and the default is literally huggingface.co/username/repo as a reminder.
    • lora_scale - influence of the LoRA, -1.0 to 3.0 in steps of 0.05, default 0.5. Start at the default; push toward 1.0+ if the style is too faint, and remember negative values push away from the style.
    • aspect_ratio - same seven options as the base node (1:1 default).
    • api_key - your Pruna key, or blank to use PRUNA_API_KEY.
    • hf_api_token (optional) - a HuggingFace token for private repos. Only sent to the API if you actually fill it in.

    Output is a single image socket, type IMAGE, ready for any Preview or Save node.

    How it works

    Same machinery as PrunaTextToImage - one POST to https://api.pruna.ai/v1/predictions, poll until done, download the image as a tensor. The only difference is the payload carries lora_weights and lora_scale alongside the prompt, so Pruna's server (not your machine) merges the adapter into the model before generating.

    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 the nodes appear under the pruna ai category. Dependencies are just requests and Pillow - nothing heavy, no model downloads. You still need a key from the Pruna developer portal.

    Where people get burned

    • Assuming any LoRA works. The single most common misunderstanding. Pruna-trained + HuggingFace URL, or it silently fails / ignores the adapter.
    • The placeholder default. Run it without touching lora_weights and you've asked for huggingface.co/username/repo, which won't resolve. Fill it in or don't use this node.
    • Same paid-per-image economics as p-image - plus you're billed for generations that don't do what you wanted while you tune lora_scale.

    It's a narrow node for a narrow audience. If you're using Pruna's trainer, it's exactly what you want. If you're not, the base PrunaTextToImage is the one that's actually useful to you.

    Categorypruna ai

    Inputs (7)

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

    Outputs (1)

    NameTypeDescription
    imageIMAGE