File size: 3,138 Bytes
391fa05
 
 
 
 
 
 
 
 
 
 
 
bb20de6
391fa05
bb20de6
391fa05
bb20de6
391fa05
bb20de6
391fa05
bb20de6
391fa05
 
 
 
 
bb20de6
391fa05
bb20de6
391fa05
bb20de6
391fa05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bb20de6
 
 
 
 
 
391fa05
 
 
bb20de6
 
 
 
391fa05
bb20de6
 
 
 
 
391fa05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bb20de6
391fa05
bb20de6
 
391fa05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
---
library_name: tensorrt-rtx
license: apache-2.0
base_model: black-forest-labs/FLUX.1-dev
tags:
- tensorrt-rtx
- flux1
- fp4
- dev
- optimized
inference: false
---

# FLUX1 TensorRT-RTX: DEV-Fp4 πŸ”¨ Building

Optimized TensorRT-RTX engines for **FLUX1** on **Fp4** architecture with **DEV** quantization.

## 🎯 This Repository

**One variant, one download** - only get exactly what you need!

- **Model**: FLUX1
- **Architecture**: Fp4 (Compute Capability 8.0+)  
- **Quantization**: DEV
- **Memory**: TBD
- **Speed**: TBD for 1024x1024 generation

## πŸš€ Quick Start

### Automatic (Recommended)

```bash
# ImageAI server downloads automatically
curl -X POST "http://localhost:8001/generate" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a beautiful landscape",
    "model": "flux1-tensorrt_rtx:dev",
    "width": 1024,
    "height": 1024
  }'
```

### Manual Download

```python
from huggingface_hub import snapshot_download

# Download this specific variant only
engines_path = snapshot_download(
    repo_id="imgailab/flux1-trtx-dev-fp4-blackwell"
)

# Engines are in: engines_path/engines/*.plan
```

### Direct Integration

```python
from imageai_server.tensorrt.nvidia_sdxl_pipeline import NVIDIASDXLPipeline

pipeline = NVIDIASDXLPipeline()
pipeline.load_engines(
    engine_dir=f"{engines_path}/engines",
    framework_model_dir=f"{engines_path}/framework",  
    onnx_dir=f"{engines_path}/onnx"
)
pipeline.activate_engines()

images, time_ms = pipeline.infer(
    prompt="a serene mountain landscape",
    height=1024,
    width=1024
)
```

## πŸ“Š Performance

| Metric | Value |
|--------|-------|
| **Memory Usage** | TBD |
| **Inference Speed** | TBD |
| **Resolution** | 1024x1024 (optimized) |
| **Batch Size** | 1 (optimized) |
| **Precision** | DEV |

## πŸ”§ Requirements

### Hardware
- **GPU**: Fp4 architecture
  - Ampere: RTX 3090, A100, etc.
  - Ada Lovelace: RTX 4090, etc.
  - Blackwell: H200, etc.
- **VRAM**: TBD minimum
- **Compute Capability**: 8.0+

### Software  
- **TensorRT-RTX**: 1.0.0.21+
- **CUDA**: 12.0+
- **Python**: 3.8+

## πŸ“ Repository Structure

```
flux1-trtx-dev-fp4-blackwell/
β”œβ”€β”€ engines/           # TensorRT engine files
β”‚   β”œβ”€β”€ *.plan        # Optimized engines
β”œβ”€β”€ config.json       # Configuration metadata
└── README.md         # This file
```

## 🌐 Related Repositories

Other variants for FLUX1:
- [Ampere BF16](https://huggingface.co/imgailab/flux1-trtx-bf16-ampere)\n- [Ada FP8](https://huggingface.co/imgailab/flux1-trtx-fp8-ada)\n- [Ada BF16](https://huggingface.co/imgailab/flux1-trtx-bf16-ada)\n- [Blackwell FP4](https://huggingface.co/imgailab/flux1-trtx-fp4-blackwell)\n- [Blackwell FP8](https://huggingface.co/imgailab/flux1-trtx-fp8-blackwell)\n- [Blackwell BF16](https://huggingface.co/imgailab/flux1-trtx-bf16-blackwell)\n

## πŸ“ License

Inherits license from base model: [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev)

## πŸ”„ Updates

- **2025-08-12**: Initial release
- Optimized for single-variant downloads

---

*Part of the ImageAI TensorRT-RTX engine collection*