Instructions to use wabibito/Krea2-Onyx-Edit-mlx-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use wabibito/Krea2-Onyx-Edit-mlx-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("wabibito/Krea2-Onyx-Edit-mlx-4bit", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - MLX
How to use wabibito/Krea2-Onyx-Edit-mlx-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Krea2-Onyx-Edit-mlx-4bit wabibito/Krea2-Onyx-Edit-mlx-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Draw Things
- DiffusionBee
- Atomic Chat
Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- NOTICE +14 -0
- README.md +24 -0
- model_index.json +40 -0
- scheduler/scheduler_config.json +18 -0
- text_encoder/config.json +70 -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 +29 -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,4 @@ 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 |
+
tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
NOTICE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This model is a fine-tuned derivative ("Derivative Model") of Krea 2
|
| 2 |
+
(krea/Krea-2-Turbo and krea/Krea-2-Raw by Krea.ai, Inc.), created by fusing the
|
| 3 |
+
community adapter conradlocke/krea2-identity-edit (v1.2, SVD rank-64 variant) into
|
| 4 |
+
the base weights. It is an unofficial community build, not affiliated with or
|
| 5 |
+
endorsed by Krea.ai, Inc. or the adapter's author.
|
| 6 |
+
|
| 7 |
+
Distributed under the Krea 2 Community License Agreement (see LICENSE.pdf /
|
| 8 |
+
https://krea.ai/krea-2-licensing). By downloading or using it you agree to be bound
|
| 9 |
+
by that Agreement, including its restrictions on prohibited uses, the
|
| 10 |
+
content-filtering requirements for deployments, and the commercial use terms.
|
| 11 |
+
|
| 12 |
+
Credits: Krea.ai, Inc. (base model) - conradlocke (identity-edit adapter training,
|
| 13 |
+
https://huggingface.co/conradlocke/krea2-identity-edit) - face/head/person-swap
|
| 14 |
+
skill trained on stablellama's MIT-licensed change_eye_face_head_person dataset.
|
README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: krea-2-community-license
|
| 4 |
+
license_link: https://krea.ai/krea-2-licensing
|
| 5 |
+
base_model: krea/Krea-2-Turbo
|
| 6 |
+
tags:
|
| 7 |
+
- image-editing
|
| 8 |
+
- identity-edit
|
| 9 |
+
- mlx
|
| 10 |
+
- krea-2
|
| 11 |
+
- onyx
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Onyx Krea 2 Edit (Turbo, 4-bit MLX, identity-edit fused)
|
| 15 |
+
|
| 16 |
+
MLX 4-bit build of Krea 2 with the [krea2-identity-edit](https://huggingface.co/conradlocke/krea2-identity-edit)
|
| 17 |
+
adapter (v1.2 r64) **fused into the weights** - zero runtime LoRA cost, streams like a
|
| 18 |
+
plain checkpoint. Built for the Onyx on-device app: attach a reference photo (plus an
|
| 19 |
+
optional second for swaps/try-on) and describe the change.
|
| 20 |
+
|
| 21 |
+
Distilled 8-step base: fast, instruction-faithful - the recommended edit build.
|
| 22 |
+
|
| 23 |
+
See NOTICE for attribution and LICENSE.pdf for the Krea 2 Community License this
|
| 24 |
+
model is distributed under.
|
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 |
+
}
|
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,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"transformers_version" : "5.2.0",
|
| 3 |
+
"model_type" : "qwen3_vl",
|
| 4 |
+
"vision_end_token_id" : 151653,
|
| 5 |
+
"video_token_id" : 151656,
|
| 6 |
+
"dtype" : "bfloat16",
|
| 7 |
+
"quantization" : {
|
| 8 |
+
"bits" : 4,
|
| 9 |
+
"group_size" : 64
|
| 10 |
+
},
|
| 11 |
+
"architectures" : [
|
| 12 |
+
"Qwen3VLModel"
|
| 13 |
+
],
|
| 14 |
+
"vision_start_token_id" : 151652,
|
| 15 |
+
"text_config" : {
|
| 16 |
+
"hidden_size" : 2560,
|
| 17 |
+
"model_type" : "qwen3_vl_text",
|
| 18 |
+
"rope_parameters" : {
|
| 19 |
+
"mrope_section" : [
|
| 20 |
+
24,
|
| 21 |
+
20,
|
| 22 |
+
20
|
| 23 |
+
],
|
| 24 |
+
"rope_theta" : 5000000,
|
| 25 |
+
"mrope_interleaved" : true,
|
| 26 |
+
"rope_type" : "default"
|
| 27 |
+
},
|
| 28 |
+
"use_cache" : true,
|
| 29 |
+
"dtype" : "bfloat16",
|
| 30 |
+
"eos_token_id" : 151645,
|
| 31 |
+
"bos_token_id" : 151643,
|
| 32 |
+
"vocab_size" : 151936,
|
| 33 |
+
"num_hidden_layers" : 36,
|
| 34 |
+
"num_key_value_heads" : 8,
|
| 35 |
+
"tie_word_embeddings" : true,
|
| 36 |
+
"initializer_range" : 0.02,
|
| 37 |
+
"rms_norm_eps" : 9.9999999999999995e-07,
|
| 38 |
+
"head_dim" : 128,
|
| 39 |
+
"attention_dropout" : 0,
|
| 40 |
+
"max_position_embeddings" : 262144,
|
| 41 |
+
"num_attention_heads" : 32,
|
| 42 |
+
"pad_token_id" : null,
|
| 43 |
+
"intermediate_size" : 9728,
|
| 44 |
+
"hidden_act" : "silu",
|
| 45 |
+
"attention_bias" : false
|
| 46 |
+
},
|
| 47 |
+
"image_token_id" : 151655,
|
| 48 |
+
"vision_config" : {
|
| 49 |
+
"num_heads" : 16,
|
| 50 |
+
"hidden_size" : 1024,
|
| 51 |
+
"out_hidden_size" : 2560,
|
| 52 |
+
"initializer_range" : 0.02,
|
| 53 |
+
"hidden_act" : "gelu_pytorch_tanh",
|
| 54 |
+
"deepstack_visual_indexes" : [
|
| 55 |
+
5,
|
| 56 |
+
11,
|
| 57 |
+
17
|
| 58 |
+
],
|
| 59 |
+
"dtype" : "bfloat16",
|
| 60 |
+
"patch_size" : 16,
|
| 61 |
+
"intermediate_size" : 4096,
|
| 62 |
+
"temporal_patch_size" : 2,
|
| 63 |
+
"num_position_embeddings" : 2304,
|
| 64 |
+
"depth" : 24,
|
| 65 |
+
"in_channels" : 3,
|
| 66 |
+
"spatial_merge_size" : 2,
|
| 67 |
+
"model_type" : "qwen3_vl"
|
| 68 |
+
},
|
| 69 |
+
"tie_word_embeddings" : true
|
| 70 |
+
}
|
text_encoder/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9febb58bef0d8417926daff88996ee43fd5124d555365f711e3601c3f7116c0a
|
| 3 |
+
size 2822141221
|
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,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"num_refiner_text_blocks" : 2,
|
| 3 |
+
"text_num_attention_heads" : 20,
|
| 4 |
+
"num_layers" : 28,
|
| 5 |
+
"text_intermediate_size" : 6912,
|
| 6 |
+
"timestep_embed_dim" : 256,
|
| 7 |
+
"_diffusers_version" : "0.39.0.dev0",
|
| 8 |
+
"norm_eps" : 1.0000000000000001e-05,
|
| 9 |
+
"quantization" : {
|
| 10 |
+
"bits" : 4,
|
| 11 |
+
"group_size" : 64
|
| 12 |
+
},
|
| 13 |
+
"num_text_layers" : 12,
|
| 14 |
+
"in_channels" : 64,
|
| 15 |
+
"attention_head_dim" : 128,
|
| 16 |
+
"rope_theta" : 1000,
|
| 17 |
+
"text_num_key_value_heads" : 20,
|
| 18 |
+
"num_layerwise_text_blocks" : 2,
|
| 19 |
+
"num_attention_heads" : 48,
|
| 20 |
+
"_class_name" : "Krea2Transformer2DModel",
|
| 21 |
+
"num_key_value_heads" : 12,
|
| 22 |
+
"intermediate_size" : 16384,
|
| 23 |
+
"axes_dims_rope" : [
|
| 24 |
+
32,
|
| 25 |
+
48,
|
| 26 |
+
48
|
| 27 |
+
],
|
| 28 |
+
"text_hidden_dim" : 2560
|
| 29 |
+
}
|
transformer/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b881269d519affa958adb934d7ef52b1a4abfef59d2745ac36f953c82be00884
|
| 3 |
+
size 7213547199
|
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:2e87baefc88a80d8b02a9a89f6a02b857da1a5a9f1cc284d237fe5fded8c3b2d
|
| 3 |
+
size 253806728
|