Downloads · 30 days
0
kutayozbay/flux-lite-8B-1024x1024-tp4
flux-lite-8B-1024x1024-tp4 is a text-to-image model from kutayozbay. Use it when you need an image from a text prompt. It is set up for optimum.neuron. The card lists the license as creativeml-openrail-m.
🚀 This repository contains the compiled NeuronX graph for running Freepik’s Flux.1-Lite-8B model on AWS Inferentia2 (Inf2) instances, optimized for 1024×1024 image generation with tensor parallelism = 4.
Downloads · 30 days
0
Access
Public
Updated Oct 2, 2025
Repo size
28 GB
Likes
1
Public
Click a slice to open those files.
.safetensors16.3 GB · 58%
From the Hugging Face model README
🚀 This repository contains the compiled NeuronX graph for running Freepik’s Flux.1-Lite-8B model on AWS Inferentia2 (Inf2) instances, optimized for 1024×1024 image generation with tensor parallelism = 4.
The model has been compiled using 🤗 Optimum Neuron to leverage AWS NeuronCores for efficient inference at scale.
Freepik/flux.1-lite-8B4 (splits model across 4 NeuronCores)1024 × 10241bfloat16auto_cast="none")Make sure you are running on an AWS Inf2 instance with the AWS Neuron SDK installed.
pip install "optimum[neuron]" torch torchvision
from optimum.neuron import NeuronFluxPipeline
pipe = NeuronFluxPipeline.from_pretrained(
"kutayozbay/flux-lite-8B-1024x1024-tp4",
device="neuron", # run on AWS Inf2 NeuronCores
torch_dtype="bfloat16",
batch_size=1,
height=1024,
width=1024,
tensor_parallel_size=4,
)
prompt = "A futuristic city skyline at sunset"
image = pipe(prompt).images[0]
image.save("flux_output.png")
To compile this model yourself:
from optimum.neuron import NeuronFluxPipeline
compiler_args = {"auto_cast": "none"}
input_shapes = {"batch_size": 1, "height": 1024, "width": 1024}
pipe = NeuronFluxPipeline.from_pretrained(
"Freepik/flux.1-lite-8B",
torch_dtype="bfloat16",
export=True,
tensor_parallel_size=4,
**compiler_args,
**input_shapes,
)
pipe.save_pretrained("flux_lite_neuronx_1024_tp4/")