ComfyUI Node

Krita Output

Send a generated result back onto the Krita canvas

By Acly·Created 3 years ago·Updated about a month ago· 667
Krita Output
  • images
    x0
    y0
    name
    batch_modedefault
    resize_canvasfalse

    The return trip. Where ETN_KritaCanvas reads your Krita canvas into ComfyUI, ETN_KritaOutput takes the finished generation and puts it back onto the canvas - as a layer, at a specific position, optionally growing the canvas to fit. It's the delivery node in the Krita side of Acly's tooling-nodes pack, and like its sibling it's meant to be driven by the Krita AI Diffusion plugin rather than assembled by hand.

    That plugin is the reason these nodes exist: it turns ComfyUI into a paint-app backend, and for a lot of people it's the most comfortable way to use Stable Diffusion at all - generate, inpaint, and upscale without ever leaving Krita. This node is the last step of any of those operations, the moment the AI result lands as pixels you can keep painting on.

    How it works

    It's an output node - a terminal in the graph, no output sockets - because its job is a side effect: hand the image back to Krita. When the plugin's workflow finishes, this node ships the result to the plugin, which creates or updates a layer at the x/y position with the given name. The batch_mode setting governs how multiple images in a batch are delivered, and resize_canvas decides whether the canvas expands to accommodate an output that lands outside the current bounds (handy for outpainting-style operations).

    The positioning inputs are what make this more than "save the image." Because generation in the plugin often operates on a selection or a region rather than the whole canvas, the result has to go back exactly where it came from - hence the explicit x/y offset, which typically matches the offset a Krita Selection node reported on the way in.

    The inputs and outputs that matter

    • images (IMAGE) - the generated result to send back. Wire your VAE Decode in. Batches are supported.
    • x / y (INT, default 0) - where the top-left of the image lands on the canvas. For a region/inpaint result, these match the selection's offset so it drops back in place.
    • name (STRING) - the layer name the plugin creates. Leave blank for the default.
    • batch_mode (COMBO, default default) - how a batch of results is handed back (e.g. as separate layers vs the default handling). Leave at default unless you're doing batch work.
    • resize_canvas (BOOLEAN, default false) - expand the Krita canvas if the output extends past its edges. Turn on for outpainting; off keeps the canvas fixed.

    No outputs - it's a terminal.

    How to install it

    Part of the tooling-nodes pack. ComfyUI Manager: search ComfyUI Nodes for External Tooling, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Acly/comfyui-tooling-nodes.git
    

    then restart. To use it as intended, install the Krita AI Diffusion plugin on the Krita side - it's what receives what this node sends.

    Common issues & troubleshooting

    Nothing appears in Krita. This node delivers to the Krita plugin over the plugin's connection, not to a file. If you're running the graph in plain ComfyUI with no plugin listening, there's nowhere for the result to go - use a Save Image node to test the workflow standalone.

    The result lands in the wrong place. Check x/y. For a region generation, these should equal the offset the input side reported (from a Krita Selection or the canvas). Mismatched offsets put the layer in the wrong spot.

    Outpainted area gets cut off. Turn on resize_canvas so Krita grows to fit content that extends beyond the current bounds. With it off, anything past the edge is clipped.

    Categorykrita

    Inputs (6)

    NameTypeDefaultDescription
    imagesIMAGE
    xINT0
    yINT0
    nameSTRING
    batch_modeCOMBOdefault4 options: default, images, animation, layers
    resize_canvasBOOLEANfalse

    Outputs (0)

    No outputs