Image-to-Image
Diffusers
Safetensors
MageFlowPipeline
image-editing
instruction-based-editing
diffusion
rectified-flow
mage-flow
Instructions to use microsoft/Mage-Flow-Edit-Turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use microsoft/Mage-Flow-Edit-Turbo with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("microsoft/Mage-Flow-Edit-Turbo", torch_dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
add transformer
Browse files
transformer/config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"in_channels": 128,
|
| 3 |
+
"out_channels": 128,
|
| 4 |
+
"vec_in_dim": 0,
|
| 5 |
+
"context_in_dim": 2560,
|
| 6 |
+
"hidden_size": 3072,
|
| 7 |
+
"mlp_ratio": 4.0,
|
| 8 |
+
"num_heads": 24,
|
| 9 |
+
"depth": 12,
|
| 10 |
+
"depth_single_blocks": 0,
|
| 11 |
+
"axes_dim": [
|
| 12 |
+
16,
|
| 13 |
+
56,
|
| 14 |
+
56
|
| 15 |
+
],
|
| 16 |
+
"theta": 10000,
|
| 17 |
+
"patch_size": 1,
|
| 18 |
+
"qkv_bias": true,
|
| 19 |
+
"guidance_embed": false,
|
| 20 |
+
"checkpoint": false,
|
| 21 |
+
"rope_type": "msrope",
|
| 22 |
+
"time_type": "qwen_proj",
|
| 23 |
+
"double_block_type": "double_stream",
|
| 24 |
+
"vec_type": null,
|
| 25 |
+
"apply_text_rotary_emb": false,
|
| 26 |
+
"_class_name": "MageFlow",
|
| 27 |
+
"txt_max_length": 2048,
|
| 28 |
+
"max_sequence_length": 2048,
|
| 29 |
+
"param_dtype": "bfloat16",
|
| 30 |
+
"packing": true,
|
| 31 |
+
"schedule_mode": "z-image",
|
| 32 |
+
"static_shift": 6.0,
|
| 33 |
+
"use_time_shift": false
|
| 34 |
+
}
|
transformer/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29c3726ecd64afe149eef28af3e27b6b40de52646bfd16757a37da4b6fbcf288
|
| 3 |
+
size 8231536760
|