Instructions to use codeShare/Flux-Klein-SDNQ-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use codeShare/Flux-Klein-SDNQ-4bit with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("codeShare/Flux-Klein-SDNQ-4bit", 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
- Draw Things
- DiffusionBee
| { | |
| "architectures": [ | |
| "Qwen3ForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 151643, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151645, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2560, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 9728, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 40960, | |
| "max_window_layers": 36, | |
| "model_type": "qwen3", | |
| "num_attention_heads": 32, | |
| "num_hidden_layers": 36, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": null, | |
| "quantization_config": { | |
| "add_skip_keys": true, | |
| "dequantize_fp32": true, | |
| "dynamic_loss_threshold": null, | |
| "group_size": 0, | |
| "is_integer": true, | |
| "is_training": false, | |
| "modules_dtype_dict": { | |
| "uint4": [ | |
| "lm_head" | |
| ] | |
| }, | |
| "modules_quant_config": { | |
| "embed_tokens_per_layer": { | |
| "quantization_device": "cpu" | |
| } | |
| }, | |
| "modules_to_not_convert": [ | |
| "prediction_coefs", | |
| ".condition_embedder", | |
| "wte", | |
| ".emb_in", | |
| ".vid_out", | |
| "model.embed_tokens.weight", | |
| "embedding_projection", | |
| ".txt_in", | |
| ".txt_out", | |
| ".y_embedder", | |
| "patch_embed", | |
| "lm_head.weight", | |
| "multi_modal_projector", | |
| "patch_embedding", | |
| ".final_layer", | |
| ".time_embed", | |
| "lm_head", | |
| ".context_embedder", | |
| ".x_embedder", | |
| ".proj_out", | |
| "correction_coefs", | |
| ".vid_in", | |
| ".t_embedder", | |
| ".norm_out", | |
| ".emb_out", | |
| ".img_in", | |
| ".img_out", | |
| "patch_emb", | |
| "time_text_embed" | |
| ], | |
| "non_blocking": false, | |
| "quant_conv": false, | |
| "quant_embedding": false, | |
| "quant_method": "sdnq", | |
| "quantization_device": "cuda", | |
| "quantized_matmul_dtype": null, | |
| "return_device": "cpu", | |
| "sdnq_version": "0.1.7", | |
| "svd_rank": 32, | |
| "svd_steps": 8, | |
| "use_dynamic_quantization": false, | |
| "use_grad_ckpt": true, | |
| "use_quantized_matmul": true, | |
| "use_quantized_matmul_conv": false, | |
| "use_static_quantization": true, | |
| "use_stochastic_rounding": false, | |
| "use_svd": false, | |
| "weights_dtype": "uint4" | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "rope_theta": 1000000, | |
| "rope_type": "default" | |
| }, | |
| "sliding_window": null, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.0.0", | |
| "use_cache": true, | |
| "use_sliding_window": false, | |
| "vocab_size": 151936 | |
| } | |