Nodes/ComfyUI-Infinite-Canvas/画布文本输入 📝
ComfyUI Node

画布文本输入 📝

One text box, one string, done

By zml-w·Created 10 months ago·Updated 9 months ago· 6
画布文本输入 📝
    • STRING
    text

    CanvasTextInput is a multiline text box that outputs exactly the text you type. That's it. It doesn't tokenize, it doesn't interpolate, it doesn't even trim whitespace - process() returns the string and the node is done. If that feels like a scam, you're not wrong, but there's a reason it ships in this pack.

    Why a node this dumb exists

    This pack is the backend half of the Infinite Canvas frontend - a separate app that turns ComfyUI into a zoomable, boundless canvas where you keep generating and outpainting outward. For that to work, the frontend needs to push and pull values through the graph, as wires, not as widgets buried inside other nodes. CanvasTextInput is the prompt channel: the frontend reads it, writes to it, and whatever text you drop in flows into the model.

    The practical use in an ordinary workflow is the same one ComfyUI veterans know from Primitive nodes: wire the STRING output into a CLIP Text Encode text input so one prompt box feeds an encoder, or fan one prompt out to several encoders from a single source. Change it once, every consumer updates. No more editing the same sentence in four places.

    Inputs and outputs

    Only two things exist on this node:

    • text - a multiline STRING widget, default empty. Set your prompt here, or let the frontend set it.
    • STRING output - whatever you typed, byte for byte.

    An empty box gives you an empty string, so don't wire this into a positive prompt and wonder why the image is garbage - a blank prompt is a blank prompt, and it'll show.

    When you don't need it

    If you're not using the Infinite Canvas frontend, skip the extra install and use ComfyUI's built-in equivalent: right-click the text input on any CLIP Text Encode → Convert widget to input, then drop a Primitive onto the new socket. Same single-source-of-truth behavior, zero new nodes. CanvasTextInput exists to make the frontend's job easier, not to solve a problem the stock UI can't.

    Install

    Standard for a custom node pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/zml-w/ComfyUI-Infinite-Canvas
    

    Then restart ComfyUI. ComfyUI Manager installs it too - search for "ComfyUI-Infinite-Canvas". The requirements (opencv-python, imageio-ffmpeg) get pulled in automatically; this node itself barely uses any of it, but the pack won't import without them.

    One thing this pack genuinely needs: add --enable-cors-header to ComfyUI's startup args (the README shows the exact command line). It's how the Infinite Canvas frontend talks to the backend. If you're only using the nodes in the stock UI you can skip the flag, but plan to run it if you ever try the frontend. Note that in ComfyUI the node shows up in the Chinese-named 无限画布 (Infinite Canvas) category with the display name 画布文本输入 📝 - that's the same node, just a different label.

    Category无限画布

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING