ovedrive commited on
Commit
dffc7c7
·
verified ·
1 Parent(s): 0322e9f

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
.gitattributes CHANGED
@@ -33,3 +33,59 @@ 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
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,350 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ base_model:
5
+ - krea/Krea-2-Raw
6
+ pipeline_tag: text-to-image
7
+ library_name: diffusers
8
+ license: other
9
+ license_name: krea-2-community-license
10
+ license_link: https://huggingface.co/krea/Krea-2-Turbo/blob/main/LICENSE.pdf
11
+ widget:
12
+ - text: A small, dark-colored cat is captured mid-stride, walking down the center
13
+ of a narrow, abandoned street. The street is paved and appears cracked and worn.
14
+ On either side of the street are tall, dilapidated buildings with visible brickwork
15
+ and windows. A street lamp stands on the right side. The entire image is rendered
16
+ in a monochromatic blue, with a distinct halftone dot pattern overlaying the scene,
17
+ giving it a retro or printed appearance. The focus is soft, and the lighting is
18
+ diffused, creating a hazy, atmospheric effect. The perspective is from ground
19
+ level, looking down the length of the street, which narrows into the distance.,
20
+ halftone texture
21
+ output:
22
+ url: images/00.jpg
23
+ - text: 'This is a digital illustration with a retro, pixelated aesthetic, depicting
24
+ a young boy and a dog in an abstract indoor setting. The boy, with short brown
25
+ hair and wearing a white t-shirt and dark shorts, is seated at a light-colored
26
+ table. He is leaning over the table, looking down at papers or books. His face
27
+ is rendered with a soft, somewhat blurry effect. To the right of the table, a
28
+ tan, long-haired dog with large ears is lying on a red surface, possibly a rug
29
+ or blanket. The dog''s head is resting on the surface, and its eyes are closed,
30
+ suggesting it is asleep. Its face is also rendered with a soft, somewhat distorted
31
+ effect. The background features reddish-pink walls and a hint of a window or doorway
32
+ on the left, with a hazy, abstract purple area. Scattered around the scene are
33
+ various pixelated elements: a blue floppy disk icon, a yellow star icon, a green
34
+ star icon, a blue thumbs-up icon, and a small black pixelated object near the
35
+ boy''s feet. The overall style is reminiscent of early computer graphics or video
36
+ games, with a limited color palette and a focus on simple, blocky shapes. The
37
+ composition is somewhat chaotic, with elements overlapping and a lack of clear
38
+ spatial depth. The lighting is artificial and creates strong shadows, particularly
39
+ on the table and the boy., low-poly 3D models'
40
+ output:
41
+ url: images/03.jpg
42
+ - text: A young woman with fair skin and blonde hair styled in curls sits on the floor
43
+ of a vast, empty opera hall. She is dressed in a fluffy, light pink tutu and a
44
+ white lace shawl draped over her shoulders. Her legs are extended forward, and
45
+ her hands rest on her lap. The opera hall features rows of empty, plush red velvet
46
+ seats arranged in a circular pattern around a central floor area. Ornate balconies
47
+ with decorative railings line the upper levels, and large, elaborate chandeliers
48
+ hang from the high ceiling, casting a soft glow. The image has a soft, romantic,
49
+ and slightly ethereal aesthetic, with a sense of grandeur and emptiness. The composition
50
+ is centered on the woman, with the vastness of the opera hall surrounding her.
51
+ The medium appears to be a painting, rendered with visible brushstrokes and a
52
+ soft focus. The camera angle is a medium shot, slightly elevated, looking down
53
+ towards the woman. The color palette is dominated by pastels, especially pinks,
54
+ whites, and creams, with touches of deep red from the seats and gold from the
55
+ chandeliers and ceiling. The lighting is soft and diffused, creating gentle shadows
56
+ and highlights., impressionist painting, visible brushstrokes
57
+ output:
58
+ url: images/05.jpg
59
+ - text: A black and white photograph captures a male rockstar performing on stage,
60
+ illuminated by a bright spotlight. He is holding a microphone to his open mouth,
61
+ with his head tilted back and his right arm raised in a dynamic pose. His figure
62
+ is rendered in high contrast, with sharp highlights and deep shadows. The background
63
+ depicts a concert setting with a drum set and various amplifiers and speakers.
64
+ The stage is bathed in intense light, creating a hazy, abstract effect. Silhouettes
65
+ of an audience are visible in the distance, some with their hands raised. The
66
+ overall style is gritty and energetic, with a dramatic composition focusing on
67
+ the performer., thermal imaging style
68
+ output:
69
+ url: images/06.jpg
70
+ - text: A black and white photograph captures a solitary man standing on a wooden
71
+ dock, facing away from the viewer and looking out at the vast expanse of the sea.
72
+ He is wearing a full-length coat and a flat-rimmed hat. The man is silhouetted
73
+ against the bright sky and water. The dock occupies the lower portion of the frame,
74
+ with the sea stretching to the horizon. The image is composed with a low camera
75
+ angle, emphasizing the scale of the sea and the isolation of the figure. The lighting
76
+ creates strong contrasts, with the man and dock appearing as dark silhouettes
77
+ against the lighter background., black and white photography
78
+ output:
79
+ url: images/07.jpg
80
+ - text: An anime illustration depicts a young boy and girl walking through a lush
81
+ forest. The boy, on the left, wears a white short-sleeved shirt, a dark tie, and
82
+ a blue cap. He has short brown hair and looks to his right with a curious expression.
83
+ The girl, on the right, wears a white dress with a blue collar and cuffs, and
84
+ her brown hair is tied back. She carries a woven basket over her right shoulder
85
+ and also looks to her right with an inquisitive gaze. The forest background is
86
+ filled with green foliage and trees, with sunlight filtering through the leaves.
87
+ Large rocks are scattered in the foreground, with a small brown bird perched on
88
+ a rock to the left. To the right, a small brown monkey is visible climbing a tree.
89
+ Red and yellow flowers add pops of color to the scene. The overall style is characteristic
90
+ of traditional hand-drawn animation, with soft lighting and a natural color palette.,
91
+ whimsical woodland creatures
92
+ output:
93
+ url: images/13.jpg
94
+ - text: vintage analog collage, central irregularly shaped snowy mountain range with
95
+ a section featuring distinct wavy edges, structured within a 12x16 grid of square
96
+ tiles, composition fragments the subject by alternating tiles with solid azure
97
+ blue background squares, thin white grid lines, grainy paper texture, retro aesthetic
98
+ of mid-century print, vibrant cyan and warm neutral tones, experimental layout,
99
+ tactile quality, high-contrast graphic composition
100
+ output:
101
+ url: images/18.jpg
102
+ - text: A minimalist flat-color illustration of a person wading through expansive
103
+ shallow ocean waves beneath a pale peach sky. The dark-skinned figure, wearing
104
+ an orange swim cap, light blue top, and bright green shorts, steps carefully through
105
+ knee-deep water. The ocean is rendered in muted mint green with delicate, thin
106
+ black linework detailing the continuous ripples and gentle whitecaps. Soft pinkish-peach
107
+ reflections echo the sky on the water's surface. A dark, jagged rock rests in
108
+ the lower left foreground near a pale grey shoreline. The horizon features a solid
109
+ purplish-blue landmass and a stylized, layered yellow and blue cloud. The high-angle
110
+ wide perspective emphasizes the vast negative space of the water, utilizing a
111
+ clean ligne claire drawing aesthetic with a subtle paper texture.
112
+ output:
113
+ url: images/20.jpg
114
+ - text: A tiny figure and a small white dog sit side-by-side in the deep green shadow
115
+ of a massive tree on a sloping grassy hill. The enormous tree canopy dominates
116
+ the upper composition, textured with thousands of stippled, light blue and yellow
117
+ dabs representing leaves. A sharp diagonal line divides the vibrant, sunlit yellow-green
118
+ grass in the foreground from the dark shade sheltering the pair. The stylized,
119
+ painterly landscape features flattened perspective, visible brushstrokes, and
120
+ intense color contrast.
121
+ output:
122
+ url: images/21.jpg
123
+ - text: A close-up portrait of a young East Asian woman with straight black hair,
124
+ loose strands sweeping across her fair skin, and an intense gaze. She wears a
125
+ light grey collared shirt with a black tie. A vibrant bouquet of pink and orange
126
+ lilies with lush green leaves sits in the blurred right foreground. The background
127
+ is a solid, striking crimson red. Soft, directional studio lighting highlights
128
+ her facial features, creating a high-contrast composition with a shallow depth
129
+ of field.
130
+ output:
131
+ url: images/22.jpg
132
+ - text: A tiny, russet-brown harvest mouse clings to a slender diagonal branch amid
133
+ vibrant green lobed leaves and small round buds. The mouse has soft textured fur,
134
+ glossy black eyes, a pink nose, fine whiskers, and delicate pink paws firmly gripping
135
+ the wood. In this macro photograph, an extremely shallow depth of field sharply
136
+ focuses on the animal's face. The deep green background dissolves into a smooth,
137
+ creamy bokeh, illuminated by soft, diffused natural lighting that highlights the
138
+ intricate details of the fur and foliage.
139
+ output:
140
+ url: images/23.jpg
141
+ - text: A dynamic digital painting of a joyful girl in a sailor uniform stretching
142
+ her arms high against a solid vibrant blue background. She has short dark windblown
143
+ hair, amber eyes, and a bright smile. She wears a white shirt, striped blue collar,
144
+ flowing red neckerchief, and a billowing blue pleated skirt. Expressive thick
145
+ brushstrokes and bold shading emphasize energetic motion.
146
+ output:
147
+ url: images/24.jpg
148
+ - text: stylized digital painting of a dark convertible on a winding coastal cliff
149
+ road, high-angle perspective, blocky painterly brushstrokes, golden hour sunlight
150
+ hitting rocky orange terrain and green vegetation, flock of white abstract birds
151
+ flying in foreground, blinding bright sun reflection on vast ocean, vibrant warm
152
+ color palette, sharp graphic shadows
153
+ output:
154
+ url: images/25.jpg
155
+ - text: A stylized jungle illustration densely packed with oversized flora and surreal
156
+ characters, rendered with smooth geometric shapes and granular stippled shading.
157
+ Two pale figures with flowing, star-speckled black hair navigate the lush environment
158
+ in blue garments. On the left, a figure grasps a vine as a white, long-beaked
159
+ bird perches on their outstretched hand. On the right, the second figure reclines
160
+ beside a sleek, pinkish-orange fox. The dense surroundings feature sweeping green
161
+ stalks and colossal blooms in brilliant golden yellow, coral pink, and deep red.
162
+ A second white bird emerges from the lower foliage. The vibrant composition forms
163
+ a seamless tapestry, utilizing rich colors and volumetric grain to create a dreamlike,
164
+ textured depth.
165
+ output:
166
+ url: images/27.jpg
167
+ - text: A surreal retro-futuristic space scene features liquid chrome forming an abstract
168
+ face merging with a glowing planetary horizon. The foreground is dominated by
169
+ swirling, highly reflective metallic fluid that distorts into a stylized, melting
170
+ facial profile with deep shadows and bright silver highlights. This undulating
171
+ chrome form rests against the curved, atmospheric edge of a massive planet bathed
172
+ in a soft electric blue and purple glow. Above the primary planet, a smaller eclipsed
173
+ celestial sphere sits in the upper center, crowned by a sharp, cross-shaped starburst
174
+ flare. Two additional radiant flares burst from the left and right edges of the
175
+ horizon. Set against a deep black starfield, the artwork employs a vintage 1980s
176
+ airbrush aesthetic with smooth gradients, ethereal lighting, and high-contrast
177
+ metallic rendering.
178
+ output:
179
+ url: images/28.jpg
180
+ - text: An extreme close-up portrait featuring pale, freckled skin and a single blue
181
+ eye wrapped in reflective metallic gold ribbons. Thin gold strips crisscross diagonally
182
+ over the cheek and forehead, casting sharp, hard shadows onto the face. Strands
183
+ of copper hair frame the top edge while the left ear softly blurs out of focus.
184
+ Harsh, direct lighting highlights intricate skin pores and bright golden reflections,
185
+ isolating the brightly lit features against a pitch-black background in a bold,
186
+ high-contrast macro editorial style.
187
+ output:
188
+ url: images/29.jpg
189
+ - text: Stylized digital painting of a menacing jester figure rendered with bold,
190
+ expressive brushstrokes and a vibrant, almost psychedelic color palette against
191
+ a pitch-black background. Dynamic low-angle perspective forces a dramatic, imposing
192
+ composition as the character leans forward, one leg raised high. The jester wears
193
+ a classic multi-pointed hat with bells, a ruffled collar, puffed sleeves, harlequin-patterned
194
+ shorts in muted gold and dark brown, and striped tights in alternating shades
195
+ of purple, blue, and chartreuse. A heavily textured, flowing cape billows outward
196
+ to the left, decorated with abstract, fluid patterns of saturated purples, greens,
197
+ and iridescent hues resembling oil slicks or marbled paper. The figure's face
198
+ is completely obscured, appearing as a smooth, faceless, pale mauve mask with
199
+ a single, glowing bright white point of light in the center. In its right hand,
200
+ clad in a grey-blue gauntlet, the jester grips a massive, ornate sword with a
201
+ wide, glowing, ethereal white blade, its crossguard intricately sculpted. Lighting
202
+ is dramatic and theatrical, casting strong shadows and highlighting the painterly
203
+ texture, giving the artwork a dark fantasy, surreal aesthetic reminiscent of concept
204
+ art.
205
+ output:
206
+ url: images/30.jpg
207
+ - text: A surreal black-and-white ink illustration of three interlocking, heavily
208
+ wrinkled elderly faces merging into a landscape. The top face covers one eye,
209
+ crowned by dense leaves, a live bird, and a skeletal bird. It flows into a profile
210
+ face and a third face featuring a solid black eye and a hand on its cheek. The
211
+ bottom neck plunges into a cross-section of earth, morphing into swirling subterranean
212
+ roots, buried bones, and abstract organic forms. Above ground, weathered wooden
213
+ cabins and tall grass flank the facial monolith. Meticulous stippling and cross-hatching
214
+ define the high-contrast, intricate vertical composition.
215
+ output:
216
+ url: images/32.jpg
217
+ - text: 1990s vintage anime style cel animation, densely packed crowd of teenagers
218
+ in summer uniforms, central boy with short black hair raising a clenched right
219
+ fist, squinting one eye with a determined expression, wearing a white short-sleeve
220
+ shirt and solid green necktie, surrounding students looking in various directions,
221
+ girls in white sailor blouses with green striped collars and neckerchiefs, light
222
+ blue skirts and trousers, tightly framed medium shot, flat shading, soft muted
223
+ retro.
224
+ output:
225
+ url: images/33.jpg
226
+ - text: extreme close-up of a woman's face partially obscured by tousled dark brown
227
+ hair, soft parted lips, smooth skin on lower cheek and jawline, stray hair strands
228
+ falling loosely across the nose, deep moody shadows enveloping the left frame,
229
+ cinematic warm lighting, delicate highlights on the mouth, muted earthy color
230
+ palette, sepia-toned warmth, intimate portrait photography, macro lens, shallow
231
+ depth of field, distinct film grain texture, vintage atmospheric aesthetic
232
+ output:
233
+ url: images/35.jpg
234
+ ---
235
+
236
+ # Krea 2 Text-to-Image Model
237
+
238
+ ![Krea 2 sample outputs](images/header.jpg)
239
+
240
+ ## Inference with the official codebase
241
+
242
+ 1. Setup the official Krea 2 [codebase](https://github.com/krea-ai/krea-2)
243
+ 2. Download `turbo.safetensors` in this repo
244
+ 3. `export OSS_TURBO=<path-to-turbo.safetensors>`
245
+ Run inference:
246
+ ```bash
247
+ uv run inference.py "a fox walking in the snow" \
248
+ --checkpoint oss_turbo --steps 8 --cfg 0.0 --mu 1.15 --width 2048 --height 2048
249
+ ```
250
+
251
+ ## Inference with diffusers
252
+
253
+ Install diffusers from source (for `Krea2Pipeline`):
254
+
255
+ ```bash
256
+ pip install git+https://github.com/huggingface/diffusers.git
257
+ ```
258
+
259
+ ```python
260
+ import torch
261
+ from diffusers import Krea2Pipeline
262
+
263
+ pipe = Krea2Pipeline.from_pretrained("krea/Krea-2-Turbo", torch_dtype=torch.bfloat16).to("cuda")
264
+ image = pipe("a fox in the snow", num_inference_steps=8, guidance_scale=0.0).images[0]
265
+ image.save("krea2.png")
266
+ ```
267
+
268
+ ## Inference with SGLang
269
+
270
+ Install SGLang from source (https://github.com/sgl-project/sglang)
271
+
272
+ From the CLI:
273
+ ```bash
274
+ sglang generate --model-path krea/Krea-2-Turbo \
275
+ --prompt "a red fox sitting in fresh snow, golden hour, photorealistic" \
276
+ --num-inference-steps 8 --height 1024 --width 1024 --save-output
277
+ ```
278
+
279
+ See the full SGLang Krea 2 Cookbook [here](https://docs.sglang.io/cookbook/diffusion/Krea/Krea-2)
280
+
281
+ ## Model Overview
282
+
283
+ - **Model Name:** Krea 2
284
+ - **Version:** v1.0
285
+ - **Release Date:** June 22, 2026
286
+ - **Model Type:** Text-to-image diffusion model
287
+ - **Architecture:** Diffusion Transformer with 12 billion parameters
288
+ - **License:** Krea 2 Community License
289
+ - **Release Format:** Open-weight release and Krea-hosted product integrations
290
+ - **Model Developer:** Krea.ai, Inc.
291
+
292
+ ## Model Family and Release Checkpoints
293
+
294
+ This model card covers the Krea 2 model family, including the following release checkpoints:
295
+
296
+ - **Krea 2 Raw:** Base release checkpoint, prior to additional post-training and fine-tuning.
297
+ - **Krea 2 Turbo:** Post-trained release checkpoint with additional fine-tuning and distillation.
298
+
299
+ ## Capabilities and Intended use
300
+
301
+ Krea 2 is a text-to-image diffusion model that generates images from natural-language text descriptions. The model is designed to support creative, commercial, developer, and research use cases, including image generation, concepting, design exploration, visual production workflows, and integration into applications and creative tools.
302
+
303
+ ## Out-of-Scope Uses
304
+
305
+ This model is not intended or designed for uses that violate applicable law or regulations, infringe or misappropriate third-party rights, generate or facilitate unlawful or harmful content (including CSAM, NCII, harassment or defamation), or support fully automated decision-making that adversely affects legal rights of individuals. This summary is non-exhaustive. Use of Krea 2 is subject to the Krea 2 Community License Agreement and must comply with the Acceptable Use Policy. In the event of any conflict, the Krea Acceptable Use Policy and Krea 2 Community License control.
306
+
307
+ ## Training Data
308
+
309
+ This model was developed using a combination of publicly available data, data licensed from third-party providers, and synthetic data generated through proprietary methods. The training data includes images and their associated captions or text descriptions.
310
+
311
+ Prior to training, data was filtered to remove certain categories of harmful content and reduce low-quality, duplicative, or irrelevant data. Krea also used curated and synthetic training data selected to improve prompt following, visual quality, and alignment with intended use cases.
312
+
313
+ ## Safety Measures
314
+
315
+ We implemented safety measures across the full model development lifecycle. We applied targeted fine-tuning techniques to reduce the model's susceptibility to generating harmful content in response to both direct and adversarial prompts, and we conducted multiple rounds of internal and external safety evaluation before release.
316
+
317
+ For Krea's hosted products incorporating Krea 2, we deploy input and output classifiers using a combination of proprietary and third-party detection tools to flag or block policy-violating prompts and generated images.
318
+
319
+ Because this is also an open-weights release, Krea does not control downstream deployment of the model. Under the Krea 2 Community License, deployers are required to implement content filtering measures or equivalent review processes to prevent the generation or distribution of unlawful or policy-violating content appropriate to their use case. Deployers who fail to implement required safeguards are in breach of the license. See the license for details.
320
+
321
+ We conducted multiple rounds of internal and external safety evaluations before release, including adversarial testing designed to assess the model's resilience to attempts to elicit harmful or policy-violating outputs. Testing covered sexually explicit content, non-consensual intimate imagery, child-safety risks, and other high-risk content categories. Based on these evaluations, the release checkpoints demonstrated high resilience against violative inputs across the tested risk categories.
322
+
323
+ Krea maintains reporting channels for harmful, illegal, or policy-violating outputs at safety@krea.ai. Reports involving potential CSAM are escalated to NCMEC as required by law. Krea reserves the right to update model weights or revoke access in response to identified misuse patterns.
324
+
325
+ ## Risks and Limitations
326
+
327
+ Krea 2 is a new technology and there are risks associated with its use. Testing conducted to date has not covered, nor could it cover, all possible scenarios. The model's potential outputs cannot be predicted in advance and may, in some instances, produce inaccurate, objectionable, or otherwise undesirable outputs.
328
+
329
+ This model is not intended to provide factual information. The model may fail to generate output that matches the prompt, and prompt following may be influenced by prompt style, specificity, language, and phrasing.
330
+
331
+ Before deploying any application using this model, developers should perform safety testing and tuning tailored to their specific application and must implement safeguards required by the Krea 2 Community License.
332
+
333
+ ## License and Outputs
334
+
335
+ Krea does not claim copyright or other intellectual property rights over content generated by users of this model. Users are solely responsible for their outputs and any subsequent use of those outputs. As with other generative tools, the nature of a user's inputs influences the outputs produced, and prompts may produce images that implicate third-party rights. Users are solely responsible for assessing and addressing those risks. See the Krea 2 Community License for more information.
336
+
337
+ ## Reporting
338
+
339
+ To report harmful, illegal, or policy-violating outputs generated by this model:
340
+
341
+ - **Email:** safety@krea.ai
342
+
343
+ Reports involving potential CSAM will be escalated to the National Center for Missing & Exploited Children (NCMEC) as required by law.
344
+
345
+ ## Contact
346
+
347
+ - **General inquiries:** support@krea.ai
348
+ - **Safety and abuse:** safety@krea.ai
349
+ - **Model card version:** 1.0
350
+ - **Last updated:** June 22, 2026
images/00.jpg ADDED

Git LFS Details

  • SHA256: cd70b8be7f4a6a50711c3f10b6d2cf19d5e2a977e85102c7d0c1f6cc46526569
  • Pointer size: 132 Bytes
  • Size of remote file: 1.41 MB
images/01.jpg ADDED

Git LFS Details

  • SHA256: 80e6401136085c55a2ae6f4f695ae0c5bcbd5604ba355d28b172b18ef361737e
  • Pointer size: 132 Bytes
  • Size of remote file: 1.26 MB
images/02.jpg ADDED

Git LFS Details

  • SHA256: 0aed647e2a88b278a1e1c34392814094af43c9785603f59afb5b56cf1895e77e
  • Pointer size: 131 Bytes
  • Size of remote file: 830 kB
images/03.jpg ADDED

Git LFS Details

  • SHA256: 7dc60e079c1fe24706adb6e833066b69f48e6afd9e02c15c84595d887909c691
  • Pointer size: 131 Bytes
  • Size of remote file: 590 kB
images/04.jpg ADDED

Git LFS Details

  • SHA256: b517df888dbacb74543b8ee0d9d486006a61a72926a949c0d45d506d16a94136
  • Pointer size: 131 Bytes
  • Size of remote file: 898 kB
images/05.jpg ADDED

Git LFS Details

  • SHA256: a9df32a7be8b6a58eb62d257d7c8b44a416d3692be47175a2a7eb9d865dc9d60
  • Pointer size: 131 Bytes
  • Size of remote file: 975 kB
images/06.jpg ADDED

Git LFS Details

  • SHA256: 94b98373c8337cfdbcaa06f6185e229f5b62b6a7d7bc68fadbc80de6f887baeb
  • Pointer size: 131 Bytes
  • Size of remote file: 577 kB
images/07.jpg ADDED

Git LFS Details

  • SHA256: 99e62242c56deea5b35172e8832c2b5abaecc32fa8f95beba4c33ad6f833f0a4
  • Pointer size: 131 Bytes
  • Size of remote file: 563 kB
images/08.jpg ADDED

Git LFS Details

  • SHA256: 138f30c6c3c0a4f9a4df684c9c42e308e7e5257b83607f5fd5d49ef34507c5db
  • Pointer size: 131 Bytes
  • Size of remote file: 868 kB
images/09.jpg ADDED

Git LFS Details

  • SHA256: f0ff939ce308dee434df5747ece8b9ab1a65360cf9e93ad03970aadadb1f584c
  • Pointer size: 131 Bytes
  • Size of remote file: 649 kB
images/10.jpg ADDED

Git LFS Details

  • SHA256: 9399e8b0a7cf7460992ffa34e06ca427a12fdfc946367bed167bd56410374b06
  • Pointer size: 132 Bytes
  • Size of remote file: 1.33 MB
images/11.jpg ADDED

Git LFS Details

  • SHA256: cdf3671cb6c91ec0e6daf4850e55ab165be47694cae4d6fc8bfb7621b8137744
  • Pointer size: 131 Bytes
  • Size of remote file: 460 kB
images/12.jpg ADDED

Git LFS Details

  • SHA256: 9b971c2a576b0a5d002977681a2324725a8bc3f46eff54179701e75c2a523224
  • Pointer size: 132 Bytes
  • Size of remote file: 1.05 MB
images/13.jpg ADDED

Git LFS Details

  • SHA256: 1f850c5e57b87801bd13239e03cfae5d2832493de5e1f07538ae9e739b8ea4c5
  • Pointer size: 131 Bytes
  • Size of remote file: 854 kB
images/14.jpg ADDED

Git LFS Details

  • SHA256: 8a9d73596f40068fb982e2bf3e668da20087bc5acf52b4c75a663ee3c58f5294
  • Pointer size: 131 Bytes
  • Size of remote file: 744 kB
images/15.jpg ADDED

Git LFS Details

  • SHA256: 92d855d16ae06d0c979c072235fbe7375631dd64e0e39204443d7b11e7200819
  • Pointer size: 131 Bytes
  • Size of remote file: 815 kB
images/16.jpg ADDED

Git LFS Details

  • SHA256: 5ec3044cddfec760c70483799d7dadd739899cfd36964b11885cb5113164c82f
  • Pointer size: 131 Bytes
  • Size of remote file: 705 kB
images/17.jpg ADDED

Git LFS Details

  • SHA256: 6c6d702a2a77610b64cc6294e162db97f8c88602abc518b1e9a8ae3daa5593ac
  • Pointer size: 131 Bytes
  • Size of remote file: 467 kB
images/18.jpg ADDED

Git LFS Details

  • SHA256: d820dcb73ba7640adc42d843975c3cb9bc19d99c733de2a96451f845899b1af0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.22 MB
images/19.jpg ADDED

Git LFS Details

  • SHA256: 76af04d767bf4e3224281fd09720f6f19edf9569c16dfc7204defdfaafd5c9a1
  • Pointer size: 131 Bytes
  • Size of remote file: 613 kB
images/20.jpg ADDED

Git LFS Details

  • SHA256: 489f538f7240fd62b6d91f74965063e9ab4340f0f85891feebac8677bb829ea8
  • Pointer size: 131 Bytes
  • Size of remote file: 984 kB
images/21.jpg ADDED

Git LFS Details

  • SHA256: c3a4e785ede82a52429c226492ea2da3df1824a3da095f541fc6477c49ade298
  • Pointer size: 132 Bytes
  • Size of remote file: 1.38 MB
images/22.jpg ADDED

Git LFS Details

  • SHA256: b4a1762458aab7c3e75c1615f32551c7f5f902216e21365781d32e375a5d1b92
  • Pointer size: 131 Bytes
  • Size of remote file: 526 kB
images/23.jpg ADDED

Git LFS Details

  • SHA256: 18fae5338bd413eef6453f635a52e0128342ac47ec0ead6eb844cd6e0b62c0fb
  • Pointer size: 131 Bytes
  • Size of remote file: 586 kB
images/24.jpg ADDED

Git LFS Details

  • SHA256: d089561a509888928fbee86c8d4b0dd56c67dda29b64b2ad1a3fb6e46e07ec6a
  • Pointer size: 131 Bytes
  • Size of remote file: 571 kB
images/25.jpg ADDED

Git LFS Details

  • SHA256: becc93d67ebd829fd2ddcc8ae9599e3e4e9446a1b19dac3294d5f4b712c295b5
  • Pointer size: 131 Bytes
  • Size of remote file: 851 kB
images/26.jpg ADDED

Git LFS Details

  • SHA256: 30b7138fd1dcd9bef52860df876796c8f5ebddb9ad1df0fe93cdaba6bb7d7271
  • Pointer size: 131 Bytes
  • Size of remote file: 891 kB
images/27.jpg ADDED

Git LFS Details

  • SHA256: b4bfe215847d7824ef8a427235f23ce1d92f863049c32a59276417e89824f53f
  • Pointer size: 131 Bytes
  • Size of remote file: 926 kB
images/28.jpg ADDED

Git LFS Details

  • SHA256: 3c8f7ede40cd2f6b71370d8f2c1854c697facc5b06d7c2c3c119c2f40805b321
  • Pointer size: 131 Bytes
  • Size of remote file: 587 kB
images/29.jpg ADDED

Git LFS Details

  • SHA256: a3e930455880234db0c9eb148df99c921ef64d33d18d80d0c07bc4280c3b4f2e
  • Pointer size: 131 Bytes
  • Size of remote file: 693 kB
images/30.jpg ADDED

Git LFS Details

  • SHA256: 9468c564881ef4ce903e7d6d26e3aa3fd4ded000dccdf254f56b78b9dd91af75
  • Pointer size: 131 Bytes
  • Size of remote file: 724 kB
images/31.jpg ADDED

Git LFS Details

  • SHA256: 34839039876c85a10362d5dbd3f6fba6f8c921afd4bfdbd8ed96627b13c80f16
  • Pointer size: 131 Bytes
  • Size of remote file: 416 kB
images/32.jpg ADDED

Git LFS Details

  • SHA256: 962fcb843e7cd0a287a070f2ed0f0213ab11aeb6e95be2e1a86df2f1828d3398
  • Pointer size: 132 Bytes
  • Size of remote file: 1.59 MB
images/33.jpg ADDED

Git LFS Details

  • SHA256: 1880643a96b876188618da686780b9d58b09babb463ce2bb8d51f7e869148c9a
  • Pointer size: 131 Bytes
  • Size of remote file: 719 kB
images/34.jpg ADDED

Git LFS Details

  • SHA256: 0e5826d4edf3706af2365bc3a4eb9c92348533ebd792c44493c58dc79f42bcbc
  • Pointer size: 131 Bytes
  • Size of remote file: 713 kB
images/35.jpg ADDED

Git LFS Details

  • SHA256: 95fc81fcdbd2b5576c9cecfa1e015da5d68b252c9e1efe739ce2575ecbbd91c0
  • Pointer size: 131 Bytes
  • Size of remote file: 753 kB
images/header.jpg ADDED

Git LFS Details

  • SHA256: 90ffc62fea303c12ee7e7892b37940c0ec575e1bd53cd801c1756e5d9b7b0d50
  • Pointer size: 132 Bytes
  • Size of remote file: 3.63 MB
model_index.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "Krea2Pipeline",
3
+ "_diffusers_version": "0.39.0.dev0",
4
+ "_name_or_path": "./tmp_model",
5
+ "is_distilled": true,
6
+ "patch_size": 2,
7
+ "scheduler": [
8
+ "diffusers",
9
+ "FlowMatchEulerDiscreteScheduler"
10
+ ],
11
+ "text_encoder": [
12
+ "transformers",
13
+ "Qwen3VLModel"
14
+ ],
15
+ "text_encoder_select_layers": [
16
+ 2,
17
+ 5,
18
+ 8,
19
+ 11,
20
+ 14,
21
+ 17,
22
+ 20,
23
+ 23,
24
+ 26,
25
+ 29,
26
+ 32,
27
+ 35
28
+ ],
29
+ "tokenizer": [
30
+ "transformers",
31
+ "Qwen2Tokenizer"
32
+ ],
33
+ "transformer": [
34
+ "diffusers",
35
+ "Krea2Transformer2DModel"
36
+ ],
37
+ "vae": [
38
+ "diffusers",
39
+ "AutoencoderKLQwenImage"
40
+ ]
41
+ }
quantization_info.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "quantization_method": "mixed_precision_nf4",
3
+ "model_type": "krea",
4
+ "description": "First and last blocks plus boundary modules kept at bfloat16, middle layers quantized to NF4 (krea architecture)",
5
+ "high_precision_layers_count": 56,
6
+ "removed_stale_checkpoint_indexes": [
7
+ "transformer/diffusion_pytorch_model.safetensors.index.json"
8
+ ]
9
+ }
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": true,
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.12.1",
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:be7235ff7d69b135e483a94133a090ae2005b6ffad818b72ea3ec5dcc1af4dff
3
+ size 2874030922
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,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "local_files_only": false,
25
+ "model_max_length": 262144,
26
+ "pad_token": "<|endoftext|>",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null
30
+ }
transformer/config.json ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "Krea2Transformer2DModel",
3
+ "_diffusers_version": "0.39.0.dev0",
4
+ "_name_or_path": "./tmp_model/transformer",
5
+ "attention_head_dim": 128,
6
+ "axes_dims_rope": [
7
+ 32,
8
+ 48,
9
+ 48
10
+ ],
11
+ "in_channels": 64,
12
+ "intermediate_size": 16384,
13
+ "norm_eps": 1e-05,
14
+ "num_attention_heads": 48,
15
+ "num_key_value_heads": 12,
16
+ "num_layers": 28,
17
+ "num_layerwise_text_blocks": 2,
18
+ "num_refiner_text_blocks": 2,
19
+ "num_text_layers": 12,
20
+ "quantization_config": {
21
+ "_load_in_4bit": true,
22
+ "_load_in_8bit": false,
23
+ "bnb_4bit_compute_dtype": "bfloat16",
24
+ "bnb_4bit_quant_storage": "uint8",
25
+ "bnb_4bit_quant_type": "nf4",
26
+ "bnb_4bit_use_double_quant": true,
27
+ "llm_int8_enable_fp32_cpu_offload": false,
28
+ "llm_int8_has_fp16_weight": false,
29
+ "llm_int8_skip_modules": [
30
+ "img_in",
31
+ "time_embed.linear_1",
32
+ "time_embed.linear_2",
33
+ "time_mod_proj",
34
+ "text_fusion.projector",
35
+ "txt_in.linear_1",
36
+ "txt_in.linear_2",
37
+ "final_layer.linear",
38
+ "text_fusion.layerwise_blocks.0.attn.to_q",
39
+ "text_fusion.layerwise_blocks.0.attn.to_k",
40
+ "text_fusion.layerwise_blocks.0.attn.to_v",
41
+ "text_fusion.layerwise_blocks.0.attn.to_gate",
42
+ "text_fusion.layerwise_blocks.0.attn.to_out.0",
43
+ "text_fusion.layerwise_blocks.0.ff.gate",
44
+ "text_fusion.layerwise_blocks.0.ff.up",
45
+ "text_fusion.layerwise_blocks.0.ff.down",
46
+ "text_fusion.layerwise_blocks.1.attn.to_q",
47
+ "text_fusion.layerwise_blocks.1.attn.to_k",
48
+ "text_fusion.layerwise_blocks.1.attn.to_v",
49
+ "text_fusion.layerwise_blocks.1.attn.to_gate",
50
+ "text_fusion.layerwise_blocks.1.attn.to_out.0",
51
+ "text_fusion.layerwise_blocks.1.ff.gate",
52
+ "text_fusion.layerwise_blocks.1.ff.up",
53
+ "text_fusion.layerwise_blocks.1.ff.down",
54
+ "text_fusion.refiner_blocks.0.attn.to_q",
55
+ "text_fusion.refiner_blocks.0.attn.to_k",
56
+ "text_fusion.refiner_blocks.0.attn.to_v",
57
+ "text_fusion.refiner_blocks.0.attn.to_gate",
58
+ "text_fusion.refiner_blocks.0.attn.to_out.0",
59
+ "text_fusion.refiner_blocks.0.ff.gate",
60
+ "text_fusion.refiner_blocks.0.ff.up",
61
+ "text_fusion.refiner_blocks.0.ff.down",
62
+ "text_fusion.refiner_blocks.1.attn.to_q",
63
+ "text_fusion.refiner_blocks.1.attn.to_k",
64
+ "text_fusion.refiner_blocks.1.attn.to_v",
65
+ "text_fusion.refiner_blocks.1.attn.to_gate",
66
+ "text_fusion.refiner_blocks.1.attn.to_out.0",
67
+ "text_fusion.refiner_blocks.1.ff.gate",
68
+ "text_fusion.refiner_blocks.1.ff.up",
69
+ "text_fusion.refiner_blocks.1.ff.down",
70
+ "transformer_blocks.0.attn.to_q",
71
+ "transformer_blocks.0.attn.to_k",
72
+ "transformer_blocks.0.attn.to_v",
73
+ "transformer_blocks.0.attn.to_gate",
74
+ "transformer_blocks.0.attn.to_out.0",
75
+ "transformer_blocks.0.ff.gate",
76
+ "transformer_blocks.0.ff.up",
77
+ "transformer_blocks.0.ff.down",
78
+ "transformer_blocks.27.attn.to_q",
79
+ "transformer_blocks.27.attn.to_k",
80
+ "transformer_blocks.27.attn.to_v",
81
+ "transformer_blocks.27.attn.to_gate",
82
+ "transformer_blocks.27.attn.to_out.0",
83
+ "transformer_blocks.27.ff.gate",
84
+ "transformer_blocks.27.ff.up",
85
+ "transformer_blocks.27.ff.down",
86
+ "norm",
87
+ "norm1",
88
+ "norm2",
89
+ "norm_q",
90
+ "norm_k"
91
+ ],
92
+ "llm_int8_threshold": 6.0,
93
+ "load_in_4bit": true,
94
+ "load_in_8bit": false,
95
+ "quant_method": "bitsandbytes"
96
+ },
97
+ "rope_theta": 1000.0,
98
+ "text_hidden_dim": 2560,
99
+ "text_intermediate_size": 6912,
100
+ "text_num_attention_heads": 20,
101
+ "text_num_key_value_heads": 20,
102
+ "timestep_embed_dim": 256
103
+ }
transformer/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d216777aa4dd1187f35a21dcf5b88da2692969ed5de1e544b3ced5dfdfed1381
3
+ size 8890150227