Text-to-Image
Diffusers
Safetensors
MageFlowPipeline
image-generation
image-editing
diffusion
rectified-flow
mage-flow
Instructions to use microsoft/Mage-Flow-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use microsoft/Mage-Flow-Base with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("microsoft/Mage-Flow-Base", torch_dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
README: convert CLI flags description to a table
Browse files
README.md
CHANGED
|
@@ -310,7 +310,23 @@ img.save("single_edit_1024x1024.png")
|
|
| 310 |
|
| 311 |
### CLI
|
| 312 |
|
| 313 |
-
Both commands are **batched** — pass several `--prompt` values (sample `i` uses `--seed + i`).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 314 |
|
| 315 |
```bash
|
| 316 |
# text-to-image (two prompts in one batch)
|
|
|
|
| 310 |
|
| 311 |
### CLI
|
| 312 |
|
| 313 |
+
Both commands are **batched** — pass several `--prompt` values (sample `i` uses `--seed + i`). `--model_path` takes a **local repo dir or a Hugging Face Hub repo id** (e.g. `microsoft/Mage-Flow-4B`) — HF ids are downloaded and cached automatically.
|
| 314 |
+
|
| 315 |
+
| Flag | Scope | Meaning |
|
| 316 |
+
| :-------------------- | :---: | :---------------------------------------------------------------------------- |
|
| 317 |
+
| `--prompt` | both | one or more prompts, run as a batch (sample `i` uses `--seed + i`) |
|
| 318 |
+
| `--model_path` | both | local repo dir or HF Hub repo id (auto-downloaded + cached) |
|
| 319 |
+
| `--steps` | both | number of denoising steps |
|
| 320 |
+
| `--cfg` | both | classifier-free guidance scale |
|
| 321 |
+
| `--height` | both | output height — one value, or one per prompt for mixed resolutions |
|
| 322 |
+
| `--width` | both | output width — one value, or one per prompt for mixed resolutions |
|
| 323 |
+
| `--seed` | both | base seed (sample `i` uses `--seed + i`) |
|
| 324 |
+
| `--neg_prompt` | both | negative prompt |
|
| 325 |
+
| `--static_shift` | both | override the flow-matching sigma shift |
|
| 326 |
+
| `--out` | both | output directory |
|
| 327 |
+
| `--ref` | edit | reference image per prompt (comma-separate paths for a multi-image edit) |
|
| 328 |
+
| `--max_size` | edit | max size of the reference image |
|
| 329 |
+
| `--vl_cond_long_edge` | edit | VL-condition long edge (default `384`) |
|
| 330 |
|
| 331 |
```bash
|
| 332 |
# text-to-image (two prompts in one batch)
|