Text-to-Image
Diffusers
Safetensors
MageFlowPipeline
ajh
mage-flow
mage-flow-nvfp4-ajh
nvfp4
blackwell
qwen3-vl
quantization
Instructions to use ajh-code/Mage-Flow-NVFP4-AJH with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ajh-code/Mage-Flow-NVFP4-AJH with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ajh-code/Mage-Flow-NVFP4-AJH", 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
| { | |
| "base_models": { | |
| "mage_flow": "microsoft/Mage-Flow", | |
| "mage_source_commit": "df7f84d9f8fc991d189d929f03cff623b430a4a2", | |
| "mage_transformer_sha256": "04431abbc3acd1a5b86a7f77269f8e77e05a6cac3b21f35e1aef7493f6ab4934", | |
| "qwen": "Qwen/Qwen3-VL-4B-Instruct", | |
| "qwen_quantized": "InsecureErasure/Qwen3-VL-4B-Instruct-NVFP4", | |
| "qwen_quantized_revision": "cf080d6af667f5f4949295bd09a1f72a218fe0ee" | |
| }, | |
| "evidence": { | |
| "combined_frozen_val07": { | |
| "all_seven_gates_passed": true, | |
| "image_sha256": "857c1663636cd775ea05ffe37a98ac47ab7cd4e5362dd82c21ae1b53f7d71c3a", | |
| "result_sha256": "67afd8ca0c00fff949bfc4c8b660ca864617839cbc01231a7157769a964287c7" | |
| }, | |
| "legacy_portable_package_generation": { | |
| "image_sha256": "2c1f2853e37a2ede976f24bc9b7eef172aed7665266c615401ea189fcbcee19f", | |
| "report_sha256": "2877697cdf8d469f689aa68751d24c8f25288388f682e61355234e82fae35eda", | |
| "status": "success" | |
| }, | |
| "native_text_quality_gate_result_sha256": "4a31a2c0eb4cac7401224eaeab23577bd31cc5ef69f6edec5289757f113373e6", | |
| "standard_huggingface_layout_generation": { | |
| "bf16_target_weight_reads": 0, | |
| "image_sha256": "2c1f2853e37a2ede976f24bc9b7eef172aed7665266c615401ea189fcbcee19f", | |
| "layout": "complete_huggingface_sharded_repository", | |
| "loaded_non_target_tensor_count": 301, | |
| "loaded_nvfp4_projection_count": 48, | |
| "report_sha256": "61c8b651a5a9814c20fa4a99719e0b0a6caa827f61c0865993d916de25e6507d", | |
| "status": "success", | |
| "transformer_checkpoint_tensor_count": 493, | |
| "transformer_shard_count": 4 | |
| }, | |
| "showcase_cyborg": { | |
| "cfg": 5.0, | |
| "height": 1280, | |
| "image_sha256": "f93072e2d446c6c38ea70cc90a25680d9b684b6c5133946162657c1e2c957d02", | |
| "seed": 3334072683, | |
| "static_shift": 6.0, | |
| "steps": 20, | |
| "width": 1280 | |
| }, | |
| "transformer_quality_results": { | |
| "VAL-01": "82fadbc86ffb980a503c61ba50bfae25fd302503cf9ebb807029aacdc484f65a", | |
| "VAL-07": "2476505becf3cec14d174c35b42a92ae180cea1173ebe376d0d40f530a0292ce", | |
| "VAL-09": "c5d25ab78790295a0945b9783e146ff114991cc72af80a524d083034696110fc", | |
| "VAL-13": "d2f5b3e7b3be8d430fbd8ca47abdfa405d130f080d45a51fe5ab90fde309a07e" | |
| } | |
| }, | |
| "files": [ | |
| { | |
| "path": ".gitattributes", | |
| "role": "release support file", | |
| "sha256": "44f30cae84f06a5771fa870d5933a6fd1eb80d04e156f1bd1dfaf8869e91138e", | |
| "size": 142 | |
| }, | |
| { | |
| "path": "LICENSE", | |
| "role": "license or third-party attribution", | |
| "sha256": "275b4dd619de4e16a017b10d0beec72abbbbf14ee8a2fc68f8bdb398e821f623", | |
| "size": 1066 | |
| }, | |
| { | |
| "path": "README.md", | |
| "role": "Hugging Face model card and usage guide", | |
| "sha256": "f2186c7f4078254c485b5efef40cc47611783bff62342d893a235a3e131b4680", | |
| "size": 8059 | |
| }, | |
| { | |
| "path": "THIRD_PARTY_NOTICES.md", | |
| "role": "license or third-party attribution", | |
| "sha256": "848e6132befdb77dada57b9d077b19ad57d65d02b3df63161d3c8d6ee9a11e99", | |
| "size": 1336 | |
| }, | |
| { | |
| "path": "build_manifest.py", | |
| "role": "release manifest builder", | |
| "sha256": "82ea93365ae63418268f28cdf3fc8f2360ab5a3ba19da2a42ea914e832a9c45d", | |
| "size": 8056 | |
| }, | |
| { | |
| "path": "build_native.sh", | |
| "role": "project-local native runtime build helper", | |
| "sha256": "7e1bccc38c982b05c0ad027c3faace9c0d5783e638e75ff4875430d5ab34445d", | |
| "size": 1803 | |
| }, | |
| { | |
| "path": "examples/VAL-07_combined_native.png", | |
| "role": "validated combined NVFP4 example output", | |
| "sha256": "857c1663636cd775ea05ffe37a98ac47ab7cd4e5362dd82c21ae1b53f7d71c3a", | |
| "size": 174472 | |
| }, | |
| { | |
| "path": "examples/cyborg_stargaze_nvfp4.png", | |
| "role": "released-package showcase output", | |
| "sha256": "f93072e2d446c6c38ea70cc90a25680d9b684b6c5133946162657c1e2c957d02", | |
| "size": 1860812 | |
| }, | |
| { | |
| "path": "generate.py", | |
| "role": "portable single-image inference entry point", | |
| "sha256": "aaa7aa6a101cbdf5d2bfde1354b162df58c7fa50309d40514d8b137c79485d23", | |
| "size": 14516 | |
| }, | |
| { | |
| "path": "licenses/MAGE-MIT.txt", | |
| "role": "license or third-party attribution", | |
| "sha256": "275b4dd619de4e16a017b10d0beec72abbbbf14ee8a2fc68f8bdb398e821f623", | |
| "size": 1066 | |
| }, | |
| { | |
| "path": "licenses/QWEN-APACHE-2.0.txt", | |
| "role": "license or third-party attribution", | |
| "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", | |
| "size": 11358 | |
| }, | |
| { | |
| "path": "model_index.json", | |
| "role": "Hugging Face Diffusers metadata and download-tracking query file", | |
| "sha256": "6d07c7d0d05992544b66126adff35f21e8c9036f8b0b7ca623c92d7bd97c2213", | |
| "size": 614 | |
| }, | |
| { | |
| "path": "requirements.txt", | |
| "role": "release support file", | |
| "sha256": "2a16308e6034f1b06d60afd70bcd488f0f79b9499c9ff0acbf1c028652320f42", | |
| "size": 485 | |
| }, | |
| { | |
| "path": "run_validation.py", | |
| "role": "portable frozen-prompt validation entry point", | |
| "sha256": "47ea74991108f4f9ce519ae00ebbfe36d76ebf775ed598a9b539dc3112f7cd3a", | |
| "size": 2044 | |
| }, | |
| { | |
| "path": "runtime/libmage_nvfp4_linear.so", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "d2f7d62d26b4ae3babb7791aee8e0d95ad4794ac9c1d22146c974784381ada48", | |
| "size": 1158440 | |
| }, | |
| { | |
| "path": "runtime/libmage_nvfp4_torch_op.so", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "d0cd7bbde23fa8187d28cda21ad74b79696bf607d40e47a534922670fe597ad4", | |
| "size": 167176 | |
| }, | |
| { | |
| "path": "runtime/nvfp4_linear.cu", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "060697d4784be3e3461d38ef6ff24128f47a4322a05e5463f8687796b03bda9f", | |
| "size": 32166 | |
| }, | |
| { | |
| "path": "runtime/nvfp4_linear.h", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "7eba9c6b155730fad23b86314903d5cd96ee4430daf2d45706288fc7a9f5ee09", | |
| "size": 2231 | |
| }, | |
| { | |
| "path": "runtime/packed_artifact.py", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "6f3b3220421d42a19573e852641dff00f75a6d7ee87975bd3d82c995ee86ba05", | |
| "size": 40672 | |
| }, | |
| { | |
| "path": "runtime/packed_nvfp4_linear.py", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "65a98172fedc59023c80c55c723956746c13e14f3783bdf687af39cdf0ee1397", | |
| "size": 17469 | |
| }, | |
| { | |
| "path": "runtime/quant_text_encoder.py", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "d5f38363256d67dee3532531b4a4ae080fa736e1bdd3499e615cb6142bcf808a", | |
| "size": 13452 | |
| }, | |
| { | |
| "path": "runtime/sm120_linear_op.cpp", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "a53e1e83df95922eaa384503ce5c5bab31ef65becfcf3e0ac623b1f0868d278a", | |
| "size": 12179 | |
| }, | |
| { | |
| "path": "runtime/standard_transformer.py", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "d1a0b25ddace31569aeff166cb8d1b2a7a016ee50827ab1f9dd0ae476fc96ba1", | |
| "size": 7891 | |
| }, | |
| { | |
| "path": "runtime/torch_ops_native.py", | |
| "role": "native runtime, loader, source, or Python integration", | |
| "sha256": "842e0f0f14faca41d8801ff52d435e30d180e34907b81cbbddc5aff6dfab1829", | |
| "size": 7980 | |
| }, | |
| { | |
| "path": "scheduler/scheduler_config.json", | |
| "role": "Mage FlowMatch scheduler component", | |
| "sha256": "438fd8bcf254740e5d3f3e9800bbd9c571e342ab87885388d1505b7531c69c02", | |
| "size": 169 | |
| }, | |
| { | |
| "path": "text_encoder/chat_template.json", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "6f8a6a55027e3da5160105556cda5dd69f6423f1c32645f6730d32de7773d0c4", | |
| "size": 5502 | |
| }, | |
| { | |
| "path": "text_encoder/config.json", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "d9e81f6f1d8d9ea613d55599041c6f579fbf4a9e9e0eacc9dbdb5e2300b1c281", | |
| "size": 1789 | |
| }, | |
| { | |
| "path": "text_encoder/generation_config.json", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "8469742d1fce0de951c8909b26a2c0c0d8490837ce476efb114da9e0cefc4d44", | |
| "size": 269 | |
| }, | |
| { | |
| "path": "text_encoder/merges.txt", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3", | |
| "size": 1671839 | |
| }, | |
| { | |
| "path": "text_encoder/model.safetensors", | |
| "role": "complete mixed NVFP4/FP8 Qwen3-VL text checkpoint", | |
| "sha256": "719906b435800757d22013d3d475a4853d59b779b022669fa8b8a193b85d0f41", | |
| "size": 4031376064 | |
| }, | |
| { | |
| "path": "text_encoder/preprocessor_config.json", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516", | |
| "size": 390 | |
| }, | |
| { | |
| "path": "text_encoder/tokenizer.json", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "a5d85b6dcc535e6b93115a9ef287e6132fdbf30270da6218194ba742261173c7", | |
| "size": 7032403 | |
| }, | |
| { | |
| "path": "text_encoder/tokenizer_config.json", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "c2da771801886ad9ae98181793ffd3dfb7f1af30f6f7c6a4e15d7dbba52e2399", | |
| "size": 10868 | |
| }, | |
| { | |
| "path": "text_encoder/video_preprocessor_config.json", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13", | |
| "size": 385 | |
| }, | |
| { | |
| "path": "text_encoder/vocab.json", | |
| "role": "packaged Qwen3-VL configuration or tokenizer asset", | |
| "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910", | |
| "size": 2776833 | |
| }, | |
| { | |
| "path": "transformer/config.json", | |
| "role": "Mage transformer component configuration, index, or quantization metadata", | |
| "sha256": "7520e71b0a4965f23e54308939853229fe1c32fbd10c69aac5adaead24d21475", | |
| "size": 3194 | |
| }, | |
| { | |
| "path": "transformer/diffusion_pytorch_model-00001-of-00004.safetensors", | |
| "role": "complete sharded Mage transformer checkpoint with native NVFP4 modules", | |
| "sha256": "040143f2dfc32db4220aabe46d98971e1701c83a566ccdb39e2553218f35f0dd", | |
| "size": 1797002592 | |
| }, | |
| { | |
| "path": "transformer/diffusion_pytorch_model-00002-of-00004.safetensors", | |
| "role": "complete sharded Mage transformer checkpoint with native NVFP4 modules", | |
| "sha256": "d7116264ef3cf0721c197ff4012de319b844abec1a43df1ade7d8868ce43f4a9", | |
| "size": 1850448056 | |
| }, | |
| { | |
| "path": "transformer/diffusion_pytorch_model-00003-of-00004.safetensors", | |
| "role": "complete sharded Mage transformer checkpoint with native NVFP4 modules", | |
| "sha256": "7534b2e25cf0e90a2bb0cca9d77f6cb2dc29198b2e387bf36cd59878bf9559b4", | |
| "size": 1850448056 | |
| }, | |
| { | |
| "path": "transformer/diffusion_pytorch_model-00004-of-00004.safetensors", | |
| "role": "complete sharded Mage transformer checkpoint with native NVFP4 modules", | |
| "sha256": "05a975382c7bada173c01f6005da16d7c78eaba771d554f0551934a25f1836d6", | |
| "size": 128986568 | |
| }, | |
| { | |
| "path": "transformer/diffusion_pytorch_model.safetensors.index.json", | |
| "role": "Mage transformer component configuration, index, or quantization metadata", | |
| "sha256": "6fc021886f29df126c3ff64cd61287869a2b9b3d142fee6084f81171cbdc90d8", | |
| "size": 51641 | |
| }, | |
| { | |
| "path": "transformer/nvfp4_metadata.json", | |
| "role": "Mage transformer component configuration, index, or quantization metadata", | |
| "sha256": "8aa6f8494dacd10f23e48e64ca6bdc0cc05754dffadd746bd6f500aa08c745fa", | |
| "size": 71892 | |
| }, | |
| { | |
| "path": "vae/config.json", | |
| "role": "complete Mage VAE component", | |
| "sha256": "abd124d603d6c6a03e9d0f2aa6d113b8c4afda0738400bdf2f99240aeaeaff76", | |
| "size": 112 | |
| }, | |
| { | |
| "path": "vae/diffusion_pytorch_model.safetensors", | |
| "role": "complete Mage VAE component", | |
| "sha256": "34e076dc1e8a15321e1e07be5111d59cf16dd10b804b7c7e20b4de29013427e0", | |
| "size": 345053056 | |
| }, | |
| { | |
| "path": "validate_release.py", | |
| "role": "package hash validator", | |
| "sha256": "9c14818d8939f880be8702222d0345ab0af44fbb8fefa98600d414e2c469eb75", | |
| "size": 2877 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/__init__.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "0709764f182b55fdec6b8195a4d18640fe0ffef3785d3977d8ebc29905de7489", | |
| "size": 367 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/app.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "ac0597feddf1b6c5aaa2f18cc3ebb3e690dc42232462ac778af45044df41435e", | |
| "size": 9004 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/inference.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "0a1e196f784f4daf4b4d1607cade1d066908341e0e444aa29fcea3967a8c1a3f", | |
| "size": 7181 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/__init__.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "7e5ba07fdb01f4a5912eaeb3afbe9d4ccc4e391e7de4cdc11865e5aa911ddfd5", | |
| "size": 56 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/mage_flow.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "59b6e1bee7f95a7fd2fa7bd9e765966832951e2bb184b5ae27283884997b845f", | |
| "size": 15991 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/modules/__init__.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", | |
| "size": 0 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/modules/_attn_backend.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "7d652eeb2ab39e37554e3d62859c74edeffc8dce70b2c15687060c259647b559", | |
| "size": 7946 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/modules/mage_latent.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "9ffd7c68b6053ad37f6bf0925d8d94dcd72af751448ee0228ec13018fedf54e5", | |
| "size": 4118 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/modules/mage_layers.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "4b198343b8929f48a0a14d388502c81f54be17b222f6831303d2da6a91f33a62", | |
| "size": 30418 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/modules/mage_text.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "eed7846d02bee28ebf7a1fb45db7d9f621dd66e702e761848d67bed426c1c4a7", | |
| "size": 21247 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/modules/mage_vae.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "64f4d7041003e416bc2f4fac5bbf8aabf2e7c798ad106682c34332ba347b0ef9", | |
| "size": 25112 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/modules/text_encoder.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "65e490ce35fbe4d4057f115be2ab8731e01ea44b618c10aabac80d51fc38ef81", | |
| "size": 29405 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/models/utils.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "0f242ca7a77e0f85b5985b5299304aa0786737de1ba414c7f8f47b8d664dbca8", | |
| "size": 6649 | |
| }, | |
| { | |
| "path": "vendor/mage_flow/pipeline.py", | |
| "role": "pinned Microsoft Mage inference source", | |
| "sha256": "b9fc57018570372dd3404a733e19b918a359188dd9f5ef7817c6b30969fc13db", | |
| "size": 37089 | |
| } | |
| ], | |
| "measurements": { | |
| "combined_text_stage_peak_allocated_bytes": 10437891584, | |
| "combined_val07_latent_cosine": 0.9339298064776214, | |
| "combined_val07_latent_nrmse": 0.36180871546574084, | |
| "combined_val07_pixel_cosine": 0.9927827428055002, | |
| "combined_val07_pixel_nrmse": 0.12000220627369493, | |
| "full_generation_speed_claim_ready": false, | |
| "text_encoder_allocated_saving_bytes": 4834599424, | |
| "text_encoder_allocated_saving_gib": 4.5025715827941895, | |
| "transformer_allocated_saving_bytes": 2604638208, | |
| "transformer_allocated_saving_gib": 2.4257583618164062 | |
| }, | |
| "policy": { | |
| "component_layout": "complete_huggingface_sharded_repository", | |
| "mage_transformer": { | |
| "format": "native resident W4A4 NVFP4", | |
| "target_bf16_source_reads": 0, | |
| "target_count": 48 | |
| }, | |
| "native_compute_capability": "12.0", | |
| "qwen_text_encoder": { | |
| "bf16_policy": "blocks 0/35, embeddings, norms, biases, vision tower", | |
| "fp8_projection_count": 14, | |
| "nvfp4_projection_count": 224 | |
| } | |
| }, | |
| "release_status": "validated-standard-huggingface-candidate", | |
| "schema_version": "mage-flow-nvfp4-huggingface-release-v1" | |
| } | |