Text-to-Image
Diffusers
Safetensors
English
Krea2Pipeline
image-generation
krea2
orbitquant
w4a4
4-bit precision
quantized
8-bit precision
Instructions to use WaveCut/Krea-2-Turbo-OrbitQuant-W4A4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use WaveCut/Krea-2-Turbo-OrbitQuant-W4A4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("WaveCut/Krea-2-Turbo-OrbitQuant-W4A4", 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
| { | |
| "protocol": "sequential components, lossless valid-token compaction, strict BF16 Flash SDPA, no callbacks in timed path, image save excluded", | |
| "source_model": "krea/Krea-2-Turbo", | |
| "source_revision": "98e0fe118d17c9e3547fbb2e25acdbae2cadf7c7", | |
| "original": { | |
| "variant": "original", | |
| "hardware": "NVIDIA A40", | |
| "source_revision": "98e0fe118d17c9e3547fbb2e25acdbae2cadf7c7", | |
| "quantized_revision": null, | |
| "candidate_root": null, | |
| "settings": { | |
| "width": 2048, | |
| "height": 2048, | |
| "num_inference_steps": 8, | |
| "guidance_scale": 0.0, | |
| "seed_base": 61000, | |
| "dtype": "bfloat16", | |
| "attention_backend": "strict Flash SDPA", | |
| "prompt_compaction": "lossless valid-token compaction", | |
| "vae_tiling": [ | |
| 1024, | |
| 896 | |
| ], | |
| "component_policy": "Qwen encode then release; DiT and tiled VAE render" | |
| }, | |
| "load_seconds": 16.22555137425661, | |
| "load_gpu_peak_mb": 25103, | |
| "load_torch_peak_mb": 24706.955078125, | |
| "qwen_inventory": { | |
| "class_name": "Qwen3VLModel", | |
| "orbitquant_linear_count": 0, | |
| "source_precision_linear_count": 356, | |
| "executed_orbitquant_linear_count": 0, | |
| "effective_runtime_modes": [], | |
| "activation_kernel_backends": [], | |
| "last_activation_cache_hits": 0, | |
| "dequantized_cache_bytes": 0, | |
| "int8_weight_cache_bytes": 0 | |
| }, | |
| "dit_inventory": { | |
| "class_name": "Krea2Transformer2DModel", | |
| "orbitquant_linear_count": 0, | |
| "source_precision_linear_count": 264, | |
| "executed_orbitquant_linear_count": 0, | |
| "effective_runtime_modes": [], | |
| "activation_kernel_backends": [], | |
| "last_activation_cache_hits": 0, | |
| "dequantized_cache_bytes": 0, | |
| "int8_weight_cache_bytes": 0 | |
| }, | |
| "generated_samples": 10, | |
| "first_generation_seconds": 54.746916238218546, | |
| "hot_generation_mean_seconds": 54.64761028728552, | |
| "hot_generation_median_seconds": 54.57881709188223, | |
| "generation_mean_seconds": 54.65754088237882, | |
| "generation_median_seconds": 54.648766504600644, | |
| "gpu_peak_mb": 31441, | |
| "torch_peak_mb": 28982.806640625 | |
| }, | |
| "orbitquant": { | |
| "variant": "orbitquant", | |
| "hardware": "NVIDIA A40", | |
| "source_revision": "98e0fe118d17c9e3547fbb2e25acdbae2cadf7c7", | |
| "quantized_revision": "49e89c37f51cb394b4ee199196d9df8bcd042475", | |
| "candidate_root": "/workspace/krea2-final-transformer-imgin", | |
| "settings": { | |
| "width": 2048, | |
| "height": 2048, | |
| "num_inference_steps": 8, | |
| "guidance_scale": 0.0, | |
| "seed_base": 61000, | |
| "dtype": "bfloat16", | |
| "attention_backend": "strict Flash SDPA", | |
| "prompt_compaction": "lossless valid-token compaction", | |
| "vae_tiling": [ | |
| 1024, | |
| 896 | |
| ], | |
| "component_policy": "Qwen encode then release; DiT and tiled VAE render" | |
| }, | |
| "load_seconds": 5.343890082091093, | |
| "load_gpu_peak_mb": 12635, | |
| "load_torch_peak_mb": 12431.72021484375, | |
| "qwen_inventory": { | |
| "class_name": "Qwen3VLModel", | |
| "orbitquant_linear_count": 356, | |
| "source_precision_linear_count": 0, | |
| "executed_orbitquant_linear_count": 252, | |
| "effective_runtime_modes": [ | |
| "native_packed_matmul" | |
| ], | |
| "activation_kernel_backends": [ | |
| "native_cuda_int8_surrogate", | |
| "triton_cuda_int8_surrogate" | |
| ], | |
| "last_activation_cache_hits": 108, | |
| "dequantized_cache_bytes": 0, | |
| "int8_weight_cache_bytes": 0 | |
| }, | |
| "dit_inventory": { | |
| "class_name": "Krea2Transformer2DModel", | |
| "orbitquant_linear_count": 232, | |
| "source_precision_linear_count": 32, | |
| "executed_orbitquant_linear_count": 232, | |
| "effective_runtime_modes": [ | |
| "native_packed_matmul" | |
| ], | |
| "activation_kernel_backends": [ | |
| "triton_cuda", | |
| "triton_cuda_int8_surrogate", | |
| "triton_cuda_packed_w4" | |
| ], | |
| "last_activation_cache_hits": 128, | |
| "dequantized_cache_bytes": 0, | |
| "int8_weight_cache_bytes": 0 | |
| }, | |
| "generated_samples": 10, | |
| "first_generation_seconds": 51.562784906476736, | |
| "hot_generation_mean_seconds": 50.08951893697182, | |
| "hot_generation_median_seconds": 49.98552576825023, | |
| "generation_mean_seconds": 50.23684553392231, | |
| "generation_median_seconds": 49.98872868530452, | |
| "gpu_peak_mb": 19177, | |
| "torch_peak_mb": 16798.73583984375 | |
| }, | |
| "orbitquant_empty_triton_cache": { | |
| "variant": "orbitquant", | |
| "hardware": "NVIDIA A40", | |
| "source_revision": "98e0fe118d17c9e3547fbb2e25acdbae2cadf7c7", | |
| "quantized_revision": "49e89c37f51cb394b4ee199196d9df8bcd042475", | |
| "candidate_root": "/workspace/krea2-final-transformer-imgin", | |
| "settings": { | |
| "width": 2048, | |
| "height": 2048, | |
| "num_inference_steps": 8, | |
| "guidance_scale": 0.0, | |
| "seed_base": 61000, | |
| "dtype": "bfloat16", | |
| "attention_backend": "strict Flash SDPA", | |
| "prompt_compaction": "lossless valid-token compaction", | |
| "vae_tiling": [ | |
| 1024, | |
| 896 | |
| ], | |
| "component_policy": "Qwen encode then release; DiT and tiled VAE render" | |
| }, | |
| "load_seconds": 8.288543954491615, | |
| "load_gpu_peak_mb": 12827, | |
| "load_torch_peak_mb": 12432.95947265625, | |
| "qwen_inventory": { | |
| "class_name": "Qwen3VLModel", | |
| "orbitquant_linear_count": 356, | |
| "source_precision_linear_count": 0, | |
| "executed_orbitquant_linear_count": 252, | |
| "effective_runtime_modes": [ | |
| "native_packed_matmul" | |
| ], | |
| "activation_kernel_backends": [ | |
| "native_cuda_int8_surrogate", | |
| "triton_cuda_int8_surrogate" | |
| ], | |
| "last_activation_cache_hits": 108, | |
| "dequantized_cache_bytes": 0, | |
| "int8_weight_cache_bytes": 0 | |
| }, | |
| "dit_inventory": { | |
| "class_name": "Krea2Transformer2DModel", | |
| "orbitquant_linear_count": 232, | |
| "source_precision_linear_count": 32, | |
| "executed_orbitquant_linear_count": 232, | |
| "effective_runtime_modes": [ | |
| "native_packed_matmul" | |
| ], | |
| "activation_kernel_backends": [ | |
| "triton_cuda", | |
| "triton_cuda_int8_surrogate", | |
| "triton_cuda_packed_w4" | |
| ], | |
| "last_activation_cache_hits": 128, | |
| "dequantized_cache_bytes": 0, | |
| "int8_weight_cache_bytes": 0 | |
| }, | |
| "generated_samples": 1, | |
| "first_generation_seconds": 68.87463613599539, | |
| "hot_generation_mean_seconds": 68.87463613599539, | |
| "hot_generation_median_seconds": 68.87463613599539, | |
| "generation_mean_seconds": 68.87463613599539, | |
| "generation_median_seconds": 68.87463613599539, | |
| "gpu_peak_mb": 18657, | |
| "torch_peak_mb": 16792.41357421875 | |
| }, | |
| "comparison": { | |
| "hot_end_to_end_speedup": 1.0918924279185949, | |
| "hot_end_to_end_elapsed_change_percent": -8.415886544223373, | |
| "nvml_peak_change_percent": -39.00639292643364, | |
| "torch_allocated_peak_change_percent": -42.03896107046763 | |
| }, | |
| "matrix": { | |
| "matrix_path": "assets/original_vs_orbitquant_w4a4.webp", | |
| "matrix_size": [ | |
| 8192, | |
| 10720 | |
| ], | |
| "tile_size": [ | |
| 2048, | |
| 2048 | |
| ], | |
| "prompt_count": 10, | |
| "prompt_pairs_per_row": 2, | |
| "label_height": 96, | |
| "resized": false, | |
| "preview_path": "assets/original_vs_orbitquant_w4a4_preview.webp", | |
| "preview_size": [ | |
| 2048, | |
| 2680 | |
| ] | |
| } | |
| } | |