Views
No views yet
pip install pruna1from pruna import PrunaModel
2
3loaded_model = PrunaModel.from_pretrained(
4 "PrunaAI/flux2-klein-4b-optimized-smashed"
5)
6# we can then run inference using the methods supported by the base modelsmash_config.json file, which describes the optimization methods that were applied to the model.1{
2 "awq": false,
3 "c_generate": false,
4 "c_translate": false,
5 "c_whisper": false,
6 "deepcache": false,
7 "diffusers_int8": false,
8 "fastercache": false,
9 "flash_attn3": false,
10 "fora": true,
11 "gptq": false,
12 "half": false,
13 "hqq": false,
14 "hqq_diffusers": false,
15 "hyper": false,
16 "ifw": false,
17 "img2img_denoise": false,
18 "ipex_llm": false,
19 "llm_int8": false,
20 "moe_kernel_tuner": false,
21 "pab": false,
22 "padding_pruning": false,
23 "qkv_diffusers": false,
24 "quanto": false,
25 "realesrgan_upscale": false,
26 "reduce_noe": false,
27 "ring_attn": false,
28 "sage_attn": false,
29 "stable_fast": false,
30 "text_to_image_distillation_inplace_perp": false,
31 "text_to_image_distillation_lora": false,
32 "text_to_image_distillation_perp": false,
33 "text_to_image_inplace_perp": false,
34 "text_to_image_lora": false,
35 "text_to_image_perp": false,
36 "text_to_text_inplace_perp": false,
37 "text_to_text_lora": false,
38 "text_to_text_perp": false,
39 "torch_compile": true,
40 "torch_dynamic": false,
41 "torch_structured": false,
42 "torch_unstructured": false,
43 "torchao": true,
44 "whisper_s2t": false,
45 "x_fast": false,
46 "zipar": false,
47 "fora_backbone_calls_per_step": 2,
48 "fora_interval": 3,
49 "fora_start_step": 4,
50 "torch_compile_backend": "inductor",
51 "torch_compile_dynamic": null,
52 "torch_compile_fullgraph": false,
53 "torch_compile_make_portable": false,
54 "torch_compile_max_kv_cache_size": 400,
55 "torch_compile_mode": "default",
56 "torch_compile_seqlen_manual_cuda_graph": 100,
57 "torch_compile_target": "model",
58 "torchao_excluded_modules": "none",
59 "torchao_quant_type": "fp8wo",
60 "torchao_target_modules": {
61 "include": [
62 "*single_transformer_blocks.*"
63 ],
64 "exclude": [
65 "pe_embedder",
66 "*norm*",
67 "*embed*"
68 ]
69 },
70 "batch_size": 1,
71 "device": "cuda",
72 "device_map": null,
73 "save_fns": [
74 "save_before_apply",
75 "save_before_apply"
76 ],
77 "save_artifacts_fns": [],
78 "load_fns": [
79 "diffusers"
80 ],
81 "load_artifacts_fns": [],
82 "reapply_after_load": {
83 "torchao": true,
84 "fora": true,
85 "torch_compile": true
86 }
87}