FLUX AI Image generation jetson-container

For the last couple of days I’ve been testing AI FLUX image generation with exceptional results. It’s hard to believe how good it is, specially compared with StableDiffusionXL, it’s a quantum leap.

So far I start from the torch-vision container:

Step 1:

jetson-containers run $(autotag torchvision)

Step 2:

cd home && git clone https://github.com/black-forest-labs/flux
cd home/flux
pip install -e '.[all]'

Step 3:

apt-get update && apt-get install ffmpeg libsm6 libxext6 -y

Step 4:

sudo apt-get update
sudo apt-get install golang-go
git clone https://github.com/huggingface/frp
cd frp
make frpc
... wait the compile to finish...
cp bin/frpc /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_aarch64_v0.2

Final Step. Start Gradio-based service:

python3 demo_gr.py --name flux-schnell --device cuda --share

The whole process takes me around 2 hours because there are huge files (pytorch_model.bin (45 Gigas), fluxl-schnell.safetensors (28.9 Gigas))

I’ve been trying to create a new docker but, since I’m not an expert, I’ve failed to do it. I wanted to ask for help to create that container.

Hi,

Have you tried jetson-containers/stable-diffusion container?

We have a stable diffusion tutorial below:

Thanks.

I don’t know exactly what you meant. The link you provided is to VoiceCraft, a speech generation synthetizer.

I assumed that you want that I try to start FLUX installation from the stable-diffusion container. I’ve tried that and the response is the same. Around 2 hours until everything is up and ready, because the training data that needs to be downloaded for FLUX to work has nothing to do with StableDiffusion.

If you meant that I should try stable-diffusion. I’ve already tried that, I have been working with StableDiffusion for the last 3 months. StableDiffusion open source delivers extremely poor results. On the other side, FLUX delivers results with a quality comparable to Dall.e 3.

I would rather keep this conversation focused in creating a new docker container. I only need to have a jetson-container for FLUX the same way there is a jetson-container for stable-diffusion-webui.

Thanks.

Hi,

Sorry for the typo. The correct tutorial link is below:

To create a container, please rewrite your installation command as a Dockerfile.
You can find an example below:

Then you can build the container with docker build -t [name] ..
Thanks.

As I said I’m not an expert in docker and I don’t have weeks to learn to do something that for an expert would only take minutes.

I have reduced the process of starting Flux in 30 minutes and that’s good enough for me.

I consider this thread closed.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.