Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > comfy-ninfer-api > NInfer - Chat

ComfyUI Node: NInfer - Chat

Class Name

NinferChat

Category
NInfer
Author
kaerozhi (Account age: 0days)
Extension
comfy-ninfer-api
Latest Updated
2026-10-11
Github Stars
0.0K

How to Install comfy-ninfer-api

Install this extension via the ComfyUI Manager by searching for comfy-ninfer-api
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfy-ninfer-api in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

NInfer - Chat Description

Generates NInfer chat replies from text or images, with optional conversation history and settings.

NInfer - Chat:

NinferChat generates one conversational reply from a NInfer model each time it runs. You can use it for text-only conversations or ask questions about reference images, such as requesting a description or creative ideas based on an image. It can continue an earlier conversation, apply supplied generation settings, and provide a conversation record for a later turn. This makes it useful when you want to develop an idea through several prompts while keeping the model’s replies connected to what came before.

NInfer - Chat Input Parameters:

client

Required NINFER_CLIENT connection from a NInfer client node. This supplies the connection used to request a chat completion; without a working client, the node cannot contact the model. There is no numeric minimum, maximum, or default: connect a client before running the node.

prompt

Required text containing the message you want to send. Its displayed default is an empty string, but the node rejects empty text and text made only of spaces. Describe your task clearly, for example, “Describe the lighting and color palette in this reference image.” No minimum or maximum character count is specified beyond the requirement for nonblank text.

model

Required text field identifying the model to request. The default is an empty string: in that case, the node tries to use the first model reported by model discovery and uses ninfer if none is reported. Enter a model name when you need a particular model rather than relying on that selection. The source specifies no length limit or fixed list of accepted names; the requested name must be recognized by the connected service.

force_regen

Required Boolean setting that controls whether an unchanged node should request a fresh reply. The default is True (“always regenerate”), which makes each run call the model again. Set it to False (“reuse cached result”) to allow an unchanged run to reuse its cached result. Its only values are True and False; numeric minimum and maximum values do not apply.

language

Required selection for the language of the preview and status text printed by this node. Its default is DEFAULT_LANGUAGE, and its choices come from LANGUAGES; the provided source does not show the actual language names or default language, so no specific choice can be stated here. This setting does not itself instruct the model which language to use in its reply; specify that in your prompt when it matters. Numeric minimum and maximum values do not apply.

options

Optional NINFER_OPTIONS connection carrying settings from option nodes. Connected settings are copied into this request and can affect how the model responds; the exact available settings and their value ranges depend on those option nodes and are not defined in the supplied interface. With no connection, the node sends no settings from this input, so there is no default options payload to configure here.

history

Optional NINFER_HISTORY connection containing an earlier conversation. When connected, the node copies those messages and adds this turn before making its request, allowing the reply to account for prior context. With no connection, the request begins without prior conversation messages from this input. There are no numeric limits or default history messages specified in the source.

image_1

Optional IMAGE connection for a reference image. When connected, the node sends it alongside your prompt, enabling an image-conditioned request if the chosen model supports that capability. A connected image batch is flattened into individual frames. There is no default image or stated minimum or maximum image size; the socket tooltip estimates about 256 prompt tokens per image at 512 px.

image_2

Optional IMAGE connection for an additional reference image. Connect image slots in order, starting with image_1, so your references follow the intended sequence. Like the first slot, a batch can contribute multiple frames to the request. There is no default image or stated size limit; the tooltip gives the same estimate of about 256 prompt tokens per image at 512 px.

image_3

Optional IMAGE connection for another reference image. It adds its connected frame or batch frames after those from earlier slots, which matters when your prompt refers to images by sequence. Connect the earlier slots first. There is no default image or stated size limit; the tooltip estimates about 256 prompt tokens per image at 512 px.

image_4

Optional IMAGE connection for a further reference image. It contributes its connected frame or batch frames after the earlier slots. The four sockets limit the number of connections, not necessarily the number of frames, because batches are flattened. There is no default image or stated size limit; the tooltip estimates about 256 prompt tokens per image at 512 px.

NInfer - Chat Output Parameters:

Response

A STRING containing the model’s visible reply. This is the text to read, display, or pass to another text-processing node. If the completion contains no visible content, this output is an empty string, so an empty value does not by itself explain why the model returned no text.

Reasoning

A STRING containing separate reasoning content when the model’s returned message includes it. It is not the same as the visible reply, and it is an empty string when no separate reasoning content is present. Use Response when you need the answer intended for display.

History

A NINFER_HISTORY value containing the conversation messages used for this request, followed by this turn’s assistant reply. Pass it to a later NinferChat node when you want the next request to continue the conversation. The assistant message added to this history contains the visible response, not the separate Reasoning output.

NInfer - Chat Usage Tips:

  • For a new conversation, leave history unconnected. To continue a conversation, connect a previous History output to history so the next prompt has the earlier messages.
  • Leave model blank for the node’s automatic selection, or enter a known model name when a workflow depends on a specific model. Do not connect a server status report to this field.
  • For image questions, connect references starting at image_1 and describe what you want to learn or create in prompt. Check that your chosen model accepts image content before relying on an image-conditioned reply.
  • Use force_regen set to False while revisiting an unchanged workflow if you want to reuse a cached result. Keep the default True when you want a fresh model call on every run.
  • Use options when you need settings supplied by option nodes. If you need the reply itself in a particular language, say so in prompt; language controls this node’s preview and status text.
  • Connected image batches are sent as individual frames, and images are encoded into the request. Use only the references needed for your question to keep the request focused and avoid unnecessary image processing and token use.

NInfer - Chat Common Errors and Solutions:

prompt must not be empty

  • Explanation: The prompt is empty or contains only whitespace. The node checks this before requesting a reply.
  • Solution: Enter a nonblank question or instruction in prompt.

Invalid model input message

  • Explanation: The node raises a localized bad_model_input error if model contains a newline, the text 进程号, or healthy. These are signs that a server status report may have been connected where a model name belongs; the exact displayed wording depends on the translation.
  • Solution: Disconnect the status output and enter a single model name, or leave model blank for automatic selection.

Model not found or unavailable

  • Explanation: The service may reject the requested model name. This can also happen if model is blank and the fallback name ninfer is not available. The precise error message comes from the connected service and is not specified in this source.
  • Solution: Check which models your NInfer service reports and enter an available name in model.

Connection or request failure

  • Explanation: A model request can fail if the connected client cannot reach its service or the service cannot complete the request. This node does not define a specific message for those failures.
  • Solution: Check that the NInfer service is running and reachable, verify the client node’s connection settings, and try the request again.

Image request rejected

  • Explanation: When images are connected, the node includes them as image content in the chat request. A model or service that does not accept that content may reject the request; the exact message depends on the service.
  • Solution: Choose a model that supports image input, or disconnect the images and make a text-only request.

Empty Response

  • Explanation: The node uses an empty string if the returned completion has no visible message content. This is an output value, not a specific error raised by the node.
  • Solution: Check the selected model and request settings, then try a clear, direct prompt. Inspect the service response or logs if it continues to return no visible text.

Empty Reasoning

  • Explanation: The returned message did not include separate reasoning content. This is normal for models or responses that do not provide it.
  • Solution: Read Response for the visible answer; no change is needed unless your workflow specifically requires a model that supplies separate reasoning content.

NInfer - Chat Related Nodes

Go back to the extension to check out more related nodes.
comfy-ninfer-api
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

NInfer - Chat