by amd
Open source · 31k downloads · 5 likes
Nitro 1 PixArt is a text-to-image generation model optimized for ultra-fast execution, capable of producing high-resolution visuals in a single step through advanced distillation. Built on a transformer-based architecture, it inherits the performance of PixArt-Sigma while drastically reducing resource requirements, with a 90.9% decrease in computational demands for nearly equivalent quality. Ideal for applications requiring instant generation, such as creative tools, visual assistants, or automated pipelines, it stands out for its energy efficiency and compatibility with AMD infrastructure. Its fast training process and open-source code also make it an accessible solution for research and prototyping.

Nitro-1 is a series of efficient text-to-image generation models that are distilled from popular diffusion models on AMD Instinct™ GPUs. The release consists of:
⚡️ Open-source code! The models are based on our re-implementation of Latent Adversarial Diffusion Distillation, the method used to build the popular Stable Diffusion 3 Turbo model. Since the original authors didn't provide training code, we release our re-implementation to help advance further research in the field.
from diffusers import PixArtSigmaPipeline
import torch
from safetensors.torch import load_file
pipe = PixArtSigmaPipeline.from_pretrained("PixArt-alpha/PixArt-Sigma-XL-2-1024-MS")
ckpt_path = '<path to distilled checkpoint>'
transformer_state_dict = load_file(ckpt_path)
pipe.transformer.load_state_dict(transformer_state_dict)
pipe = pipe.to("cuda")
image = pipe(prompt='a photo of a cat',
num_inference_steps=1,
guidance_scale=0,
timesteps=[400]).images[0]
For more details on training and evaluation please visit the GitHub repo.
Compared to PixArt-Sigma, our model achieves a 90.9% reduction in FLOPs at the cost of just 3.7% lower CLIP score and 10.5% higher FID.
| Model | FID ↓ | CLIP ↑ | FLOPs | Latency on AMD Instinct MI250 (sec) |
|---|---|---|---|---|
| PixArt-Sigma, 20 steps | 34.14 | 0.3289 | 187.96 | 7.46 |
| Nitro-1-PixArt, 1 step | 37.75 | 0.3167 | 17.04 | 0.53 |
Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.