Deen-Media/dgx-monarch

Distributed image and video generation in ComfyUI for two NVIDIA DGX Sparks.

Python

17

7 commits

updated Oct 12, 2026

See the code

See what people are saying

SourceMessageScoreDate

DGX Monarch - Dual Spark Rendering w/ ComfyUI (r/StableDiffusion)

For those of you who have been wanting to utilize your dual Spark cluster for image/video gen with ComfyUI - today is your day. I started this personal project back in April of this year, and it’s at a point where I’m fine with a public release. To put this as simply as possible - you can get…

2

Oct 12, 2026

DGX Monarch - Dual Spark Rendering w/ ComfyUI (r/LocalLLaMA)

For those of you who have been wanting to utilize your dual Spark cluster for image/video gen with ComfyUI - today is your day. I started this personal project back in April of this year, and it’s at a point where I’m fine with a public release. To put this as simply as possible - you can get…

1

Oct 9, 2026

README

DGX Monarch

Use both Sparks in ComfyUI

ci comfy-canary license: Apache-2.0

Generate images and video across two DGX Sparks from one ComfyUI window. Split a render between the GPUs, run separate prompts at once, or shard supported model weights to fit larger checkpoints.

DGX Monarch provides model loaders, samplers, memory controls, and 58 example workflows. Text encoding, VAE decode, saving, and the rest of your graph stay in ComfyUI.

Get started · Installation · Model support · Benchmarks

Why use it?

  • Wait less for a render. Distribute one supported image or video job across the pair. The results below compare the same graph on one GPU and two.
  • Work on two prompts at once. Fleet runs a separate render on each GPU, useful for trying prompts or processing independent jobs.
  • Fit larger models. FSDP divides supported model weights between the GPUs. It is a capacity option and can be slower; text encoders, VAEs, and other driver work still need local memory.
  • Avoid unnecessary model copies. Slab residency and low-RSS LoRA handling reduce duplicate weights in shared memory. Built-in checks compare these paths with stock residency before reuse.
  • Start with a model workflow. Choose a template, select your files, and queue it. Automatic selection chooses a supported GPU layout for the model; the model guide explains the manual options.
  • See what the pair is doing. The ComfyUI sidebar and dgxm top show memory use, render progress, connection state, and errors.
Krea2 workflow
Krea2 RAW and Turbo
Image generation, with LoRA support and several ways to split work across the pair.
MiniMax H3 workflow
MiniMax H3
Video with audio, plus image-guide and reference-video workflows.
Ideogram4 workflow
Ideogram4
Image generation with support for its two-model workflow.
Qwen Image 2.1 editing workflow
Qwen Image 2.1
Image generation and editing with up to ten references, including alpha-masked images.

The pack also includes Flux, Chroma, LTX, Hunyuan, Wan, and other families. Model support lists the tested configurations and limits for each. Support for one workflow does not mean every precision, LoRA, or parallel mode has been tested.

Measured results

Recorded renders on two DGX Sparks connected over ConnectX-7 200G:

WorkflowOne GPUTwo GPUsSpeedup
Krea2 RAW BF16, 1536×1536, 8 steps, CFG++ sampler, Ulysses74.1 s48.1 s1.54×
Ideogram4 FP8, dual-model, 1024×1024, 20 steps, Ulysses36.0 s26.0 s1.38×
MiniMax H3 INT8 ConvRot, 1280×720, 241 frames, 20 steps, Ulysses42m 03s23m 07s1.82×

Krea2 and Ideogram4 timings are warm renders of matching graphs. Their separate one-step output checks matched one GPU; those checks do not prove equality at every step of a full render. H3 uses exact attention: the one-GPU timing is stock ComfyUI, while one Monarch worker took 42m 20s and matched the pair's output. Results depend on the settings and hardware; benchmark details describe each comparison.

Qwen Image 2.1: 12 model formats matched native ComfyUI output in one-step tests. Separate full 25-step generation and editing tests also matched, including ten-reference editing. A comparable speed measurement has not been recorded. Qwen test results.

Full benchmarks include slower configurations. Validation explains output comparisons and remaining gaps. Campaign results provide the detailed measurements.

Watch the pair

Run dgxm top to see memory use, render progress, GPU activity, and connection status in your terminal. The ComfyUI sidebar shows the same cluster while you work on a graph.

DGX Monarch terminal dashboard with sample data

Dashboard shown with sample data. See the TUI guide for setup, keyboard controls, and recording.

Set up with a coding agent

Use an agent with a shell on the driver Spark, approved SSH access to the other Spark, and access to the selected ComfyUI and model directories. It needs network access for source and dependency downloads. A browser-only agent cannot complete the hardware steps without a connection to those machines. You may need to approve maintenance or complete sudo, SSH trust, repository access, or model-license steps yourself. Grant read or write access only where needed, using the narrowest existing parent directories for files it will create. Keep its sandbox enabled. Never paste private keys or tokens into chat.

Copy this prompt into your agent:

Help me install DGX Monarch from https://github.com/Deen-Media/dgx-monarch on my two DGX Sparks. Use the checkout I provide, or clone the repository if needed. Explicitly read skills/dgx-monarch/SKILL.md and follow it and its linked docs; do not assume skills are discovered automatically.

Discover the existing setup and prerequisites first. Ask together for missing inputs and the specific read or write directory access you need. Then present one concise installation and recovery plan, explicitly listing package, service and any security changes for approval. Reuse that approval for the listed work; ask again only if the scope changes. Preserve existing environments, models, credentials and unrelated work. Never print credentials. Reuse my existing installation where suitable; ask where new permanent files should live. Ask whether I want the dgxm TUI and an easy launch script, and where to save the script. Do not install into temporary or chat-output folders. This is a normal installation, not a clean-machine acceptance test.

Use a supported model and workflow I already have or choose. Chroma is optional; recommend it only if I have no preference. Follow the selected model's documented files and distributed settings. Complete a real distributed render, save its output, and show that both Sparks participated. Check that rerunning setup preserves the installation. Finish with how to start it, which machine and browser URL to use, whether ComfyUI is running, and where the installation, workflow and outputs live. Then report the commit, versions, reused components, manual steps, results and limitations. Do not claim success from imports or Doctor alone.

The maintained setup procedure is skills/dgx-monarch/SKILL.md. Review the agent's plan before it changes your machines. See the fresh-agent installation results for the tested setup and its limits.

Get started

You need an existing ComfyUI installation. For the tested two-Spark setup, both hosts need matching software and model files, plus an isolated, source-restricted fabric connection. Read the fabric requirements before setup: the attach API has no peer authentication, and restricting the Worker port alone is insufficient.

  1. Follow INSTALL using the Python that starts ComfyUI. Keep its CUDA torch build and install this checkout under custom_nodes.
  2. Configure the pair with guided setup, then check dgxm doctor and dgxm status.
  3. Keep ComfyUI in a foreground terminal. Open Workflow → Browse Templates → dgx-monarch and choose a supported workflow for your model. QUICKSTART explains the choice and includes an optional Chroma recipe.
  4. Queue the graph. See QUICKSTART for the node layout and first-run checks.

Worker services stay running when ComfyUI closes. Use dgxm down when you intend to stop them.

One Spark also works: Init mode=auto without cluster.toml stays local. The memory tools, templates, sidebar, and diagnostics remain available.

Before the first render

With the default auto_gate=first_use, a new combination using slab and low-RSS or FSDP may run reference renders before producing your result. Allow 2-4 minutes on the tested hardware. A successful check is reused for the same combination; an upgrade requires new checks before those results can be reused.

If the comparison fails, supported resident paths use stock residency with the memory optimizations disabled. FSDP has no stock fallback and refuses. Some large FSDP checkpoints cannot fit the gate's reload; the model guide and troubleshooting explain the available choices.

Native latent RDMA is off by default and remains NOT RUN / HOLD. Latents return through actor messages; this does not disable NCCL rendering across the pair. comfy_managed residency is opt-in and has additional memory and LoRA restrictions. Smaller jobs may gain little from using two GPUs.

Documentation

Documentation index · Model guide · Troubleshooting · FAQ · Contributing

DGX Monarch uses PyTorch Monarch for actors and xDiT / xfuser for parallel attention, inside ComfyUI. These dependencies are installed separately; this repository does not vendor their code.

License: Apache-2.0.

comfyui
dgx-spark
diffusion-models
distributed-inference
gb10
image-generation
nvidia
video-generation

Deen-Media/dgx-monarch

Distributed image and video generation in ComfyUI for two NVIDIA DGX Sparks.

Python

17

7 commits

updated Oct 12, 2026

See the code

See what people are saying

SourceMessageScoreDate

DGX Monarch - Dual Spark Rendering w/ ComfyUI (r/StableDiffusion)

For those of you who have been wanting to utilize your dual Spark cluster for image/video gen with ComfyUI - today is your day. I started this personal project back in April of this year, and it’s at a point where I’m fine with a public release. To put this as simply as possible - you can get…

2

Oct 12, 2026

DGX Monarch - Dual Spark Rendering w/ ComfyUI (r/LocalLLaMA)

For those of you who have been wanting to utilize your dual Spark cluster for image/video gen with ComfyUI - today is your day. I started this personal project back in April of this year, and it’s at a point where I’m fine with a public release. To put this as simply as possible - you can get…

1

Oct 9, 2026

README

DGX Monarch

Use both Sparks in ComfyUI

ci comfy-canary license: Apache-2.0

Generate images and video across two DGX Sparks from one ComfyUI window. Split a render between the GPUs, run separate prompts at once, or shard supported model weights to fit larger checkpoints.

DGX Monarch provides model loaders, samplers, memory controls, and 58 example workflows. Text encoding, VAE decode, saving, and the rest of your graph stay in ComfyUI.

Get started · Installation · Model support · Benchmarks

Why use it?

  • Wait less for a render. Distribute one supported image or video job across the pair. The results below compare the same graph on one GPU and two.
  • Work on two prompts at once. Fleet runs a separate render on each GPU, useful for trying prompts or processing independent jobs.
  • Fit larger models. FSDP divides supported model weights between the GPUs. It is a capacity option and can be slower; text encoders, VAEs, and other driver work still need local memory.
  • Avoid unnecessary model copies. Slab residency and low-RSS LoRA handling reduce duplicate weights in shared memory. Built-in checks compare these paths with stock residency before reuse.
  • Start with a model workflow. Choose a template, select your files, and queue it. Automatic selection chooses a supported GPU layout for the model; the model guide explains the manual options.
  • See what the pair is doing. The ComfyUI sidebar and dgxm top show memory use, render progress, connection state, and errors.
Krea2 workflow
Krea2 RAW and Turbo
Image generation, with LoRA support and several ways to split work across the pair.
MiniMax H3 workflow
MiniMax H3
Video with audio, plus image-guide and reference-video workflows.
Ideogram4 workflow
Ideogram4
Image generation with support for its two-model workflow.
Qwen Image 2.1 editing workflow
Qwen Image 2.1
Image generation and editing with up to ten references, including alpha-masked images.

The pack also includes Flux, Chroma, LTX, Hunyuan, Wan, and other families. Model support lists the tested configurations and limits for each. Support for one workflow does not mean every precision, LoRA, or parallel mode has been tested.

Measured results

Recorded renders on two DGX Sparks connected over ConnectX-7 200G:

WorkflowOne GPUTwo GPUsSpeedup
Krea2 RAW BF16, 1536×1536, 8 steps, CFG++ sampler, Ulysses74.1 s48.1 s1.54×
Ideogram4 FP8, dual-model, 1024×1024, 20 steps, Ulysses36.0 s26.0 s1.38×
MiniMax H3 INT8 ConvRot, 1280×720, 241 frames, 20 steps, Ulysses42m 03s23m 07s1.82×

Krea2 and Ideogram4 timings are warm renders of matching graphs. Their separate one-step output checks matched one GPU; those checks do not prove equality at every step of a full render. H3 uses exact attention: the one-GPU timing is stock ComfyUI, while one Monarch worker took 42m 20s and matched the pair's output. Results depend on the settings and hardware; benchmark details describe each comparison.

Qwen Image 2.1: 12 model formats matched native ComfyUI output in one-step tests. Separate full 25-step generation and editing tests also matched, including ten-reference editing. A comparable speed measurement has not been recorded. Qwen test results.

Full benchmarks include slower configurations. Validation explains output comparisons and remaining gaps. Campaign results provide the detailed measurements.

Watch the pair

Run dgxm top to see memory use, render progress, GPU activity, and connection status in your terminal. The ComfyUI sidebar shows the same cluster while you work on a graph.

DGX Monarch terminal dashboard with sample data

Dashboard shown with sample data. See the TUI guide for setup, keyboard controls, and recording.

Set up with a coding agent

Use an agent with a shell on the driver Spark, approved SSH access to the other Spark, and access to the selected ComfyUI and model directories. It needs network access for source and dependency downloads. A browser-only agent cannot complete the hardware steps without a connection to those machines. You may need to approve maintenance or complete sudo, SSH trust, repository access, or model-license steps yourself. Grant read or write access only where needed, using the narrowest existing parent directories for files it will create. Keep its sandbox enabled. Never paste private keys or tokens into chat.

Copy this prompt into your agent:

Help me install DGX Monarch from https://github.com/Deen-Media/dgx-monarch on my two DGX Sparks. Use the checkout I provide, or clone the repository if needed. Explicitly read skills/dgx-monarch/SKILL.md and follow it and its linked docs; do not assume skills are discovered automatically.

Discover the existing setup and prerequisites first. Ask together for missing inputs and the specific read or write directory access you need. Then present one concise installation and recovery plan, explicitly listing package, service and any security changes for approval. Reuse that approval for the listed work; ask again only if the scope changes. Preserve existing environments, models, credentials and unrelated work. Never print credentials. Reuse my existing installation where suitable; ask where new permanent files should live. Ask whether I want the dgxm TUI and an easy launch script, and where to save the script. Do not install into temporary or chat-output folders. This is a normal installation, not a clean-machine acceptance test.

Use a supported model and workflow I already have or choose. Chroma is optional; recommend it only if I have no preference. Follow the selected model's documented files and distributed settings. Complete a real distributed render, save its output, and show that both Sparks participated. Check that rerunning setup preserves the installation. Finish with how to start it, which machine and browser URL to use, whether ComfyUI is running, and where the installation, workflow and outputs live. Then report the commit, versions, reused components, manual steps, results and limitations. Do not claim success from imports or Doctor alone.

The maintained setup procedure is skills/dgx-monarch/SKILL.md. Review the agent's plan before it changes your machines. See the fresh-agent installation results for the tested setup and its limits.

Get started

You need an existing ComfyUI installation. For the tested two-Spark setup, both hosts need matching software and model files, plus an isolated, source-restricted fabric connection. Read the fabric requirements before setup: the attach API has no peer authentication, and restricting the Worker port alone is insufficient.

  1. Follow INSTALL using the Python that starts ComfyUI. Keep its CUDA torch build and install this checkout under custom_nodes.
  2. Configure the pair with guided setup, then check dgxm doctor and dgxm status.
  3. Keep ComfyUI in a foreground terminal. Open Workflow → Browse Templates → dgx-monarch and choose a supported workflow for your model. QUICKSTART explains the choice and includes an optional Chroma recipe.
  4. Queue the graph. See QUICKSTART for the node layout and first-run checks.

Worker services stay running when ComfyUI closes. Use dgxm down when you intend to stop them.

One Spark also works: Init mode=auto without cluster.toml stays local. The memory tools, templates, sidebar, and diagnostics remain available.

Before the first render

With the default auto_gate=first_use, a new combination using slab and low-RSS or FSDP may run reference renders before producing your result. Allow 2-4 minutes on the tested hardware. A successful check is reused for the same combination; an upgrade requires new checks before those results can be reused.

If the comparison fails, supported resident paths use stock residency with the memory optimizations disabled. FSDP has no stock fallback and refuses. Some large FSDP checkpoints cannot fit the gate's reload; the model guide and troubleshooting explain the available choices.

Native latent RDMA is off by default and remains NOT RUN / HOLD. Latents return through actor messages; this does not disable NCCL rendering across the pair. comfy_managed residency is opt-in and has additional memory and LoRA restrictions. Smaller jobs may gain little from using two GPUs.

Documentation

Documentation index · Model guide · Troubleshooting · FAQ · Contributing

DGX Monarch uses PyTorch Monarch for actors and xDiT / xfuser for parallel attention, inside ComfyUI. These dependencies are installed separately; this repository does not vendor their code.

License: Apache-2.0.

comfyui
dgx-spark
diffusion-models
distributed-inference
gb10
image-generation
nvidia
video-generation