- content_item
LLMTextBlockNode ("LLM 文本块") is the simplest node in the comfyui-ez-llm pack, and it earns its place by being simple. It takes one multiline string and wraps it into an LLM_CONTENT_ITEM - the pack's little content envelope - so it can travel through the same wires as images. If you've used LLMImageEncoder, this is its text sibling: that node packages a picture, this one packages a string.
Why would you need a node that just wraps text? Because the pack's generator, LLMTextGenerator, accepts both a plain user_prompt and optional content_part_1/2/3 sockets that carry these content items. The plain prompt is the easy path. The content items are the composable path: you can bolt a fixed block of instructions onto the user prompt, or mix text and images into one request. LLMTextBlockNode is how text becomes one of those blocks.
That's genuinely the whole job. The node has a single text input (multiline, empty by default) and a single content_item output. Under the hood it returns a dict: {"type": "text", "text": ...}. Nothing is tokenized, encoded, or sent anywhere at this step - that all happens downstream in the generator.
Where it fits
The pattern that makes it useful: you want to describe a style once and reuse it without editing the user prompt every time. Drop a "always describe the lighting and the camera lens" text block into LLMTextBlockNode, and combine it with an image via LLMContentConnector into the generator's content_part_1. Now the model gets your instruction, your image, and your user prompt in one shot. Same for appending a fixed vocabulary list, a negative-space instruction, or a "respond only with tags" rule.
It's worth being clear about the boundary: this node is content plumbing, not a generation node. If you want the LLM to write text, that's LLMTextGenerator. If you want to package text for it to consume, this is the node. Both live in the same pack and they're meant to be used together.
Installing it
The install is pack-wide, so once you've got the pack, you've got this node: ComfyUI Manager → search comfyui-ez-llm, or:
cd ComfyUI/custom_nodes
git clone https://github.com/spawner1145/comfyui-ez-llm
Restart. It needs the usual transformers + accelerate dependencies and, to actually do anything useful, a model in models/LLM/<name>/ loaded through LLMModelLoader - though the node itself will happily run with no model at all, since it does no processing.
One tip if you're coming from ComfyUI's widget system: since this is just a string wrapper, the actual text is a widget on the node. Convert that widget to an input and you can drive the block's content from another node entirely - a file reader, another LLM's output, whatever. That's the classic plumbing move, and it's what turns a static text block into a dynamic one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| content_item | LLM_CONTENT_ITEM | — |