Skip to content

Commit e39895a

Browse files
committed
add docs, update colors
1 parent fb33db8 commit e39895a

File tree

3 files changed

+98
-2
lines changed

3 files changed

+98
-2
lines changed

README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
<h2>Disk-to-GPU Tensor loading at up to 25Gbps without GDS</h2>
88
</div>
99

10+
## Updates
11+
12+
- **2025-11-25**: Now supports **multiple data types per checkpoint** with no regressions in speed!
13+
1014
<div align="center">
1115
<picture>
1216
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/fal-ai/flashpack/blob/main/media/benchmark-white.png?raw=true">
@@ -89,3 +93,95 @@ model = nn.Module(...)
8993
pack_to_file(model, flashpack_path) # write state dict to file
9094
assign_from_file(model, flashpack_path) # load state dict from file
9195
```
96+
97+
# CLI Commands
98+
99+
FlashPack provides a command-line interface for converting, inspecting, and reverting flashpack files.
100+
101+
## `flashpack convert`
102+
103+
Convert a model to a flashpack file.
104+
105+
```bash
106+
flashpack convert <path_or_repo_id> [destination_path] [options]
107+
```
108+
109+
**Arguments:**
110+
- `path_or_repo_id` - Local path or Hugging Face repository ID
111+
- `destination_path` - (Optional) Output path for the flashpack file
112+
113+
**Options:**
114+
| Option | Description |
115+
|--------|-------------|
116+
| `--subfolder` | Subfolder of the model (for repo_id) |
117+
| `--variant` | Model variant (for repo_id) |
118+
| `--dtype` | Target dtype for the flashpack file. When omitted, no type changes are made |
119+
| `--ignore-names` | Tensor names to ignore (can be specified multiple times) |
120+
| `--ignore-prefixes` | Tensor prefixes to ignore (can be specified multiple times) |
121+
| `--ignore-suffixes` | Tensor suffixes to ignore (can be specified multiple times) |
122+
| `--use-transformers` | Load the path as a transformers model |
123+
| `--use-diffusers` | Load the path as a diffusers model |
124+
| `-v, --verbose` | Enable verbose output |
125+
126+
**Examples:**
127+
```bash
128+
# Convert a local model
129+
flashpack convert ./my_model ./my_model.flashpack
130+
131+
# Convert from Hugging Face
132+
flashpack convert stabilityai/stable-diffusion-xl-base-1.0 --subfolder unet --use-diffusers
133+
134+
# Convert with specific dtype
135+
flashpack convert ./my_model ./my_model.flashpack --dtype float16
136+
```
137+
138+
## `flashpack revert`
139+
140+
Revert a flashpack file back to safetensors or torch format.
141+
142+
```bash
143+
flashpack revert <path> [destination_path] [options]
144+
```
145+
146+
**Arguments:**
147+
- `path` - Path to the flashpack file
148+
- `destination_path` - (Optional) Output path for the reverted file
149+
150+
**Options:**
151+
| Option | Description |
152+
|--------|-------------|
153+
| `-v, --verbose` | Enable verbose output |
154+
155+
**Example:**
156+
```bash
157+
flashpack revert ./my_model.flashpack ./my_model.safetensors
158+
```
159+
160+
## `flashpack metadata`
161+
162+
Print the metadata of a flashpack file.
163+
164+
```bash
165+
flashpack metadata <path> [options]
166+
```
167+
168+
**Arguments:**
169+
- `path` - Path to the flashpack file
170+
171+
**Options:**
172+
| Option | Description |
173+
|--------|-------------|
174+
| `-i, --show-index` | Show the tensor index |
175+
| `-j, --json` | Output metadata in JSON format |
176+
177+
**Examples:**
178+
```bash
179+
# View basic metadata
180+
flashpack metadata ./my_model.flashpack
181+
182+
# View metadata with tensor index
183+
flashpack metadata ./my_model.flashpack --show-index
184+
185+
# Output as JSON
186+
flashpack metadata ./my_model.flashpack --json
187+
```

scripts/plot_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# configuration
1111
accelerate_color = "#0f5ef3"
1212
flashpack_color = "#adff02"
13-
label_color = "#111111"
13+
label_color = "#eeeeee"
1414
model_labels = {
1515
"Wan-AI/Wan2.1-T2V-1.3B-Diffusers": "Wan2.1 1.3B DiT",
1616
"Wan-AI/Wan2.1-T2V-14B-Diffusers": "Wan2.1 14B DiT",

tests/test_speed_comparison.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def cuda_sync():
8383
# Plot configuration (aligned with scripts/plot-benchmark.py)
8484
accelerate_color = "#0f5ef3"
8585
flashpack_color = "#adff02"
86-
label_color = "#111111"
86+
label_color = "#eeeeee"
8787

8888
labels = [
8989
"pytorch",

0 commit comments

Comments
 (0)