Foundry Image and Video Generation Nodes for ComfyUI
A new integration adds two custom ComfyUI nodes for generating images with Microsoft Foundry's hosted gpt-image, FLUX, and MAI Image models and video with fal's MiniMax H3 Max model. Generation runs in Foundry, so ComfyUI can work on CPU-only machines, and authentication uses Microsoft Entra ID without API keys in workflow files. The image-to-video pipeline takes about 80 seconds for a five-second clip, with Azure role assignments and deployment configuration as the main prerequisites.

Listen to this dispatch
Narrated by an AI-generated voice.
Microsoft Foundry has published a guide and code for using its hosted image models—gpt-image, FLUX, and MAI Image—alongside the fal MiniMax H3 Max video model inside ComfyUI. The integration consists of two custom nodes that call Foundry APIs directly; generation runs in Foundry, so ComfyUI can operate on a CPU-only machine. Authentication uses Microsoft Entra ID through DefaultAzureCredential, which means there are no API keys to store in shared workflow files.
The two nodes are Foundry Image Generate and fal MiniMax H3 Max Video (Foundry). The image node routes requests to the provider-specific endpoint that matches the deployment, detected automatically from the deployment name. The video node chooses between three modes: image-to-video when an image is connected, text-to-video when it is not, and reference-to-video when reference images or a reference video are supplied. Because fal jobs are asynchronous, the node polls until the request completes and saves the resulting MP4 to ComfyUI's output directory.
Setup requires deploying at least one image model and the fal model in a Foundry project, creating a folder with two Python files in ComfyUI's custom_nodes directory, and installing azure-identity and requests into ComfyUI's Python environment. The project endpoint is supplied through a FOUNDRY_ENDPOINT environment variable rather than being embedded in workflows. The full nodes.py listing is included with installation instructions for Windows, macOS, and Linux.
Authentication depends on the identity available where ComfyUI runs: a personal sign-in via az login on a local machine, or a managed identity on Azure compute. That identity needs the Cognitive Services User role, or the Foundry User role, on the Foundry resource. Role assignments can take a few minutes to propagate, and a first run may return 401 or 403 before they take effect. Creating the role assignments requires Owner or User Access Administrator permissions, so users without those roles need an Azure admin to run the command.
The worked example chains the image and video nodes into a keyframe-to-motion pipeline: a detailed text prompt sets the look of the scene, and a shorter motion prompt describes camera movement and action. On the author's run, the full pipeline took about 80 seconds and produced a five-second, 24 fps clip. Keeping the seed fixed lets ComfyUI cache the keyframe and avoid regenerating it when the motion prompt is edited.
The main caveats are Azure-side: role permissions and deployment configuration matter more than ComfyUI setup. Custom image deployment names require manually setting the model family, MAI Image inputs need at least 768 pixels on both sides, and the demonstration covers only image-to-video performance. Text-to-video and reference-to-video are described as routing options, but their output quality is not compared.
Read the original at techcommunity.microsoft.com →