Text-to-Image
Diffusers
Safetensors
Krea2Pipeline
krea
nunchaku
svdquant
int4
quantization
8-bit precision
Instructions to use lite-infer/krea-2-turbo-nunchaku-lite-int4_r32-bnb4-text-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lite-infer/krea-2-turbo-nunchaku-lite-int4_r32-bnb4-text-encoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("lite-infer/krea-2-turbo-nunchaku-lite-int4_r32-bnb4-text-encoder", 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
Add files using upload-large-folder tool
Browse files- .gitattributes +57 -0
- LICENSE.pdf +3 -0
- README.md +74 -0
- model_index.json +40 -0
- output_comparison.png +3 -0
- scheduler/scheduler_config.json +18 -0
- text_encoder/config.json +81 -0
- text_encoder/model.safetensors +3 -0
- tokenizer/chat_template.jinja +120 -0
- tokenizer/tokenizer.json +3 -0
- tokenizer/tokenizer_config.json +29 -0
- transformer/config.json +292 -0
- transformer/diffusion_pytorch_model.safetensors +3 -0
- vae/config.json +58 -0
- vae/diffusion_pytorch_model.safetensors +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,60 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
LICENSE.pdf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
images/00.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
images/01.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
images/02.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
images/03.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
images/04.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
images/05.png filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
images/06.png filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
images/07.png filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
images/08.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
images/09.png filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
images/10.png filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
images/11.png filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
images/12.png filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
images/13.png filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
images/14.png filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
images/15.png filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
images/header.png filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
images/00.jpg filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
images/01.jpg filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
images/02.jpg filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
images/03.jpg filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
images/04.jpg filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
images/05.jpg filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
images/06.jpg filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
images/07.jpg filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
images/08.jpg filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
images/09.jpg filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
images/10.jpg filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
images/11.jpg filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
images/12.jpg filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
images/13.jpg filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
images/14.jpg filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
images/15.jpg filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
images/header.jpg filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
images/16.jpg filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
images/17.jpg filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
images/18.jpg filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
images/19.jpg filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
images/20.jpg filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
images/21.jpg filter=lfs diff=lfs merge=lfs -text
|
| 78 |
+
images/22.jpg filter=lfs diff=lfs merge=lfs -text
|
| 79 |
+
images/23.jpg filter=lfs diff=lfs merge=lfs -text
|
| 80 |
+
images/24.jpg filter=lfs diff=lfs merge=lfs -text
|
| 81 |
+
images/25.jpg filter=lfs diff=lfs merge=lfs -text
|
| 82 |
+
images/26.jpg filter=lfs diff=lfs merge=lfs -text
|
| 83 |
+
images/27.jpg filter=lfs diff=lfs merge=lfs -text
|
| 84 |
+
images/28.jpg filter=lfs diff=lfs merge=lfs -text
|
| 85 |
+
images/29.jpg filter=lfs diff=lfs merge=lfs -text
|
| 86 |
+
images/30.jpg filter=lfs diff=lfs merge=lfs -text
|
| 87 |
+
images/31.jpg filter=lfs diff=lfs merge=lfs -text
|
| 88 |
+
images/32.jpg filter=lfs diff=lfs merge=lfs -text
|
| 89 |
+
images/33.jpg filter=lfs diff=lfs merge=lfs -text
|
| 90 |
+
images/34.jpg filter=lfs diff=lfs merge=lfs -text
|
| 91 |
+
images/35.jpg filter=lfs diff=lfs merge=lfs -text
|
| 92 |
+
output_comparison.png filter=lfs diff=lfs merge=lfs -text
|
LICENSE.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b82a2805162bde714a4eb27b9063c4fc3345d08a30be055134a6160e5430ba74
|
| 3 |
+
size 137711
|
README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: krea-2-community-license
|
| 4 |
+
license_link: https://cdn.jsdelivr.net/gh/krea-ai/krea-2@db3984fbc6e13b34c0064990fc2d95ac64d00058/assets/hf_samples/LICENSE.pdf
|
| 5 |
+
base_model: krea/Krea-2-Turbo
|
| 6 |
+
pipeline_tag: text-to-image
|
| 7 |
+
library_name: diffusers
|
| 8 |
+
tags:
|
| 9 |
+
- krea
|
| 10 |
+
- text-to-image
|
| 11 |
+
- nunchaku
|
| 12 |
+
- svdquant
|
| 13 |
+
- int4
|
| 14 |
+
- quantization
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Krea 2 Turbo Nunchaku Lite INT4 r32
|
| 18 |
+
|
| 19 |
+
Diffusers-loadable INT4 conversion of `krea/Krea-2-Turbo`, quantized with
|
| 20 |
+
[`diffuse-compressor`](https://github.com/rootonchair/diffuse-compressor). It
|
| 21 |
+
loads with a plain `from_pretrained` call — no runtime graph patches and no extra
|
| 22 |
+
runtime package.
|
| 23 |
+
|
| 24 |
+
The transformer uses `quant_method: nunchaku_lite`, INT4 SVDQ with group size
|
| 25 |
+
64, rank 32, 256 SVDQ targets and no AWQ W4A16 targets. Eight outer linears (`img_in`, time/text embedders, `time_mod_proj`, `text_fusion.projector`, `final_layer.linear`) stay
|
| 26 |
+
in bf16, and the `text_encoder` component is BitsAndBytes 4-bit NF4 with bf16
|
| 27 |
+
compute. QKV projections are not fused, so this trades some speed for loading
|
| 28 |
+
through the stock Diffusers graph. Calibrated on 32 prompts at
|
| 29 |
+
8 steps, 1024x1024.
|
| 30 |
+
|
| 31 |
+
## Benchmark
|
| 32 |
+
|
| 33 |
+
| Checkpoint | Latency | Max VRAM |
|
| 34 |
+
| --- | ---: | ---: |
|
| 35 |
+
| **This repo** — Nunchaku Lite INT4 r32 + BNB4 text encoder | 60.70 s (stdev 0.04 s) | 19.97 GiB |
|
| 36 |
+
| Nunchaku Lite NVFP4 r32 + BNB4 text encoder | 34.06 s (stdev 0.03 s) | 20.34 GiB |
|
| 37 |
+
|
| 38 |
+
NVIDIA RTX PRO 4000 Blackwell, 1024x1024, 8 steps, guidance scale 0.0, seed 12345, one warmup
|
| 39 |
+
and three measured runs, everything resident on the GPU with no offload. Latency
|
| 40 |
+
covers the full pipeline call; VRAM is peak device usage.
|
| 41 |
+
|
| 42 |
+
There is no dense bf16 row because a dense bf16 *latency* row cannot be measured on this 24 GiB GPU: the dense transformer alone is 26.3 GiB, so it does not fit resident and only the quantized builds run without offload. The dense reference image below was still generated from the same weights under offload, which changes speed but not numerics. The NVFP4 build is 1.78x faster **on this GPU**, because NVIDIA RTX PRO 4000 Blackwell has native FP4 tensor cores that only NVFP4 can use. **INT4 is the build for Turing through Ada, where NVFP4 does not run at all**; it has not been benchmarked there, so no latency is claimed for that hardware. The quantized rows are directly comparable to each other.
|
| 43 |
+
|
| 44 |
+
## Output Comparison
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
|
| 48 |
+
Dense reference (left) and this build (right). Same prompt, seed, scheduler, resolution, and step count. Pixel **MAE 16.01 / RMSE 34.05** against the dense reference, versus 8.18 / 19.92 for the NVFP4 build.
|
| 49 |
+
|
| 50 |
+
## Run
|
| 51 |
+
|
| 52 |
+
Requires the Hugging Face `kernels` package and `DIFFUSERS_TRUST_REMOTE_KERNELS=true`,
|
| 53 |
+
plus a Diffusers build with the `nunchaku_lite` quantizer. INT4 needs
|
| 54 |
+
a Turing or newer NVIDIA GPU; Hopper is unsupported.
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
import torch
|
| 58 |
+
from diffusers import Krea2Pipeline
|
| 59 |
+
|
| 60 |
+
pipe = Krea2Pipeline.from_pretrained(
|
| 61 |
+
"lite-infer/krea-2-turbo-nunchaku-lite-int4_r32-bnb4-text-encoder",
|
| 62 |
+
torch_dtype=torch.bfloat16,
|
| 63 |
+
).to("cuda")
|
| 64 |
+
|
| 65 |
+
image = pipe(
|
| 66 |
+
prompt="a fox in the snow",
|
| 67 |
+
generator=torch.Generator("cuda").manual_seed(12345),
|
| 68 |
+
width=1024,
|
| 69 |
+
height=1024,
|
| 70 |
+
num_inference_steps=8,
|
| 71 |
+
guidance_scale=0.0,
|
| 72 |
+
).images[0]
|
| 73 |
+
image.save("output.png")
|
| 74 |
+
```
|
model_index.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "Krea2Pipeline",
|
| 3 |
+
"_diffusers_version": "0.39.0.dev0",
|
| 4 |
+
"scheduler": [
|
| 5 |
+
"diffusers",
|
| 6 |
+
"FlowMatchEulerDiscreteScheduler"
|
| 7 |
+
],
|
| 8 |
+
"text_encoder": [
|
| 9 |
+
"transformers",
|
| 10 |
+
"Qwen3VLModel"
|
| 11 |
+
],
|
| 12 |
+
"text_encoder_select_layers": [
|
| 13 |
+
2,
|
| 14 |
+
5,
|
| 15 |
+
8,
|
| 16 |
+
11,
|
| 17 |
+
14,
|
| 18 |
+
17,
|
| 19 |
+
20,
|
| 20 |
+
23,
|
| 21 |
+
26,
|
| 22 |
+
29,
|
| 23 |
+
32,
|
| 24 |
+
35
|
| 25 |
+
],
|
| 26 |
+
"tokenizer": [
|
| 27 |
+
"transformers",
|
| 28 |
+
"Qwen2Tokenizer"
|
| 29 |
+
],
|
| 30 |
+
"transformer": [
|
| 31 |
+
"diffusers",
|
| 32 |
+
"Krea2Transformer2DModel"
|
| 33 |
+
],
|
| 34 |
+
"vae": [
|
| 35 |
+
"diffusers",
|
| 36 |
+
"AutoencoderKLQwenImage"
|
| 37 |
+
],
|
| 38 |
+
"is_distilled": true,
|
| 39 |
+
"patch_size": 2
|
| 40 |
+
}
|
output_comparison.png
ADDED
|
Git LFS Details
|
scheduler/scheduler_config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "FlowMatchEulerDiscreteScheduler",
|
| 3 |
+
"_diffusers_version": "0.39.0.dev0",
|
| 4 |
+
"base_image_seq_len": 256,
|
| 5 |
+
"base_shift": 0.5,
|
| 6 |
+
"invert_sigmas": false,
|
| 7 |
+
"max_image_seq_len": 6400,
|
| 8 |
+
"max_shift": 1.15,
|
| 9 |
+
"num_train_timesteps": 1000,
|
| 10 |
+
"shift": 1.0,
|
| 11 |
+
"shift_terminal": null,
|
| 12 |
+
"stochastic_sampling": false,
|
| 13 |
+
"time_shift_type": "exponential",
|
| 14 |
+
"use_beta_sigmas": false,
|
| 15 |
+
"use_dynamic_shifting": true,
|
| 16 |
+
"use_exponential_sigmas": false,
|
| 17 |
+
"use_karras_sigmas": false
|
| 18 |
+
}
|
text_encoder/config.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3VLModel"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "bfloat16",
|
| 6 |
+
"image_token_id": 151655,
|
| 7 |
+
"model_type": "qwen3_vl",
|
| 8 |
+
"quantization_config": {
|
| 9 |
+
"_load_in_4bit": true,
|
| 10 |
+
"_load_in_8bit": false,
|
| 11 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 12 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 13 |
+
"bnb_4bit_quant_type": "nf4",
|
| 14 |
+
"bnb_4bit_use_double_quant": false,
|
| 15 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 16 |
+
"llm_int8_has_fp16_weight": false,
|
| 17 |
+
"llm_int8_skip_modules": null,
|
| 18 |
+
"llm_int8_threshold": 6.0,
|
| 19 |
+
"load_in_4bit": true,
|
| 20 |
+
"load_in_8bit": false,
|
| 21 |
+
"quant_method": "bitsandbytes"
|
| 22 |
+
},
|
| 23 |
+
"text_config": {
|
| 24 |
+
"attention_bias": false,
|
| 25 |
+
"attention_dropout": 0.0,
|
| 26 |
+
"bos_token_id": 151643,
|
| 27 |
+
"dtype": "bfloat16",
|
| 28 |
+
"eos_token_id": 151645,
|
| 29 |
+
"head_dim": 128,
|
| 30 |
+
"hidden_act": "silu",
|
| 31 |
+
"hidden_size": 2560,
|
| 32 |
+
"initializer_range": 0.02,
|
| 33 |
+
"intermediate_size": 9728,
|
| 34 |
+
"max_position_embeddings": 262144,
|
| 35 |
+
"model_type": "qwen3_vl_text",
|
| 36 |
+
"num_attention_heads": 32,
|
| 37 |
+
"num_hidden_layers": 36,
|
| 38 |
+
"num_key_value_heads": 8,
|
| 39 |
+
"pad_token_id": null,
|
| 40 |
+
"rms_norm_eps": 1e-06,
|
| 41 |
+
"rope_parameters": {
|
| 42 |
+
"mrope_interleaved": true,
|
| 43 |
+
"mrope_section": [
|
| 44 |
+
24,
|
| 45 |
+
20,
|
| 46 |
+
20
|
| 47 |
+
],
|
| 48 |
+
"rope_theta": 5000000,
|
| 49 |
+
"rope_type": "default"
|
| 50 |
+
},
|
| 51 |
+
"tie_word_embeddings": true,
|
| 52 |
+
"use_cache": true,
|
| 53 |
+
"vocab_size": 151936
|
| 54 |
+
},
|
| 55 |
+
"tie_word_embeddings": true,
|
| 56 |
+
"transformers_version": "5.15.0",
|
| 57 |
+
"video_token_id": 151656,
|
| 58 |
+
"vision_config": {
|
| 59 |
+
"deepstack_visual_indexes": [
|
| 60 |
+
5,
|
| 61 |
+
11,
|
| 62 |
+
17
|
| 63 |
+
],
|
| 64 |
+
"depth": 24,
|
| 65 |
+
"dtype": "bfloat16",
|
| 66 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 67 |
+
"hidden_size": 1024,
|
| 68 |
+
"in_channels": 3,
|
| 69 |
+
"initializer_range": 0.02,
|
| 70 |
+
"intermediate_size": 4096,
|
| 71 |
+
"model_type": "qwen3_vl_vision",
|
| 72 |
+
"num_heads": 16,
|
| 73 |
+
"num_position_embeddings": 2304,
|
| 74 |
+
"out_hidden_size": 2560,
|
| 75 |
+
"patch_size": 16,
|
| 76 |
+
"spatial_merge_size": 2,
|
| 77 |
+
"temporal_patch_size": 2
|
| 78 |
+
},
|
| 79 |
+
"vision_end_token_id": 151653,
|
| 80 |
+
"vision_start_token_id": 151652
|
| 81 |
+
}
|
text_encoder/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7658ec0bcc519c8f8942576791e5f0191c4d4d15af74ce30f2c23b55baafacfc
|
| 3 |
+
size 3062139944
|
tokenizer/chat_template.jinja
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0].role == 'system' %}
|
| 4 |
+
{%- if messages[0].content is string %}
|
| 5 |
+
{{- messages[0].content }}
|
| 6 |
+
{%- else %}
|
| 7 |
+
{%- for content in messages[0].content %}
|
| 8 |
+
{%- if 'text' in content %}
|
| 9 |
+
{{- content.text }}
|
| 10 |
+
{%- endif %}
|
| 11 |
+
{%- endfor %}
|
| 12 |
+
{%- endif %}
|
| 13 |
+
{{- '\n\n' }}
|
| 14 |
+
{%- endif %}
|
| 15 |
+
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 16 |
+
{%- for tool in tools %}
|
| 17 |
+
{{- "\n" }}
|
| 18 |
+
{{- tool | tojson }}
|
| 19 |
+
{%- endfor %}
|
| 20 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 21 |
+
{%- else %}
|
| 22 |
+
{%- if messages[0].role == 'system' %}
|
| 23 |
+
{{- '<|im_start|>system\n' }}
|
| 24 |
+
{%- if messages[0].content is string %}
|
| 25 |
+
{{- messages[0].content }}
|
| 26 |
+
{%- else %}
|
| 27 |
+
{%- for content in messages[0].content %}
|
| 28 |
+
{%- if 'text' in content %}
|
| 29 |
+
{{- content.text }}
|
| 30 |
+
{%- endif %}
|
| 31 |
+
{%- endfor %}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{{- '<|im_end|>\n' }}
|
| 34 |
+
{%- endif %}
|
| 35 |
+
{%- endif %}
|
| 36 |
+
{%- set image_count = namespace(value=0) %}
|
| 37 |
+
{%- set video_count = namespace(value=0) %}
|
| 38 |
+
{%- for message in messages %}
|
| 39 |
+
{%- if message.role == "user" %}
|
| 40 |
+
{{- '<|im_start|>' + message.role + '\n' }}
|
| 41 |
+
{%- if message.content is string %}
|
| 42 |
+
{{- message.content }}
|
| 43 |
+
{%- else %}
|
| 44 |
+
{%- for content in message.content %}
|
| 45 |
+
{%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
|
| 46 |
+
{%- set image_count.value = image_count.value + 1 %}
|
| 47 |
+
{%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
|
| 48 |
+
<|vision_start|><|image_pad|><|vision_end|>
|
| 49 |
+
{%- elif content.type == 'video' or 'video' in content %}
|
| 50 |
+
{%- set video_count.value = video_count.value + 1 %}
|
| 51 |
+
{%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
|
| 52 |
+
<|vision_start|><|video_pad|><|vision_end|>
|
| 53 |
+
{%- elif 'text' in content %}
|
| 54 |
+
{{- content.text }}
|
| 55 |
+
{%- endif %}
|
| 56 |
+
{%- endfor %}
|
| 57 |
+
{%- endif %}
|
| 58 |
+
{{- '<|im_end|>\n' }}
|
| 59 |
+
{%- elif message.role == "assistant" %}
|
| 60 |
+
{{- '<|im_start|>' + message.role + '\n' }}
|
| 61 |
+
{%- if message.content is string %}
|
| 62 |
+
{{- message.content }}
|
| 63 |
+
{%- else %}
|
| 64 |
+
{%- for content_item in message.content %}
|
| 65 |
+
{%- if 'text' in content_item %}
|
| 66 |
+
{{- content_item.text }}
|
| 67 |
+
{%- endif %}
|
| 68 |
+
{%- endfor %}
|
| 69 |
+
{%- endif %}
|
| 70 |
+
{%- if message.tool_calls %}
|
| 71 |
+
{%- for tool_call in message.tool_calls %}
|
| 72 |
+
{%- if (loop.first and message.content) or (not loop.first) %}
|
| 73 |
+
{{- '\n' }}
|
| 74 |
+
{%- endif %}
|
| 75 |
+
{%- if tool_call.function %}
|
| 76 |
+
{%- set tool_call = tool_call.function %}
|
| 77 |
+
{%- endif %}
|
| 78 |
+
{{- '<tool_call>\n{"name": "' }}
|
| 79 |
+
{{- tool_call.name }}
|
| 80 |
+
{{- '", "arguments": ' }}
|
| 81 |
+
{%- if tool_call.arguments is string %}
|
| 82 |
+
{{- tool_call.arguments }}
|
| 83 |
+
{%- else %}
|
| 84 |
+
{{- tool_call.arguments | tojson }}
|
| 85 |
+
{%- endif %}
|
| 86 |
+
{{- '}\n</tool_call>' }}
|
| 87 |
+
{%- endfor %}
|
| 88 |
+
{%- endif %}
|
| 89 |
+
{{- '<|im_end|>\n' }}
|
| 90 |
+
{%- elif message.role == "tool" %}
|
| 91 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 92 |
+
{{- '<|im_start|>user' }}
|
| 93 |
+
{%- endif %}
|
| 94 |
+
{{- '\n<tool_response>\n' }}
|
| 95 |
+
{%- if message.content is string %}
|
| 96 |
+
{{- message.content }}
|
| 97 |
+
{%- else %}
|
| 98 |
+
{%- for content in message.content %}
|
| 99 |
+
{%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
|
| 100 |
+
{%- set image_count.value = image_count.value + 1 %}
|
| 101 |
+
{%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
|
| 102 |
+
<|vision_start|><|image_pad|><|vision_end|>
|
| 103 |
+
{%- elif content.type == 'video' or 'video' in content %}
|
| 104 |
+
{%- set video_count.value = video_count.value + 1 %}
|
| 105 |
+
{%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
|
| 106 |
+
<|vision_start|><|video_pad|><|vision_end|>
|
| 107 |
+
{%- elif 'text' in content %}
|
| 108 |
+
{{- content.text }}
|
| 109 |
+
{%- endif %}
|
| 110 |
+
{%- endfor %}
|
| 111 |
+
{%- endif %}
|
| 112 |
+
{{- '\n</tool_response>' }}
|
| 113 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 114 |
+
{{- '<|im_end|>\n' }}
|
| 115 |
+
{%- endif %}
|
| 116 |
+
{%- endif %}
|
| 117 |
+
{%- endfor %}
|
| 118 |
+
{%- if add_generation_prompt %}
|
| 119 |
+
{{- '<|im_start|>assistant\n' }}
|
| 120 |
+
{%- endif %}
|
tokenizer/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
|
| 3 |
+
size 11422650
|
tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|im_start|>",
|
| 10 |
+
"<|im_end|>",
|
| 11 |
+
"<|object_ref_start|>",
|
| 12 |
+
"<|object_ref_end|>",
|
| 13 |
+
"<|box_start|>",
|
| 14 |
+
"<|box_end|>",
|
| 15 |
+
"<|quad_start|>",
|
| 16 |
+
"<|quad_end|>",
|
| 17 |
+
"<|vision_start|>",
|
| 18 |
+
"<|vision_end|>",
|
| 19 |
+
"<|vision_pad|>",
|
| 20 |
+
"<|image_pad|>",
|
| 21 |
+
"<|video_pad|>"
|
| 22 |
+
],
|
| 23 |
+
"is_local": true,
|
| 24 |
+
"model_max_length": 262144,
|
| 25 |
+
"pad_token": "<|endoftext|>",
|
| 26 |
+
"split_special_tokens": false,
|
| 27 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 28 |
+
"unk_token": null
|
| 29 |
+
}
|
transformer/config.json
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "Krea2Transformer2DModel",
|
| 3 |
+
"_diffusers_version": "0.39.0.dev0",
|
| 4 |
+
"attention_head_dim": 128,
|
| 5 |
+
"axes_dims_rope": [
|
| 6 |
+
32,
|
| 7 |
+
48,
|
| 8 |
+
48
|
| 9 |
+
],
|
| 10 |
+
"in_channels": 64,
|
| 11 |
+
"intermediate_size": 16384,
|
| 12 |
+
"norm_eps": 1e-05,
|
| 13 |
+
"num_attention_heads": 48,
|
| 14 |
+
"num_key_value_heads": 12,
|
| 15 |
+
"num_layers": 28,
|
| 16 |
+
"num_layerwise_text_blocks": 2,
|
| 17 |
+
"num_refiner_text_blocks": 2,
|
| 18 |
+
"num_text_layers": 12,
|
| 19 |
+
"quantization_config": {
|
| 20 |
+
"compute_dtype": "bfloat16",
|
| 21 |
+
"quant_method": "nunchaku_lite",
|
| 22 |
+
"svdq_w4a4": {
|
| 23 |
+
"group_size": 64,
|
| 24 |
+
"precision": "int4",
|
| 25 |
+
"rank": 32,
|
| 26 |
+
"targets": [
|
| 27 |
+
"text_fusion.layerwise_blocks.0.attn.to_q",
|
| 28 |
+
"text_fusion.layerwise_blocks.0.attn.to_k",
|
| 29 |
+
"text_fusion.layerwise_blocks.0.attn.to_v",
|
| 30 |
+
"text_fusion.layerwise_blocks.0.attn.to_gate",
|
| 31 |
+
"text_fusion.layerwise_blocks.0.attn.to_out.0",
|
| 32 |
+
"text_fusion.layerwise_blocks.0.ff.gate",
|
| 33 |
+
"text_fusion.layerwise_blocks.0.ff.up",
|
| 34 |
+
"text_fusion.layerwise_blocks.0.ff.down",
|
| 35 |
+
"text_fusion.layerwise_blocks.1.attn.to_q",
|
| 36 |
+
"text_fusion.layerwise_blocks.1.attn.to_k",
|
| 37 |
+
"text_fusion.layerwise_blocks.1.attn.to_v",
|
| 38 |
+
"text_fusion.layerwise_blocks.1.attn.to_gate",
|
| 39 |
+
"text_fusion.layerwise_blocks.1.attn.to_out.0",
|
| 40 |
+
"text_fusion.layerwise_blocks.1.ff.gate",
|
| 41 |
+
"text_fusion.layerwise_blocks.1.ff.up",
|
| 42 |
+
"text_fusion.layerwise_blocks.1.ff.down",
|
| 43 |
+
"text_fusion.refiner_blocks.0.attn.to_q",
|
| 44 |
+
"text_fusion.refiner_blocks.0.attn.to_k",
|
| 45 |
+
"text_fusion.refiner_blocks.0.attn.to_v",
|
| 46 |
+
"text_fusion.refiner_blocks.0.attn.to_gate",
|
| 47 |
+
"text_fusion.refiner_blocks.0.attn.to_out.0",
|
| 48 |
+
"text_fusion.refiner_blocks.0.ff.gate",
|
| 49 |
+
"text_fusion.refiner_blocks.0.ff.up",
|
| 50 |
+
"text_fusion.refiner_blocks.0.ff.down",
|
| 51 |
+
"text_fusion.refiner_blocks.1.attn.to_q",
|
| 52 |
+
"text_fusion.refiner_blocks.1.attn.to_k",
|
| 53 |
+
"text_fusion.refiner_blocks.1.attn.to_v",
|
| 54 |
+
"text_fusion.refiner_blocks.1.attn.to_gate",
|
| 55 |
+
"text_fusion.refiner_blocks.1.attn.to_out.0",
|
| 56 |
+
"text_fusion.refiner_blocks.1.ff.gate",
|
| 57 |
+
"text_fusion.refiner_blocks.1.ff.up",
|
| 58 |
+
"text_fusion.refiner_blocks.1.ff.down",
|
| 59 |
+
"transformer_blocks.0.attn.to_q",
|
| 60 |
+
"transformer_blocks.0.attn.to_k",
|
| 61 |
+
"transformer_blocks.0.attn.to_v",
|
| 62 |
+
"transformer_blocks.0.attn.to_gate",
|
| 63 |
+
"transformer_blocks.0.attn.to_out.0",
|
| 64 |
+
"transformer_blocks.0.ff.gate",
|
| 65 |
+
"transformer_blocks.0.ff.up",
|
| 66 |
+
"transformer_blocks.0.ff.down",
|
| 67 |
+
"transformer_blocks.1.attn.to_q",
|
| 68 |
+
"transformer_blocks.1.attn.to_k",
|
| 69 |
+
"transformer_blocks.1.attn.to_v",
|
| 70 |
+
"transformer_blocks.1.attn.to_gate",
|
| 71 |
+
"transformer_blocks.1.attn.to_out.0",
|
| 72 |
+
"transformer_blocks.1.ff.gate",
|
| 73 |
+
"transformer_blocks.1.ff.up",
|
| 74 |
+
"transformer_blocks.1.ff.down",
|
| 75 |
+
"transformer_blocks.2.attn.to_q",
|
| 76 |
+
"transformer_blocks.2.attn.to_k",
|
| 77 |
+
"transformer_blocks.2.attn.to_v",
|
| 78 |
+
"transformer_blocks.2.attn.to_gate",
|
| 79 |
+
"transformer_blocks.2.attn.to_out.0",
|
| 80 |
+
"transformer_blocks.2.ff.gate",
|
| 81 |
+
"transformer_blocks.2.ff.up",
|
| 82 |
+
"transformer_blocks.2.ff.down",
|
| 83 |
+
"transformer_blocks.3.attn.to_q",
|
| 84 |
+
"transformer_blocks.3.attn.to_k",
|
| 85 |
+
"transformer_blocks.3.attn.to_v",
|
| 86 |
+
"transformer_blocks.3.attn.to_gate",
|
| 87 |
+
"transformer_blocks.3.attn.to_out.0",
|
| 88 |
+
"transformer_blocks.3.ff.gate",
|
| 89 |
+
"transformer_blocks.3.ff.up",
|
| 90 |
+
"transformer_blocks.3.ff.down",
|
| 91 |
+
"transformer_blocks.4.attn.to_q",
|
| 92 |
+
"transformer_blocks.4.attn.to_k",
|
| 93 |
+
"transformer_blocks.4.attn.to_v",
|
| 94 |
+
"transformer_blocks.4.attn.to_gate",
|
| 95 |
+
"transformer_blocks.4.attn.to_out.0",
|
| 96 |
+
"transformer_blocks.4.ff.gate",
|
| 97 |
+
"transformer_blocks.4.ff.up",
|
| 98 |
+
"transformer_blocks.4.ff.down",
|
| 99 |
+
"transformer_blocks.5.attn.to_q",
|
| 100 |
+
"transformer_blocks.5.attn.to_k",
|
| 101 |
+
"transformer_blocks.5.attn.to_v",
|
| 102 |
+
"transformer_blocks.5.attn.to_gate",
|
| 103 |
+
"transformer_blocks.5.attn.to_out.0",
|
| 104 |
+
"transformer_blocks.5.ff.gate",
|
| 105 |
+
"transformer_blocks.5.ff.up",
|
| 106 |
+
"transformer_blocks.5.ff.down",
|
| 107 |
+
"transformer_blocks.6.attn.to_q",
|
| 108 |
+
"transformer_blocks.6.attn.to_k",
|
| 109 |
+
"transformer_blocks.6.attn.to_v",
|
| 110 |
+
"transformer_blocks.6.attn.to_gate",
|
| 111 |
+
"transformer_blocks.6.attn.to_out.0",
|
| 112 |
+
"transformer_blocks.6.ff.gate",
|
| 113 |
+
"transformer_blocks.6.ff.up",
|
| 114 |
+
"transformer_blocks.6.ff.down",
|
| 115 |
+
"transformer_blocks.7.attn.to_q",
|
| 116 |
+
"transformer_blocks.7.attn.to_k",
|
| 117 |
+
"transformer_blocks.7.attn.to_v",
|
| 118 |
+
"transformer_blocks.7.attn.to_gate",
|
| 119 |
+
"transformer_blocks.7.attn.to_out.0",
|
| 120 |
+
"transformer_blocks.7.ff.gate",
|
| 121 |
+
"transformer_blocks.7.ff.up",
|
| 122 |
+
"transformer_blocks.7.ff.down",
|
| 123 |
+
"transformer_blocks.8.attn.to_q",
|
| 124 |
+
"transformer_blocks.8.attn.to_k",
|
| 125 |
+
"transformer_blocks.8.attn.to_v",
|
| 126 |
+
"transformer_blocks.8.attn.to_gate",
|
| 127 |
+
"transformer_blocks.8.attn.to_out.0",
|
| 128 |
+
"transformer_blocks.8.ff.gate",
|
| 129 |
+
"transformer_blocks.8.ff.up",
|
| 130 |
+
"transformer_blocks.8.ff.down",
|
| 131 |
+
"transformer_blocks.9.attn.to_q",
|
| 132 |
+
"transformer_blocks.9.attn.to_k",
|
| 133 |
+
"transformer_blocks.9.attn.to_v",
|
| 134 |
+
"transformer_blocks.9.attn.to_gate",
|
| 135 |
+
"transformer_blocks.9.attn.to_out.0",
|
| 136 |
+
"transformer_blocks.9.ff.gate",
|
| 137 |
+
"transformer_blocks.9.ff.up",
|
| 138 |
+
"transformer_blocks.9.ff.down",
|
| 139 |
+
"transformer_blocks.10.attn.to_q",
|
| 140 |
+
"transformer_blocks.10.attn.to_k",
|
| 141 |
+
"transformer_blocks.10.attn.to_v",
|
| 142 |
+
"transformer_blocks.10.attn.to_gate",
|
| 143 |
+
"transformer_blocks.10.attn.to_out.0",
|
| 144 |
+
"transformer_blocks.10.ff.gate",
|
| 145 |
+
"transformer_blocks.10.ff.up",
|
| 146 |
+
"transformer_blocks.10.ff.down",
|
| 147 |
+
"transformer_blocks.11.attn.to_q",
|
| 148 |
+
"transformer_blocks.11.attn.to_k",
|
| 149 |
+
"transformer_blocks.11.attn.to_v",
|
| 150 |
+
"transformer_blocks.11.attn.to_gate",
|
| 151 |
+
"transformer_blocks.11.attn.to_out.0",
|
| 152 |
+
"transformer_blocks.11.ff.gate",
|
| 153 |
+
"transformer_blocks.11.ff.up",
|
| 154 |
+
"transformer_blocks.11.ff.down",
|
| 155 |
+
"transformer_blocks.12.attn.to_q",
|
| 156 |
+
"transformer_blocks.12.attn.to_k",
|
| 157 |
+
"transformer_blocks.12.attn.to_v",
|
| 158 |
+
"transformer_blocks.12.attn.to_gate",
|
| 159 |
+
"transformer_blocks.12.attn.to_out.0",
|
| 160 |
+
"transformer_blocks.12.ff.gate",
|
| 161 |
+
"transformer_blocks.12.ff.up",
|
| 162 |
+
"transformer_blocks.12.ff.down",
|
| 163 |
+
"transformer_blocks.13.attn.to_q",
|
| 164 |
+
"transformer_blocks.13.attn.to_k",
|
| 165 |
+
"transformer_blocks.13.attn.to_v",
|
| 166 |
+
"transformer_blocks.13.attn.to_gate",
|
| 167 |
+
"transformer_blocks.13.attn.to_out.0",
|
| 168 |
+
"transformer_blocks.13.ff.gate",
|
| 169 |
+
"transformer_blocks.13.ff.up",
|
| 170 |
+
"transformer_blocks.13.ff.down",
|
| 171 |
+
"transformer_blocks.14.attn.to_q",
|
| 172 |
+
"transformer_blocks.14.attn.to_k",
|
| 173 |
+
"transformer_blocks.14.attn.to_v",
|
| 174 |
+
"transformer_blocks.14.attn.to_gate",
|
| 175 |
+
"transformer_blocks.14.attn.to_out.0",
|
| 176 |
+
"transformer_blocks.14.ff.gate",
|
| 177 |
+
"transformer_blocks.14.ff.up",
|
| 178 |
+
"transformer_blocks.14.ff.down",
|
| 179 |
+
"transformer_blocks.15.attn.to_q",
|
| 180 |
+
"transformer_blocks.15.attn.to_k",
|
| 181 |
+
"transformer_blocks.15.attn.to_v",
|
| 182 |
+
"transformer_blocks.15.attn.to_gate",
|
| 183 |
+
"transformer_blocks.15.attn.to_out.0",
|
| 184 |
+
"transformer_blocks.15.ff.gate",
|
| 185 |
+
"transformer_blocks.15.ff.up",
|
| 186 |
+
"transformer_blocks.15.ff.down",
|
| 187 |
+
"transformer_blocks.16.attn.to_q",
|
| 188 |
+
"transformer_blocks.16.attn.to_k",
|
| 189 |
+
"transformer_blocks.16.attn.to_v",
|
| 190 |
+
"transformer_blocks.16.attn.to_gate",
|
| 191 |
+
"transformer_blocks.16.attn.to_out.0",
|
| 192 |
+
"transformer_blocks.16.ff.gate",
|
| 193 |
+
"transformer_blocks.16.ff.up",
|
| 194 |
+
"transformer_blocks.16.ff.down",
|
| 195 |
+
"transformer_blocks.17.attn.to_q",
|
| 196 |
+
"transformer_blocks.17.attn.to_k",
|
| 197 |
+
"transformer_blocks.17.attn.to_v",
|
| 198 |
+
"transformer_blocks.17.attn.to_gate",
|
| 199 |
+
"transformer_blocks.17.attn.to_out.0",
|
| 200 |
+
"transformer_blocks.17.ff.gate",
|
| 201 |
+
"transformer_blocks.17.ff.up",
|
| 202 |
+
"transformer_blocks.17.ff.down",
|
| 203 |
+
"transformer_blocks.18.attn.to_q",
|
| 204 |
+
"transformer_blocks.18.attn.to_k",
|
| 205 |
+
"transformer_blocks.18.attn.to_v",
|
| 206 |
+
"transformer_blocks.18.attn.to_gate",
|
| 207 |
+
"transformer_blocks.18.attn.to_out.0",
|
| 208 |
+
"transformer_blocks.18.ff.gate",
|
| 209 |
+
"transformer_blocks.18.ff.up",
|
| 210 |
+
"transformer_blocks.18.ff.down",
|
| 211 |
+
"transformer_blocks.19.attn.to_q",
|
| 212 |
+
"transformer_blocks.19.attn.to_k",
|
| 213 |
+
"transformer_blocks.19.attn.to_v",
|
| 214 |
+
"transformer_blocks.19.attn.to_gate",
|
| 215 |
+
"transformer_blocks.19.attn.to_out.0",
|
| 216 |
+
"transformer_blocks.19.ff.gate",
|
| 217 |
+
"transformer_blocks.19.ff.up",
|
| 218 |
+
"transformer_blocks.19.ff.down",
|
| 219 |
+
"transformer_blocks.20.attn.to_q",
|
| 220 |
+
"transformer_blocks.20.attn.to_k",
|
| 221 |
+
"transformer_blocks.20.attn.to_v",
|
| 222 |
+
"transformer_blocks.20.attn.to_gate",
|
| 223 |
+
"transformer_blocks.20.attn.to_out.0",
|
| 224 |
+
"transformer_blocks.20.ff.gate",
|
| 225 |
+
"transformer_blocks.20.ff.up",
|
| 226 |
+
"transformer_blocks.20.ff.down",
|
| 227 |
+
"transformer_blocks.21.attn.to_q",
|
| 228 |
+
"transformer_blocks.21.attn.to_k",
|
| 229 |
+
"transformer_blocks.21.attn.to_v",
|
| 230 |
+
"transformer_blocks.21.attn.to_gate",
|
| 231 |
+
"transformer_blocks.21.attn.to_out.0",
|
| 232 |
+
"transformer_blocks.21.ff.gate",
|
| 233 |
+
"transformer_blocks.21.ff.up",
|
| 234 |
+
"transformer_blocks.21.ff.down",
|
| 235 |
+
"transformer_blocks.22.attn.to_q",
|
| 236 |
+
"transformer_blocks.22.attn.to_k",
|
| 237 |
+
"transformer_blocks.22.attn.to_v",
|
| 238 |
+
"transformer_blocks.22.attn.to_gate",
|
| 239 |
+
"transformer_blocks.22.attn.to_out.0",
|
| 240 |
+
"transformer_blocks.22.ff.gate",
|
| 241 |
+
"transformer_blocks.22.ff.up",
|
| 242 |
+
"transformer_blocks.22.ff.down",
|
| 243 |
+
"transformer_blocks.23.attn.to_q",
|
| 244 |
+
"transformer_blocks.23.attn.to_k",
|
| 245 |
+
"transformer_blocks.23.attn.to_v",
|
| 246 |
+
"transformer_blocks.23.attn.to_gate",
|
| 247 |
+
"transformer_blocks.23.attn.to_out.0",
|
| 248 |
+
"transformer_blocks.23.ff.gate",
|
| 249 |
+
"transformer_blocks.23.ff.up",
|
| 250 |
+
"transformer_blocks.23.ff.down",
|
| 251 |
+
"transformer_blocks.24.attn.to_q",
|
| 252 |
+
"transformer_blocks.24.attn.to_k",
|
| 253 |
+
"transformer_blocks.24.attn.to_v",
|
| 254 |
+
"transformer_blocks.24.attn.to_gate",
|
| 255 |
+
"transformer_blocks.24.attn.to_out.0",
|
| 256 |
+
"transformer_blocks.24.ff.gate",
|
| 257 |
+
"transformer_blocks.24.ff.up",
|
| 258 |
+
"transformer_blocks.24.ff.down",
|
| 259 |
+
"transformer_blocks.25.attn.to_q",
|
| 260 |
+
"transformer_blocks.25.attn.to_k",
|
| 261 |
+
"transformer_blocks.25.attn.to_v",
|
| 262 |
+
"transformer_blocks.25.attn.to_gate",
|
| 263 |
+
"transformer_blocks.25.attn.to_out.0",
|
| 264 |
+
"transformer_blocks.25.ff.gate",
|
| 265 |
+
"transformer_blocks.25.ff.up",
|
| 266 |
+
"transformer_blocks.25.ff.down",
|
| 267 |
+
"transformer_blocks.26.attn.to_q",
|
| 268 |
+
"transformer_blocks.26.attn.to_k",
|
| 269 |
+
"transformer_blocks.26.attn.to_v",
|
| 270 |
+
"transformer_blocks.26.attn.to_gate",
|
| 271 |
+
"transformer_blocks.26.attn.to_out.0",
|
| 272 |
+
"transformer_blocks.26.ff.gate",
|
| 273 |
+
"transformer_blocks.26.ff.up",
|
| 274 |
+
"transformer_blocks.26.ff.down",
|
| 275 |
+
"transformer_blocks.27.attn.to_q",
|
| 276 |
+
"transformer_blocks.27.attn.to_k",
|
| 277 |
+
"transformer_blocks.27.attn.to_v",
|
| 278 |
+
"transformer_blocks.27.attn.to_gate",
|
| 279 |
+
"transformer_blocks.27.attn.to_out.0",
|
| 280 |
+
"transformer_blocks.27.ff.gate",
|
| 281 |
+
"transformer_blocks.27.ff.up",
|
| 282 |
+
"transformer_blocks.27.ff.down"
|
| 283 |
+
]
|
| 284 |
+
}
|
| 285 |
+
},
|
| 286 |
+
"rope_theta": 1000.0,
|
| 287 |
+
"text_hidden_dim": 2560,
|
| 288 |
+
"text_intermediate_size": 6912,
|
| 289 |
+
"text_num_attention_heads": 20,
|
| 290 |
+
"text_num_key_value_heads": 20,
|
| 291 |
+
"timestep_embed_dim": 256
|
| 292 |
+
}
|
transformer/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1a9de634adbad7297e0b4598d9c5acc6b8bb18d714c0addfc66a9ca64ea6961
|
| 3 |
+
size 7516161832
|
vae/config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKLQwenImage",
|
| 3 |
+
"_diffusers_version": "0.39.0.dev0",
|
| 4 |
+
"_name_or_path": "Qwen/Qwen-Image",
|
| 5 |
+
"attn_scales": [],
|
| 6 |
+
"base_dim": 96,
|
| 7 |
+
"dim_mult": [
|
| 8 |
+
1,
|
| 9 |
+
2,
|
| 10 |
+
4,
|
| 11 |
+
4
|
| 12 |
+
],
|
| 13 |
+
"dropout": 0.0,
|
| 14 |
+
"input_channels": 3,
|
| 15 |
+
"latents_mean": [
|
| 16 |
+
-0.7571,
|
| 17 |
+
-0.7089,
|
| 18 |
+
-0.9113,
|
| 19 |
+
0.1075,
|
| 20 |
+
-0.1745,
|
| 21 |
+
0.9653,
|
| 22 |
+
-0.1517,
|
| 23 |
+
1.5508,
|
| 24 |
+
0.4134,
|
| 25 |
+
-0.0715,
|
| 26 |
+
0.5517,
|
| 27 |
+
-0.3632,
|
| 28 |
+
-0.1922,
|
| 29 |
+
-0.9497,
|
| 30 |
+
0.2503,
|
| 31 |
+
-0.2921
|
| 32 |
+
],
|
| 33 |
+
"latents_std": [
|
| 34 |
+
2.8184,
|
| 35 |
+
1.4541,
|
| 36 |
+
2.3275,
|
| 37 |
+
2.6558,
|
| 38 |
+
1.2196,
|
| 39 |
+
1.7708,
|
| 40 |
+
2.6052,
|
| 41 |
+
2.0743,
|
| 42 |
+
3.2687,
|
| 43 |
+
2.1526,
|
| 44 |
+
2.8652,
|
| 45 |
+
1.5579,
|
| 46 |
+
1.6382,
|
| 47 |
+
1.1253,
|
| 48 |
+
2.8251,
|
| 49 |
+
1.916
|
| 50 |
+
],
|
| 51 |
+
"num_res_blocks": 2,
|
| 52 |
+
"temperal_downsample": [
|
| 53 |
+
false,
|
| 54 |
+
true,
|
| 55 |
+
true
|
| 56 |
+
],
|
| 57 |
+
"z_dim": 16
|
| 58 |
+
}
|
vae/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab1b61103959913d6c7e628cf793dbb2ca4726a40a3b3ae206c52b8e75bf6f08
|
| 3 |
+
size 507591892
|