Jetson Generative AI – ComfyUI and Flux

ComfyUI brings professional-grade image generation to your fingertips with its intuitive node-based interface. Combined with Flux, an open-source image generation model, it delivers exceptional creative capabilities directly on Jetson Orin devices with optimized performance for edge computing.
In this article you’ll learn how to run ComfyUI with Flux on Jetson AGX Orin for high-quality AI image generation in real time.

Requirements

 

Hardware / Software
Notes
Jetson AGX Orin
64GB recommended for optimal performance
JetPack 6.0+
Needed for CUDA 12.4 support
~30 GB free storage
For models and generated images

Obtaining Model Access

Before starting the installation, request access to the required Flux models on Hugging Face:
Required Models:
FLUX.1-schnell – Main generation model (~23GB)
Flux Text Encoders– CLIP and T5 models (~5GB)
Access Steps:
1. Create/sign into your account at https://huggingface.co .
2. Visit each model link above and click Request Access
3. Wait for approval (usually instant)
4. Terminal download commands are provided in Step 10 below

Step-by-Step Setup

1. Install Miniconda

Copy to Clipboard

2. Create Python environment

Copy to Clipboard

3. Install CUDA 12.4

Copy to Clipboard

4. Configure CUDA environment

Copy to Clipboard

5. Compile bitsandbytes

Copy to Clipboard

6. Install PyTorch for Jetson

Copy to Clipboard

7. Install ComfyUI

Copy to Clipboard

8. Launch ComfyUI

Copy to Clipboard

9. Open the Web UI

When the console prints:
Starting server
To see the GUI go to: http://127.0.0.1:8188
On-device: open a browser on the Jetson and visit `http://127.0.0.1:8188`
Remote: replace `<jetson-ip>` with your board’s address:
http://<jetson-ip>:8188

ComfyUI Flux Workflow

10. Download Flux models

 

Open a new terminal (keep ComfyUI running) and download the models:
Copy to Clipboard

11. Download and load workflow

1. Download the workflow file
2. Drag and drop the `workflow_agx_orin_4steps.json` file onto the ComfyUI interface
3. Enter your prompt in the text node
4. Click Queue Prompt to generate images
Generation time: ~21 seconds on AGX Orin 64GB, ~25 seconds on 32GB.

Troubleshooting

How to Fix the “conda activate is not working” Error ?

If you encounter issues where the conda activate command does not work in your terminal, it’s usually because the Conda shell integration hasn’t been set up properly. To fix this, run the following commands:

Copy to Clipboard

These commands initialize Conda for your shell, enabling the conda activate command to work correctly in new terminal sessions. After running them, restart your terminal or source your shell configuration file.

How to Fix bitsandbytes Compilation Errors

If you encounter compilation errors while installing or building bitsandbytes, it’s often due to missing essential build tools and dependencies. To resolve this, install the required packages using:

Copy to Clipboard

These packages provide the necessary compilers, build systems, and configuration tools to successfully compile bitsandbytes on your system.

How to Fix Slow Installation of Safetensors ?

If you experience very slow downloads or installations of large .safetensors files, it might be due to inefficient download methods. To speed up the process, follow these steps:

Install Git Large File Storage (LFS) by running:

Copy to Clipboard

Use a multi-connection download accelerator like aria2 to download the file faster:

Copy to Clipboard

Troubleshooting

 

Issue
Fix
Out of memory errors
Use `python main.py –lowvram` or close other applications
Model loading errors
Verify all `.safetensors` files downloaded completely
Slow generation
Enable max performance: `sudo jetson_clocks && sudo nvpmodel -m 0`
CUDA not detected
Check `nvcc –version`
For more information about ComfyUI workflows and advanced configurations, visit the ComfyUI GitHub repository.