16:9 (1344 x 768) export in aspect-16x9/, and the card says how shapes cost
Browse files- .gitattributes +3 -0
- README.md +15 -0
- aspect-16x9/Transformer.aimodel/main.hash +1 -0
- aspect-16x9/Transformer.aimodel/main.mlirb +3 -0
- aspect-16x9/Transformer.aimodel/metadata.json +8 -0
- aspect-16x9/VAEDecoder.aimodel/main.hash +1 -0
- aspect-16x9/VAEDecoder.aimodel/main.mlirb +3 -0
- aspect-16x9/VAEDecoder.aimodel/metadata.json +8 -0
- aspect-16x9/metadata.json +40 -0
- aspect-16x9/tokenizer/chat_template.jinja +89 -0
- aspect-16x9/tokenizer/config.json +15 -0
- aspect-16x9/tokenizer/tokenizer.json +3 -0
- aspect-16x9/tokenizer/tokenizer_config.json +15 -0
- aspect-16x9/vae_bn_mean.npy +3 -0
- aspect-16x9/vae_bn_var.npy +3 -0
.gitattributes
CHANGED
|
@@ -39,3 +39,6 @@ Transformer_img2img_full.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
|
| 39 |
VAEDecoder.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
| 40 |
VAEEncoder.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
| 41 |
tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
VAEDecoder.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
| 40 |
VAEEncoder.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
| 41 |
tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
aspect-16x9/Transformer.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
aspect-16x9/VAEDecoder.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
aspect-16x9/tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -46,6 +46,21 @@ Apple's pipeline loads without the two editing parts and simply reports that it
|
|
| 46 |
a text-to-image install is 13 GB and editing adds 7.3 GB. An `.aimodel` is a build artefact; these
|
| 47 |
are pinned by their published file hashes.
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
## Measured (macOS 27, M3 Max, 36 GB, GPU, 1024 × 1024)
|
| 50 |
|
| 51 |
| | |
|
|
|
|
| 46 |
a text-to-image install is 13 GB and editing adds 7.3 GB. An `.aimodel` is a build artefact; these
|
| 47 |
are pinned by their published file hashes.
|
| 48 |
|
| 49 |
+
## Shapes
|
| 50 |
+
|
| 51 |
+
| shape | where | extra download | extra compiled cache |
|
| 52 |
+
|---|---|---|---|
|
| 53 |
+
| 1:1, 1024 × 1024 | top level | — | — |
|
| 54 |
+
| 16:9, 1344 × 768 | `aspect-16x9/` — its own transformer and decoder, traced at 1344 × 768; shares `../TextEncoder.aimodel` | 7.3 GB | ~7.3 GB |
|
| 55 |
+
|
| 56 |
+
A Core AI transformer is traced for one shape. Measured before choosing this layout: a two-function
|
| 57 |
+
transformer (1:1 + 16:9) shares one weight copy on disk (7.2 GB either way), but Core AI compiles
|
| 58 |
+
every function at the asset's first load and keeps a full compiled copy of each (14 GB), so every user
|
| 59 |
+
would pay for every shape. One folder per shape is fetched only by whoever asks for it. 16:9 needs the
|
| 60 |
+
non-square support in [arraypress/coreai-models](https://github.com/arraypress/coreai-models) (a fork of
|
| 61 |
+
Apple's 1.0.0: `image_width`/`image_height` in `metadata.json`); 1:1 runs on Apple's pipeline as is.
|
| 62 |
+
Editing is 1:1 only.
|
| 63 |
+
|
| 64 |
## Measured (macOS 27, M3 Max, 36 GB, GPU, 1024 × 1024)
|
| 65 |
|
| 66 |
| | |
|
aspect-16x9/Transformer.aimodel/main.hash
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
}+X)��Q"�����v��AJ���(�{�&*
|
aspect-16x9/Transformer.aimodel/main.mlirb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d2b582998ad5122e5d0cbfac776f4d4414addff10ba28f2aa7bc6261f11022a
|
| 3 |
+
size 7751312952
|
aspect-16x9/Transformer.aimodel/metadata.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"license" : "Apache-2.0",
|
| 3 |
+
"description" : "FLUX.2 [klein] 4B is a distilled, open-weights text-to-image rectified-flow transformer from Black Forest Labs. Source: https:\/\/huggingface.co\/black-forest-labs\/FLUX.2-klein-4B — Transformer component.",
|
| 4 |
+
"creationDate" : "20261011T184742Z",
|
| 5 |
+
"assetVersion" : "2.0",
|
| 6 |
+
"author" : "Black Forest Labs",
|
| 7 |
+
"producer" : "coreai-core 1.0.0b3"
|
| 8 |
+
}
|
aspect-16x9/VAEDecoder.aimodel/main.hash
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
�{�^
|
aspect-16x9/VAEDecoder.aimodel/main.mlirb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05cf7ba15e0dce252c072420878a127ef5998b2e8e2f8835045d8656787f240a
|
| 3 |
+
size 99294750
|
aspect-16x9/VAEDecoder.aimodel/metadata.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"creationDate" : "20261011T184749Z",
|
| 3 |
+
"assetVersion" : "2.0",
|
| 4 |
+
"description" : "FLUX.2 [klein] 4B is a distilled, open-weights text-to-image rectified-flow transformer from Black Forest Labs. Source: https:\/\/huggingface.co\/black-forest-labs\/FLUX.2-klein-4B — VAEDecoder component.",
|
| 5 |
+
"license" : "Apache-2.0",
|
| 6 |
+
"author" : "Black Forest Labs",
|
| 7 |
+
"producer" : "coreai-core 1.0.0b3"
|
| 8 |
+
}
|
aspect-16x9/metadata.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata_version": "0.2",
|
| 3 |
+
"kind": "diffusion",
|
| 4 |
+
"name": "FLUX.2-klein-4B",
|
| 5 |
+
"assets": {
|
| 6 |
+
"transformer": "Transformer.aimodel",
|
| 7 |
+
"text_encoder": "../TextEncoder.aimodel",
|
| 8 |
+
"vae_decoder": "VAEDecoder.aimodel"
|
| 9 |
+
},
|
| 10 |
+
"diffusion": {
|
| 11 |
+
"type": "flux2",
|
| 12 |
+
"prediction_type": "flow_matching",
|
| 13 |
+
"encoder_scale_factor": 1.0,
|
| 14 |
+
"decoder_scale_factor": 1.0,
|
| 15 |
+
"decoder_shift_factor": 0.0,
|
| 16 |
+
"batch_norm_eps": 0.0001,
|
| 17 |
+
"guidance_embeds": false,
|
| 18 |
+
"image_size": 1024,
|
| 19 |
+
"default_guidance_scale": 1.0,
|
| 20 |
+
"default_steps": 4,
|
| 21 |
+
"rope_axes_dims": [
|
| 22 |
+
32,
|
| 23 |
+
32,
|
| 24 |
+
32,
|
| 25 |
+
32
|
| 26 |
+
],
|
| 27 |
+
"rope_theta": 2000,
|
| 28 |
+
"image_width": 1344,
|
| 29 |
+
"image_height": 768
|
| 30 |
+
},
|
| 31 |
+
"source": {
|
| 32 |
+
"model_definition": "torch",
|
| 33 |
+
"hf_model_id": "black-forest-labs/FLUX.2-klein-4B"
|
| 34 |
+
},
|
| 35 |
+
"compression": null,
|
| 36 |
+
"compilation": {
|
| 37 |
+
"date": "2026-10-11T22:48:31.270849+07:00",
|
| 38 |
+
"targets": []
|
| 39 |
+
}
|
| 40 |
+
}
|
aspect-16x9/tokenizer/chat_template.jinja
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0].role == 'system' %}
|
| 4 |
+
{{- messages[0].content + '\n\n' }}
|
| 5 |
+
{%- endif %}
|
| 6 |
+
{{- "# 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>" }}
|
| 7 |
+
{%- for tool in tools %}
|
| 8 |
+
{{- "\n" }}
|
| 9 |
+
{{- tool | tojson }}
|
| 10 |
+
{%- endfor %}
|
| 11 |
+
{{- "\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" }}
|
| 12 |
+
{%- else %}
|
| 13 |
+
{%- if messages[0].role == 'system' %}
|
| 14 |
+
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
| 15 |
+
{%- endif %}
|
| 16 |
+
{%- endif %}
|
| 17 |
+
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 18 |
+
{%- for message in messages[::-1] %}
|
| 19 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 20 |
+
{%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
|
| 21 |
+
{%- set ns.multi_step_tool = false %}
|
| 22 |
+
{%- set ns.last_query_index = index %}
|
| 23 |
+
{%- endif %}
|
| 24 |
+
{%- endfor %}
|
| 25 |
+
{%- for message in messages %}
|
| 26 |
+
{%- if message.content is string %}
|
| 27 |
+
{%- set content = message.content %}
|
| 28 |
+
{%- else %}
|
| 29 |
+
{%- set content = '' %}
|
| 30 |
+
{%- endif %}
|
| 31 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
| 32 |
+
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
| 33 |
+
{%- elif message.role == "assistant" %}
|
| 34 |
+
{%- set reasoning_content = '' %}
|
| 35 |
+
{%- if message.reasoning_content is string %}
|
| 36 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 37 |
+
{%- else %}
|
| 38 |
+
{%- if '</think>' in content %}
|
| 39 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 40 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 41 |
+
{%- endif %}
|
| 42 |
+
{%- endif %}
|
| 43 |
+
{%- if loop.index0 > ns.last_query_index %}
|
| 44 |
+
{%- if loop.last or (not loop.last and reasoning_content) %}
|
| 45 |
+
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
| 46 |
+
{%- else %}
|
| 47 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 48 |
+
{%- endif %}
|
| 49 |
+
{%- else %}
|
| 50 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 51 |
+
{%- endif %}
|
| 52 |
+
{%- if message.tool_calls %}
|
| 53 |
+
{%- for tool_call in message.tool_calls %}
|
| 54 |
+
{%- if (loop.first and content) or (not loop.first) %}
|
| 55 |
+
{{- '\n' }}
|
| 56 |
+
{%- endif %}
|
| 57 |
+
{%- if tool_call.function %}
|
| 58 |
+
{%- set tool_call = tool_call.function %}
|
| 59 |
+
{%- endif %}
|
| 60 |
+
{{- '<tool_call>\n{"name": "' }}
|
| 61 |
+
{{- tool_call.name }}
|
| 62 |
+
{{- '", "arguments": ' }}
|
| 63 |
+
{%- if tool_call.arguments is string %}
|
| 64 |
+
{{- tool_call.arguments }}
|
| 65 |
+
{%- else %}
|
| 66 |
+
{{- tool_call.arguments | tojson }}
|
| 67 |
+
{%- endif %}
|
| 68 |
+
{{- '}\n</tool_call>' }}
|
| 69 |
+
{%- endfor %}
|
| 70 |
+
{%- endif %}
|
| 71 |
+
{{- '<|im_end|>\n' }}
|
| 72 |
+
{%- elif message.role == "tool" %}
|
| 73 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 74 |
+
{{- '<|im_start|>user' }}
|
| 75 |
+
{%- endif %}
|
| 76 |
+
{{- '\n<tool_response>\n' }}
|
| 77 |
+
{{- content }}
|
| 78 |
+
{{- '\n</tool_response>' }}
|
| 79 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 80 |
+
{{- '<|im_end|>\n' }}
|
| 81 |
+
{%- endif %}
|
| 82 |
+
{%- endif %}
|
| 83 |
+
{%- endfor %}
|
| 84 |
+
{%- if add_generation_prompt %}
|
| 85 |
+
{{- '<|im_start|>assistant\n' }}
|
| 86 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 87 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 88 |
+
{%- endif %}
|
| 89 |
+
{%- endif %}
|
aspect-16x9/tokenizer/config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"is_local": true,
|
| 9 |
+
"local_files_only": false,
|
| 10 |
+
"model_max_length": 131072,
|
| 11 |
+
"pad_token": "<|endoftext|>",
|
| 12 |
+
"split_special_tokens": false,
|
| 13 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 14 |
+
"unk_token": null
|
| 15 |
+
}
|
aspect-16x9/tokenizer/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
|
| 3 |
+
size 11422650
|
aspect-16x9/tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"is_local": true,
|
| 9 |
+
"local_files_only": false,
|
| 10 |
+
"model_max_length": 131072,
|
| 11 |
+
"pad_token": "<|endoftext|>",
|
| 12 |
+
"split_special_tokens": false,
|
| 13 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 14 |
+
"unk_token": null
|
| 15 |
+
}
|
aspect-16x9/vae_bn_mean.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2e3b98b3b1483e4573093d41b9e3890627724c7c0bfaa215ba1e2ef151b6d09
|
| 3 |
+
size 640
|
aspect-16x9/vae_bn_var.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9418da87092c06ffb4f72402e3c3d142b671878f6cea5e8da3c547befbd64861
|
| 3 |
+
size 640
|