Nodes/Comfyui_CXH_Phi_3.5/CXH_Phi_chat_min
ComfyUI Node

CXH_Phi_chat_min

A local chat turn inside your workflow — one prompt at a time

By StartHua·Created 2 years ago·Updated 2 years ago· 18
CXH_Phi_chat_min
  • model
  • out
prompt
temperature0.00
max_new_tokens1024

The other half of the pack's text pipeline, and the one that actually talks. CXH_Phi_chat_min takes the model handle from CXH_Phi_chat_load, a prompt, and nothing else, and returns a generated answer as a string. Wire that string into a text-display node (the pack's workflow uses easy showAnything) and you've got a working local chat model inside a ComfyUI graph. It's great for the workflows where you want a language model to do a job mid-pipeline - rewriting a prompt into something richer, answering a question, generating a caption draft - without ever leaving ComfyUI or spending a cent on an API.

How it works

The node builds a standard message list - a canned system prompt ("You are a helpful AI assistant.") plus your user prompt - and hands it to a HuggingFace text-generation pipeline running on the cached Phi-3.5-mini model. It returns only the newly generated text, not your prompt echoed back, and you get a STRING out.

The catch hidden in the source: do_sample=False is hardcoded, so generation is greedy. The temperature widget is wired up and does nothing. For deterministic, factual tasks that's actually a feature - same prompt, same answer, run after run - but it means you can't coax variety out of it with the temperature slider no matter how high you push it. Max out max_new_tokens and greedy mode will happily ramble on, which is its own kind of trouble.

Inputs that matter

  • model - the PHI_MIN_MODE bundle from CXH_Phi_chat_load. Nothing happens without it.
  • prompt - multiline text, the actual question or instruction. There's no memory between runs, so say what you need in full; "rewrite this for Flux: ..." works, "what about it?" doesn't.
  • max_new_tokens - default 1024, range 100–20000. The widest range in the pack. Fine at default; bump it if you're asking for essays.
  • temperature - default 0, and currently ignored. See above.

Output is a single out (STRING). It won't display on its own - ComfyUI core has no text viewer in the default graph, which trips people up constantly. Wire it into easy showAnything (ComfyUI-Easy-Use), any "show text" node, or a text-conditioning path if you're using the answer as a prompt.

Install

ComfyUI Manager, search Comfyui_CXH_Phi_3.5, install, restart - or:

cd ComfyUI/custom_nodes
git clone https://github.com/StartHua/Comfyui_CXH_Phi_3.5
# restart ComfyUI, run CXH_Phi_chat_load once to pull the ~4GB model

Where people get burned

  • Expecting a real conversation. "Chat" is doing heavy lifting here. Every run is a fresh single turn with a fixed system prompt - no history, no follow-ups. If you need an actual back-and-forth, this isn't the node.
  • Temperature does nothing. If you read the widget and assumed sampling, that's the trap. It's greedy, full stop.
  • The flash_attn==2.5.8 requirement. Compiled extension, classic install pain, unnecessary on the default eager attention path. Comment it out of requirements.txt if the install fights you.
  • VRAM/CUDA. The loader pins to CUDA, so no CPU mode. At 3.8B the model is polite about memory, but it's still a GPU resident while the workflow is queued.

Where this lands in the ecosystem: it's a small, single-purpose pack from an author who keeps the README to a screenshot and a boast. It won't compete with a hosted frontier model, and it doesn't try to. What it does - a local, private, deterministic text answer inside a ComfyUI graph - is the whole pitch, and for prompt-mangling workflows that's genuinely useful.

CategoryCXH/GPT

Inputs (4)

NameTypeDefaultDescription
modelPHI_MIN_MODE
promptSTRING
temperatureFLOAT0.000–1
max_new_tokensINT1024100–20000

Outputs (1)

NameTypeDescription
outSTRING