FLUX.1-Kontext-ImageToImage
Your source photo, one instruction, Azure does the rest
- image_1
- images
This is the node that makes the azure-flux-comfyui pack worth installing. FLUX.1-Kontext's actual capability is image editing with reference-image conditioning, and FluxKontextImageToImage is where that shows up in your graph: feed it an image, type an instruction, get an edited version back. The default prompt is literally "Put the person into a white t-shirt." No inpainting masks, no ControlNet, no local model - Microsoft runs Kontext-pro and this node handles the plumbing.
How it works - the interesting part
Unlike the two text-to-image nodes in the pack, this one hits Azure's images/edits endpoint, and it does it with a multipart upload. Your image_1 tensor is reduced to its first frame, clipped back to 0–255, saved as a PNG in memory, and uploaded as a file field named image alongside form fields for the prompt, size, n, and output format. Azure's edits API takes that image plus your instruction, generates, and returns base64 images the node decodes into a batched IMAGE tensor - the same [N, H, W, C] float format you get from any local node.
Worth spelling out once, because this is the one place in the pack where data really leaves your machine: the full source image is uploaded to Azure. That's the mechanism, not a bug - but it's why you shouldn't wire private or confidential images through here without thinking about it.
The inputs that matter
image_1(required) - any IMAGE tensor, from a Load Image node or anywhere upstream. The node takes the first frame if you feed it a batch.editing_prompt- the field name finally makes sense here: it's an instruction describing the edit you want.azure_endpoint,api_key,deployment(defaultFLUX.1-Kontext-pro),api_version- the same Azure plumbing as the rest of the pack.
Optional: size (1024x1024 format), n (1–8, billed per image), output_format (png/jpeg/webp). Output is images - wire it into Save Image.
Installing it
Same install for all four nodes: 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 after. Dependencies are requests, Pillow, torch, numpy - already in ComfyUI, so no model downloads. The real prerequisite is an Azure resource with FLUX.1-Kontext-pro deployed.
Where people get burned
- Forgetting
image_1. It's mandatory. Run it without an image and the node raises "In 'edit' mode, 'image_1' must be provided." before anything touches the network. - Pointing at a deployment that doesn't do edits. Not every FLUX deployment supports the edits endpoint - FLUX-1.1-pro is generations-only. The code even has a built-in hint: if it gets a 400/404 in edit mode and "1.1" is in the deployment name, it tells you the model may not support edits. If your edits come back 404, check which deployment you're aimed at.
- Expecting img2img-style control. This is edit-by-instruction, not strength control. There's no denoise slider, no control weight - you get whatever the hosted model decides your sentence means. If you want pixel-level control, local editing (Klein, Qwen-Image-Edit, or Flux Kontext dev with ControlNet) is a different tool entirely.
- The usual pack failures: 401/403 (key/endpoint), invalid size (must be
WIDTHxHEIGHT), and timeouts (drop ton=1or a smaller size).
And the whole-pack reminder: it's metered per call, and Kontext-pro is a censored model with Azure's content filters on top. For hosted image editing inside ComfyUI, this is the node - just know what you're signing up for.
Inputs (9)
| 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 | Put the person into a white t-shirt | — |
| image_1 | IMAGE | — | |
| sizeopt | STRING | 1024x1024 | — |
| nopt | INT | 11–8 | — |
| output_formatopt | COMBO | png | 3 options: png, jpeg, webp |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |