Skip to content

Repository files navigation

🎨 Pix2000

Local image generation on AMD Strix Halo — four text-to-image models, one simple web app, nothing sent to the cloud.

By Michael Amador · [email protected] · github.com/almodover

Pix2000 is a Gradio app built on Hugging Face diffusers and PyTorch for ROCm 10. Pick a model, type a prompt, get an image — all on your own machine.

model what it's good at weights used
Z-Image Turbo fast, photoreal, 9 steps INT8 (SDNQ), ~11 GB
FLUX.2 [klein] 4B fast, 4 steps INT8 (AMD Quark), ~12 GB
FLUX.2 [klein] 9B higher quality, 4 steps INT8 + AWQ text encoder, ~15 GB
Qwen-Image 2.1 detailed, native 2K bf16, ~31 GB

Install on a Strix Halo machine

Works on AMD Ryzen AI Max / Max+ machines (Radeon 8060S / 8050S, gfx1151), e.g. the HP Z2 Mini G1a. Tested on Ubuntu 24.04, kernel 7.0, 128 GB of unified memory.

You do not need to install ROCm system-wide: the PyTorch ROCm 10 wheels bring their own runtime. The kernel's built-in amdgpu driver is enough.

1. Give your user access to the GPU (then log out and back in):

sudo usermod -aG render,video $USER

2. Install uv (it also fetches Python 3.13) and the build tools AMD Quark needs the first time it runs:

curl -LsSf https://astral.sh/uv/install.sh | sh
sudo apt install build-essential ninja-build

3. Get the app and its dependencies (~6.5 GB, mostly PyTorch for ROCm 10 from AMD's package index):

git clone https://github.com/almodover/pix2000.git
cd pix2000
uv sync

Check that the GPU is seen:

uv run python -c "import torch; print(torch.cuda.get_device_name(0))"
# -> AMD Radeon 8060S Graphics

4. Download the models. They are not included in this repository; the script fetches them from Hugging Face into models/. Download only the ones you want:

./download_models.sh z-image-turbo && ./download_models.sh swap-z-image
./download_models.sh flux2-klein-4b      # downloads, then converts to INT8
./download_models.sh qwen-image-2.1

FLUX.2 [klein] 9B is gated: accept its license on its model page, create a token at huggingface.co/settings/tokens, then:

export HF_TOKEN=hf_...
./download_models.sh flux2-klein-9b && ./download_models.sh awq

The FLUX downloads need extra free disk space while converting (~26 GB for the 4B, ~55 GB for the 9B); the script checks before starting.

5. Run it:

./run.sh

Open http://localhost:7860, choose a model, click ⬇ Charger (load), type a prompt and click Générer (generate) — the interface is in French. The first load of each model takes a little while; after that it stays in memory until you switch.

Tip: long generation sessions push the chip hard — give the machine good airflow. If one CPU core sits at 100 % while the app is idle and you also have ROCm 10 installed system-wide, start it with LD_PRELOAD=/opt/rocm/core-10.0/lib/libhsa-runtime64.so.1 ./run.sh.

Models and their licenses

Each model keeps its own license — check it before using the images commercially:

Credits

HP and Z2 are trademarks of HP Inc.; AMD, Ryzen, Radeon and ROCm are trademarks of Advanced Micro Devices, Inc. This project is not affiliated with or endorsed by either.

License

Apache-2.0. See NOTICE for credits.

Contact

Questions, bugs, ideas or just to say hi: Michael Amador — [email protected] or open an issue on GitHub.

About

Local image generation on AMD Strix Halo (Ryzen AI Max, ROCm 10): Z-Image Turbo, FLUX.2 [klein] 4B/9B and Qwen-Image 2.1 in one simple web app. Models downloaded from Hugging Face, not included.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages