Nodes/ComfyUI_PromptStudio/Prompt Studio Upscale
ComfyUI Node

Prompt Studio Upscale

The node that turns your upscale workflow into a Studio template

By tiko13·Created 2 months ago·Updated 6 days ago· 4
Prompt Studio Upscale
    • image
    • width
    • height
    • upscale_factor
    • prompt
    • secondary_instructions
    image_ref
    upscale_factor2.0
    prompt
    secondary_instructions

    Prompt Studio Upscale is what turns a regular upscaling workflow into a Prompt Studio upscaling template - and it's deliberately not an upscaler itself. It loads the image you want upscaled, tells your upscale pipeline how big the result should be, and passes along the prompt if you want conditioning. The actual upscaling is done by whatever model and nodes you already have in your workflow. This node is the plumbing that makes the Studio chat's Upscale button do something.

    A workflow containing this node gets listed as an upscaling template in Prompt Studio (that's how Studio sorts it into its Create/Edit/Upscale categories - see the pack README). Every generated image in the chat then has an Upscale action: pick a factor, and Studio injects the selected image plus the factor into this node and queues the workflow.

    How it works

    The node shares its image-loading machinery with Prompt Studio Image Source, then does the math:

    • image_ref - the JSON reference to the image being upscaled, injected by Prompt Studio. Same filename/subfolder/type reference format as the Image Source node, resolved safely against ComfyUI's storage folders.
    • upscale_factor - 1.0 to 16.0, default 2. It's used only to compute the target dimensions: width = round(source_width × factor), same for height. It's not a live-upscaling operation.

    Optional inputs prompt and secondary_instructions carry the source prompt through (Studio fills prompt when "Use prompt when upscaling" is on). Outputs, all six of them:

    • image - the loaded source image, wired into your upscale model / sampler.
    • width, height - INT target dimensions, wired wherever the upscale model needs target sizing.
    • upscale_factor - the factor, echoed back, in case a node wants it.
    • prompt, secondary_instructions - STRING pass-throughs for conditioning if your upscale pass re-encodes text.

    A typical template: this node's image into an upscaler, its width/height into the upscale model's resolution inputs, its prompt into a text encoder, then a save node. Keep exactly one image output in the workflow and save it with a [PS] prefix.

    Installing it

    It ships with Prompt Studio:

    cd ComfyUI/custom_nodes
    git clone https://github.com/tiko13/ComfyUI_PromptStudio
    

    Restart ComfyUI, or install "ComfyUI_PromptStudio" via ComfyUI Manager. No pip dependencies, and this node doesn't call the LLM server - it's pure image plumbing.

    Where people get burned

    • "It didn't upscale anything." Right - it doesn't. You still need an actual upscaler (a Real-ESRGAN-class model, a detailer, whatever) in the workflow. This node only feeds it the image and the target size.
    • Factor out of range. The node hard-rejects factors below 1 or above 16, with a clear validation message. Don't try to downscale with a factor under 1.
    • Editing workflows and upscaling workflows get confused. Prompt Studio classifies a workflow by which attachment nodes it contains. If your editing workflow accidentally includes an Upscale node, it'll be mislisted as an upscaling template. Keep the node types scoped to what each workflow actually does.
    CategoryKoboldCpp

    Inputs (4)

    NameTypeDefaultDescription
    image_refSTRINGInjected by Prompt Studio. References the image selected for upscaling.
    upscale_factorFLOAT2.01–16Injected by Prompt Studio and used to calculate the target width and height.
    promptoptSTRINGThe source image prompt when Use prompt when upscaling is enabled.
    secondary_instructionsoptSTRINGOptional phrases returned unchanged through the secondary_instructions output, such as LoRA trigger words.

    Outputs (6)

    NameTypeDescription
    imageIMAGE
    widthINT
    heightINT
    upscale_factorFLOAT
    promptSTRING
    secondary_instructionsSTRING