Instructions to use ModelsLab/flux-klein-9b-transformer-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ModelsLab/flux-klein-9b-transformer-fp8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ModelsLab/flux-klein-9b-transformer-fp8", 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
| { | |
| "time_guidance_embed.timestep_embedder.linear_1": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "time_guidance_embed.timestep_embedder.linear_2": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "double_stream_modulation_img.linear": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "double_stream_modulation_txt.linear": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_stream_modulation.linear": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "x_embedder": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "context_embedder": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.attn.to_q": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.attn.to_k": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.attn.to_v": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.attn.to_out.0": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.attn.add_q_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.attn.add_k_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.attn.add_v_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.attn.to_add_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.ff.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.ff.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.ff_context.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.0.ff_context.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.attn.to_q": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.attn.to_k": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.attn.to_v": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.attn.to_out.0": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.attn.add_q_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.attn.add_k_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.attn.add_v_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.attn.to_add_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.ff.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.ff.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.ff_context.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.1.ff_context.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.attn.to_q": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.attn.to_k": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.attn.to_v": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.attn.to_out.0": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.attn.add_q_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.attn.add_k_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.attn.add_v_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.attn.to_add_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.ff.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.ff.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.ff_context.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.2.ff_context.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.attn.to_q": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.attn.to_k": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.attn.to_v": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.attn.to_out.0": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.attn.add_q_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.attn.add_k_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.attn.add_v_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.attn.to_add_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.ff.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.ff.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.ff_context.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.3.ff_context.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.attn.to_q": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.attn.to_k": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.attn.to_v": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.attn.to_out.0": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.attn.add_q_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.attn.add_k_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.attn.add_v_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.attn.to_add_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.ff.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.ff.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.ff_context.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.4.ff_context.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.attn.to_q": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.attn.to_k": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.attn.to_v": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.attn.to_out.0": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.attn.add_q_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.attn.add_k_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.attn.add_v_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.attn.to_add_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.ff.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.ff.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.ff_context.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.5.ff_context.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.attn.to_q": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.attn.to_k": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.attn.to_v": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.attn.to_out.0": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.attn.add_q_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.attn.add_k_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.attn.add_v_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.attn.to_add_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.ff.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.ff.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.ff_context.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.6.ff_context.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.attn.to_q": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.attn.to_k": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.attn.to_v": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.attn.to_out.0": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.attn.add_q_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.attn.add_k_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.attn.add_v_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.attn.to_add_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.ff.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.ff.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.ff_context.linear_in": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "transformer_blocks.7.ff_context.linear_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.0.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.0.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.1.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.1.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.2.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.2.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.3.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.3.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.4.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.4.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.5.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.5.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.6.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.6.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.7.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.7.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.8.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.8.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.9.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.9.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.10.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.10.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.11.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.11.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.12.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.12.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.13.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.13.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.14.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.14.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.15.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.15.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.16.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.16.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.17.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.17.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.18.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.18.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.19.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.19.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.20.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.20.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.21.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.21.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.22.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.22.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.23.attn.to_qkv_mlp_proj": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "single_transformer_blocks.23.attn.to_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "norm_out.linear": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| }, | |
| "proj_out": { | |
| "weights": "qfloat8_e4m3fn", | |
| "activations": "none" | |
| } | |
| } |