Add model card 2
#3
by asabour - opened
- .gitattributes +1 -0
- README.md +242 -0
- assets/banner.jpg +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: nvidia-open-model-license
|
| 4 |
+
license_link: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
base_model:
|
| 8 |
+
- black-forest-labs/FLUX.1-dev
|
| 9 |
+
- Qwen/Qwen-Image
|
| 10 |
+
pipeline_tag: text-to-image
|
| 11 |
+
tags:
|
| 12 |
+
- nvidia
|
| 13 |
+
- distillation
|
| 14 |
+
- few-step-generation
|
| 15 |
+
- text-to-image
|
| 16 |
+
- image-generation
|
| 17 |
+
- fastgen
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
# **Align Your Flow: Scaling Continuous-Time Flow Map Distillation**
|
| 22 |
+
**[Paper](https://arxiv.org/abs/2506.14603)** | **[Code](https://github.com/NVlabs/fastgen)** | **[Project Page](https://research.nvidia.com/labs/toronto-ai/AlignYourFlow/)**
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
|
| 26 |
+
# Introduction
|
| 27 |
+
|
| 28 |
+
Align Your Flow (AYF) distills pretrained diffusion or flow-matching models into few-step flow map generators that can map between arbitrary noise levels in a single step, enabling fast high-quality image synthesis across different step counts.
|
| 29 |
+
AYF models are trained as LoRAs applied to existing text-to-image models. We leveraged [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev) and [Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) as base models and performed fine-tuning using lightweight LoRA adapters. This release comprises the LoRA adapters only.
|
| 30 |
+
|
| 31 |
+
This model is ready for commercial/non-commercial use. <br>
|
| 32 |
+
|
| 33 |
+
**Model Developer:** NVIDIA
|
| 34 |
+
|
| 35 |
+
### Model Versions
|
| 36 |
+
|
| 37 |
+
- AYF-FLUX (`flux.1-dev/model.pth`): LoRA adapter over [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev) for few-step (4-8) text-to-image generation.
|
| 38 |
+
- AYF-Qwen-Image (`qwen-image/model.pth`): LoRA adapter over [Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) for few-step (4-8) text-to-image generation.
|
| 39 |
+
|
| 40 |
+
## Quickstart
|
| 41 |
+
|
| 42 |
+
Install [FastGen](https://github.com/NVlabs/fastgen) and run its inference script with a checkpoint from this repository:
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
# FLUX.1 [dev]
|
| 46 |
+
torchrun --standalone --nproc_per_node=1 \
|
| 47 |
+
scripts/inference/image_model_inference.py \
|
| 48 |
+
--config fastgen/configs/experiments/Flux/config_ayf.py \
|
| 49 |
+
--ckpt_path FastGen-AYF/flux.1-dev/model.pth \
|
| 50 |
+
--do_student_sampling True \
|
| 51 |
+
--prompt_file scripts/inference/prompts/image_prompts.txt
|
| 52 |
+
|
| 53 |
+
# Qwen-Image
|
| 54 |
+
torchrun --standalone --nproc_per_node=1 \
|
| 55 |
+
scripts/inference/image_model_inference.py \
|
| 56 |
+
--config fastgen/configs/experiments/QwenImage/config_ayf.py \
|
| 57 |
+
--ckpt_path FastGen-AYF/qwen-image/model.pth \
|
| 58 |
+
--do_student_sampling True \
|
| 59 |
+
--prompt_file scripts/inference/prompts/image_prompts.txt
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
### License/Terms of Use
|
| 63 |
+
|
| 64 |
+
GOVERNING TERMS: Use of the Align Your Flow model is governed by the [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/).<br>
|
| 65 |
+
|
| 66 |
+
Use of the software components is governed by [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).<br>
|
| 67 |
+
|
| 68 |
+
Use of third-party models with Align Your Flow is subject to third party model terms and conditions. You are responsible for reviewing and complying with applicable-third party model terms.
|
| 69 |
+
|
| 70 |
+
### Deployment Geography
|
| 71 |
+
|
| 72 |
+
Global
|
| 73 |
+
|
| 74 |
+
### Use Case
|
| 75 |
+
|
| 76 |
+
This model is intended for users interested in fast, high-quality text-to-image generation. It enables few-step sampling for interactive creative workflows and low-latency deployment, where users iterate quickly on prompts while retaining strong image quality. <br>
|
| 77 |
+
|
| 78 |
+
### Release Date
|
| 79 |
+
|
| 80 |
+
Hugging Face [27/08/2026] via [https://huggingface.co/nvidia/FastGen-AYF](https://huggingface.co/nvidia/FastGen-AYF)
|
| 81 |
+
|
| 82 |
+
## Model Architecture
|
| 83 |
+
|
| 84 |
+
**Architecture Type:** Transformer <br>
|
| 85 |
+
**Network Architecture:** Multimodal Diffusion Transformer (MMDiT) <br>
|
| 86 |
+
|
| 87 |
+
**This model was developed based on [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev) and [Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) <br>
|
| 88 |
+
|
| 89 |
+
**Number of Model Parameters:** 357M (FLUX), 445M (Qwen-Image) <br>
|
| 90 |
+
|
| 91 |
+
## Input(s)
|
| 92 |
+
|
| 93 |
+
**Input Type(s):** Text <br>
|
| 94 |
+
|
| 95 |
+
**Input Format(s):** Text: String <br>
|
| 96 |
+
|
| 97 |
+
**Input Parameters:** Text: One-dimensional (1D) <br>
|
| 98 |
+
|
| 99 |
+
**Other Properties Related to Input**: The FLUX-based model uses CLIP and T5 text encoders which can handle up to 512 tokens. The Qwen-Image-based model uses a Qwen2.5-VL text encoder that can handle arbitrarily long inputs.
|
| 100 |
+
|
| 101 |
+
## Output(s)
|
| 102 |
+
|
| 103 |
+
**Output Type(s):** Image <br>
|
| 104 |
+
|
| 105 |
+
**Output Format(s):** Image: Red, Green, Blue (RGB) <br>
|
| 106 |
+
|
| 107 |
+
**Output Parameters:** Image: Two-Dimensional (2D), with 3 channel (Red, Green, Blue) <br>
|
| 108 |
+
|
| 109 |
+
**Other Properties Related to Output:** The model was primarily fine-tuned at 256x256, 512×512, and 1024×1024 resolutions, where it performs best, though other resolutions may also work.
|
| 110 |
+
|
| 111 |
+
Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems **A100**. By leveraging NVIDIA’s hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions. <br>
|
| 112 |
+
|
| 113 |
+
## Software Integration
|
| 114 |
+
|
| 115 |
+
**Runtime Engine(s):**
|
| 116 |
+
* PyTorch, FastGen <br>
|
| 117 |
+
|
| 118 |
+
**Supported Hardware Microarchitecture Compatibility:** <br>
|
| 119 |
+
* NVIDIA Ampere <br>
|
| 120 |
+
* NVIDIA Blackwell <br>
|
| 121 |
+
* NVIDIA Hopper <br>
|
| 122 |
+
|
| 123 |
+
**Supported Operating System(s):**
|
| 124 |
+
* Linux <br>
|
| 125 |
+
|
| 126 |
+
The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment. <br>
|
| 127 |
+
|
| 128 |
+
## Model Version(s)
|
| 129 |
+
|
| 130 |
+
- V1.0
|
| 131 |
+
|
| 132 |
+
## Training, Testing, and Evaluation Datasets
|
| 133 |
+
|
| 134 |
+
### Training Dataset:
|
| 135 |
+
|
| 136 |
+
We use the public [text-to-image-2M](https://huggingface.co/datasets/jackyhate/text-to-image-2M) for training.
|
| 137 |
+
|
| 138 |
+
- **Data Modality:** Image, Text <br>
|
| 139 |
+
|
| 140 |
+
- **Image Training Data Size:** Approximately 2 Million Images <br>
|
| 141 |
+
|
| 142 |
+
- **Text Training Data Size:** Less than a Billion Tokens <br>
|
| 143 |
+
|
| 144 |
+
- **Data Collection Method by dataset:** Hybrid: Automated, Automatic/Sensors, Synthetic, Human <br>
|
| 145 |
+
|
| 146 |
+
- **Labeling Method by dataset:** Hybrid: Automated, Automatic/Sensors, Synthetic, Human <br>
|
| 147 |
+
|
| 148 |
+
- **Properties:** The dataset consists of approximately 2M image-text pairs which are a mixture of synthetically generated images and real images with synthetic captions. <br>
|
| 149 |
+
|
| 150 |
+
- **Preprocessing:** Images were cropped and resized to the target training resolutions of 256×256, 512×512, and 1024×1024.
|
| 151 |
+
|
| 152 |
+
### Testing Dataset:
|
| 153 |
+
|
| 154 |
+
We used a subset of the training data for testing and validation.
|
| 155 |
+
|
| 156 |
+
- **Data Collection Method by dataset:** Hybrid: Automated, Automatic/Sensors, Synthetic, Human <br>
|
| 157 |
+
|
| 158 |
+
- **Labeling Method by dataset:** Hybrid: Automated, Automatic/Sensors, Synthetic, Human <br>
|
| 159 |
+
|
| 160 |
+
- **Properties:** The testing dataset is approximately a 10% split of the training dataset. <br>
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
## Key Considerations
|
| 164 |
+
|
| 165 |
+
AYF models are trained as LoRA (Low-Rank Adaptation) extensions applied to existing text-to-image architectures. For this release, we fine-tuned [FLUX.1 \[dev\]](https://huggingface.co/black-forest-labs/FLUX.1-dev) and [Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) using lightweight LoRA adapters. This release includes only the LoRA adapters, not the underlying base models.
|
| 166 |
+
|
| 167 |
+
Please note that the base models, when used independently, can generate synthetic images and may produce content that is inaccurate, offensive, or otherwise inappropriate. Users should implement robust safety guardrails—including content filtering, abuse monitoring, and access controls—to reduce the risk of harmful outputs. Users are responsible for ensuring that their use of the model complies with all applicable laws and regulations, and for reviewing and updating their guardrails as risks evolve.
|
| 168 |
+
|
| 169 |
+
## Inference
|
| 170 |
+
|
| 171 |
+
**Acceleration Engine:** N/A <br>
|
| 172 |
+
**Test Hardware:** NVIDIA A100 GPUs <br>
|
| 173 |
+
|
| 174 |
+
## Ethical Considerations
|
| 175 |
+
|
| 176 |
+
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. <br>
|
| 177 |
+
|
| 178 |
+
Please make sure you have proper rights and permissions for all input image and video content; if image or video includes people, personal health information, or intellectual property, the image or video generated will not blur or maintain proportions of image subjects included. <br>
|
| 179 |
+
|
| 180 |
+
For more detailed information on ethical considerations for this model, please see the Model Card++ Bias, Explainability, Safety & Security, and Privacy Subcards.
|
| 181 |
+
|
| 182 |
+
Users are responsible for model inputs and outputs. Users are responsible for ensuring safe integration of this model, including implementing guardrails as well as other safety mechanisms, prior to deployment. <br>
|
| 183 |
+
|
| 184 |
+
Please report model quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|
| 185 |
+
|
| 186 |
+
---
|
| 187 |
+
|
| 188 |
+
# Model Card++ Subcards
|
| 189 |
+
|
| 190 |
+
### Bias
|
| 191 |
+
|
| 192 |
+
Field | Response
|
| 193 |
+
:---------------------------------------------------------------------------------------------------|:---------------
|
| 194 |
+
Participation considerations from adversely impacted groups [protected classes](https://www.senate.ca.gov/content/protected-classes) in model design and testing: | None
|
| 195 |
+
Measures taken to mitigate against unwanted bias: | None
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
### Explainability
|
| 199 |
+
|
| 200 |
+
Field | Response
|
| 201 |
+
:------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------
|
| 202 |
+
Intended Task/Domain: | Text-to-Image Generation
|
| 203 |
+
Model Type: | Multimodal Diffusion Transformer (MMDiT)
|
| 204 |
+
Intended Users: | Generative AI creators working with image content.
|
| 205 |
+
Output: | Images
|
| 206 |
+
Describe how the model works: | The text input is encoded into tokens and is concatenated with random Gaussian noise before being passed into the transformer-based diffusion model that gradually denoises it into a clean image in 2-4 steps.
|
| 207 |
+
Name the adversely impacted groups this has been tested to deliver comparable outcomes regardless of: | Not Applicable
|
| 208 |
+
Technical Limitations & Mitigation: | While the model is trained to perform well for standard text inputs given 2-4 steps, it may not work well with out-of-distribution text prompts and may generate blurry outputs if used with only a single step.
|
| 209 |
+
Verified to have met prescribed NVIDIA quality standards: | Yes
|
| 210 |
+
Performance Metrics: | Prompt Adherence (Compositional Image Generation), Image Quality, Latency, Visual Inspection
|
| 211 |
+
Potential Known Risks: | The generated image may appear blurred and may contain unrealistic artifacts. The generated image may not fully adhere to the given prompt. <br> This model can generate synthetic images and may produce content that is inaccurate, offensive, or otherwise inappropriate. Users should implement robust safety guardrails—including content filtering, abuse monitoring, and access controls—to reduce the risk of harmful outputs. Users are responsible for ensuring that their use of the model complies with all applicable laws and regulations, and for reviewing and updating their guardrails as risks evolve.
|
| 212 |
+
Licensing: | GOVERNING TERMS: Use of the Align Your Flow model is governed by the [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/). Use of the software components is governed by [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). Use of third-party models with Align Your Flow is subject to third party model terms and conditions. You are responsible for reviewing and complying with applicable-third party model terms.
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
### Privacy
|
| 216 |
+
|
| 217 |
+
Field | Response
|
| 218 |
+
:----------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------
|
| 219 |
+
Generatable or reverse engineerable personal data? | Yes
|
| 220 |
+
Personal data used to create this model? | Yes
|
| 221 |
+
Was consent obtained for any personal data used? | Unknown (Externally-Sourced Data)
|
| 222 |
+
Is a mechanism in place to honor data subject right of access or deletion of personal data? | Unknown (Externally-Sourced Data)
|
| 223 |
+
If personal data was collected for the development of the model, was it collected directly by NVIDIA? | No
|
| 224 |
+
If personal data was collected for the development of the model by NVIDIA, do you maintain or have access to disclosures made to data subjects? | Not Applicable
|
| 225 |
+
If personal data was collected for the development of this AI model, was it minimized to only what was required? | Yes
|
| 226 |
+
How often is dataset reviewed? | Before Release
|
| 227 |
+
Was data from user interactions with the AI model (e.g. user input and prompts) used to train the model? | No
|
| 228 |
+
Is there provenance for all datasets used in training? | Yes
|
| 229 |
+
Does data labeling (annotation, metadata) comply with privacy laws? | Yes
|
| 230 |
+
Is data compliant with data subject requests for data correction or removal, if such a request was made? | No, not possible with externally sourced data
|
| 231 |
+
Applicable Privacy Policy | https://www.nvidia.com/en-us/about-nvidia/privacy-policy/
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
### Safety & Security
|
| 236 |
+
|
| 237 |
+
Field | Response
|
| 238 |
+
:---------------------------------------------------|:----------------------------------
|
| 239 |
+
Model Application Field(s): | Media & Entertainment
|
| 240 |
+
Describe the life critical impact (if present). | Not Applicable
|
| 241 |
+
Use Case Restrictions: | Abide by [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/). Use of the software components is governed by [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). Use of third-party models with Align Your Flow is subject to third party model terms and conditions. You are responsible for reviewing and complying with applicable-third party model terms.
|
| 242 |
+
Model and dataset restrictions: | The Principle of least privilege (PoLP) is applied limiting access for dataset generation and model development. Restrictions enforce dataset access during training, and dataset license constraints adhered to.
|
assets/banner.jpg
ADDED
|
Git LFS Details
|