cpm_textInput
It's just a text box — but the pack it rides in will surprise you
- STRING
The short version
cpm_textInput is the whole node inventory of the comfyui_kj (咔叽AI) pack, and it is brutally simple: a multiline text box that passes whatever you type straight through as a STRING. That's it. No API call, no key, no clever mechanism - the entire class body is about ten lines of Python.
If you're here because you loaded a workflow containing this node and wondered what it does, the honest answer is "the same thing ComfyUI's built-in String node does." The interesting part isn't the node; it's the pack it belongs to, because comfyui_kj is a commercial bridge that publishes ComfyUI workflows into a WeChat mini-program called Kaji and lets you charge users per generation. This text node is just the bit you'd use to put a prompt field in a workflow you're about to publish there.
How it works
Grab the source out of sdCpm.py and there's nothing to it:
class cpm_textInput:
CATEGORY = "sdCpm"
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"text": ("STRING", {"default": "", "multiline": True, "placeholder": "输入文本"}),
}
}
RETURN_TYPES = ("STRING",)
FUNCTION = "getText"
@staticmethod
def getText(text):
return (text,)
One required text input, a getText function that returns it untouched, one STRING output. The name doesn't lie and there's no hidden behavior to fear - which is more than you can say for the rest of this pack.
The one input that matters
There's a single required input:
- text - a multiline string, empty by default. Type your prompt (or whatever text the downstream node wants) here.
And a single output, STRING. Wire it into any input that takes a string - a CLIPTextEncode prompt, a Lora Loader trigger word, a filename prefix. For a Kaji-published workflow this is how a text value gets into the graph; the service side rewrites workflow inputs from the mini-program's form data before it queues the job on your box.
Honest take: if you're not publishing to Kaji, you have no reason to install this pack to get this node. ComfyUI ships the same thing built in, and grabbing the built-in doesn't drag a network-connected SaaS plugin into your install.
Installing the pack (if you actually want it)
From the README, either route works:
# Option A: ComfyUI Manager
# Open Manager -> Custom Nodes -> search "comfyui_kj" -> Install -> restart
# Option B: manual clone
cd ComfyUI/custom_nodes
git clone https://github.com/lingha0h/comfyui_kj
# restart ComfyUI
Dependencies are light - aiohttp and websockets, auto-installed by setup.py on import. No model files to download. That's the good news. The less good news: this is a China-focused commercial service, so you'll want a Kaji account and its QR-code login before the workbench is useful, and the pack's docs are in Chinese.
Where people get burned
This is the part worth knowing before you install. Unlike the node itself, the pack is not inert:
- It opens two websockets at import time - one to Kaji's cloud (a Tencent CloudBase endpoint) and one back into your local ComfyUI - and retries every 5 seconds forever if it can't connect. People who've had this pack installed report exactly this: a green "Kaji workbench" button appearing in ComfyUI and a console that fills with connection errors on a loop. If you're outside China or the Kaji servers are having a day, that spam doesn't stop on its own.
- It hashes your machine ID (UUID / MAC / machine-id) and sends it to that cloud backend, and the frontend code carries a hardcoded test user ID. It's not malware, but it's a third-party commercial bridge with network access running arbitrary Python on import - the same posture the community has flagged for years about unvetted custom nodes. Read the source before you trust it.
- The README changelog shows a string of Windows-specific fixes (import failures, publish failures, "generation stuck in progress", no selectable nodes on some machines). If you hit weirdness, update the pack first - it's patched frequently.
So: the node is a perfectly good text box, and it's the only node this pack ships. Install it if you're actually doing the Kaji thing, and use the built-in String node otherwise. Your ComfyUI will thank you.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |