Skip to content

Running FLUX AI Image Generation on Jetson AGX Orin - A Docker Container Guide

Published: at 10:11 AM

FLUX AI: A Leap Forward in Image Generation

The author, esteban.gallardo, expresses enthusiasm for FLUX AI, describing it as a “quantum leap” over StableDiffusionXL. They detail their successful attempts to run FLUX directly on the Jetson AGX Orin, achieving remarkable results.

Installation Steps

The current installation process involves:

  1. Starting with the torch-vision container:
    jetson-containers run $(autotag torchvision)
    
  2. Cloning the FLUX repository and installing dependencies:
    cd home && git clone https://github.com/black-forest-labs/flux
    cd home/flux
    pip install -e '.[all]'
    
  3. Installing system packages:
    apt-get update && apt-get install ffmpeg libsm6 libxext6  -y
    sudo apt-get update
    sudo apt-get install golang-go
    
  4. Setting up FRP (Fast Reverse Proxy):
    git clone https://github.com/huggingface/frp
    cd frp
    make frpc
    cp bin/frpc /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_aarch64_v0.2
    
  5. Starting the Gradio-based service:
    python3 demo_gr.py --name flux-schnell --device cuda --share
    

The author notes that this process takes approximately two hours due to the large size of the FLUX model files (around 45GB for pytorch_model.bin and 28.9GB for fluxl-schnell.safetensors).

Request for a Dedicated Docker Container

While the manual installation is successful, esteban.gallardo seeks help in creating a dedicated Docker container for FLUX AI, similar to the existing container for stable-diffusion-webui. This would simplify deployment and make FLUX more accessible to users.

Conclusion

This forum post highlights the excitement surrounding FLUX AI’s impressive image generation capabilities and the need for a more streamlined deployment method on the Jetson AGX Orin. The creation of a dedicated Docker container would significantly benefit users looking to leverage this powerful new tool.