FLUX.1-Kontext-TextToImage
Microsoft's hosted FLUX, with no reference image
- images
FLUX.1-Kontext's whole selling point is consistency - it conditions on a reference image so a character or object survives across generations. So the first thing to know about this node is what it doesn't do: there's no image input on it. FluxKontextTextToImage is the plain text-to-image half of the pair, calling Azure's images/generations endpoint with your FLUX.1-Kontext-pro deployment. Same thin HTTP wrapper as the rest of the azure-flux-comfyui pack - prompt in, IMAGE tensor out, no model files, no GPU.
Reach for it when you're already paying for a Kontext-pro deployment on Azure and you want straightforward hosted generation inside a bigger workflow: a draft stage, a batch, a step that feeds something downstream. If you actually want Kontext's reference-image party trick, you want the ImageToImage sibling from the same pack - that's where the model's real capability lives.
How it works
Identical plumbing to the pack's other T2I node. A POST to {endpoint}/openai/deployments/{deployment}/images/generations?api-version={api_version} with your key in an Api-Key header, base64-encoded images come back, and the node decodes them into a batched float IMAGE tensor [N, H, W, C] in 0–1 range. Kontext-pro hosted on Azure is just the model sitting behind that endpoint; the node doesn't know or care.
The inputs that matter
azure_endpoint- your Azure resource URL. The code adds a missing trailing slash for you.api_key- your Azure OpenAI key, stored in plain text in the node.deployment- defaults toFLUX.1-Kontext-proand must match the deployment name in your Azure resource.api_version-2025-04-01-previewby default.editing_prompt- yes, the name is recycled from the edit node. Here it's just your text prompt, and the default is a placeholder photorealistic portrait you'll want to change.
Optional: size (1024x1024 format, validated before it's sent), n (1–8, billed per image), and output_format (png/jpeg/webp). The single output is images, wired into Save Image or anything downstream.
Installing it
Shared with the whole pack. ComfyUI Manager → search "azure-flux-comfyui", or:
cd ComfyUI/custom_nodes/
git clone https://github.com/xpanceo-team/azure-flux-comfyui.git
cd azure-flux-comfyui
pip install -r requirements.txt
Restart ComfyUI after. The dependencies are requests, Pillow, torch, numpy - all already in ComfyUI, so nothing heavy downloads. The actual prerequisite, again, is the Azure side: a resource with FLUX.1-Kontext-pro deployed.
Where people get burned
- The 401/403, 404/400, and size-format failures are the same across the pack: wrong key/endpoint, deployment name that doesn't exist, or
sizenot inWIDTHxHEIGHTform. - Trying to pass a reference image here. It can't take one. If your workflow is feeding an image in and expecting Kontext-style consistency, you've got the wrong node - that input lives on the ImageToImage variant.
- Confusing the hosted pro with the local dev model. The local FLUX.1-Kontext [dev] weights exist, but by mid-2026 the community had moved past it as an editor (Klein and Qwen-Image-Edit took the job), and it's non-commercial licensed and censored anyway. This node calls the hosted pro tier: no weights, filtered at Microsoft's end, billed per image. Same family name, genuinely different thing.
Standard API-wrapper reminder applies: your prompt leaves the machine, and it's metered per call. Keep that in mind before you wire n=8 into a loop.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| azure_endpoint | STRING | — | |
| api_version | STRING | 2025-04-01-preview | — |
| api_key | STRING | — | |
| deployment | STRING | FLUX.1-Kontext-pro | — |
| editing_prompt | STRING | A photorealistic portrait of a person in a white t-shirt | — |
| sizeopt | STRING | 1024x1024 | — |
| nopt | INT | 11–8 | — |
| output_formatopt | COMBO | png | 3 options: png, jpeg, webp |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |