@sogni-ai/sogni-client 5.63.4 → 5.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms.txt CHANGED
@@ -243,6 +243,7 @@ The full catalog is dynamic — enumerate it at runtime with
243
243
  | `z_image_turbo_bf16` | Z-Image Turbo — ultra-fast 8-step (free-tier eligible) |
244
244
  | `z_image_bf16` | Z-Image — high quality 20-50 step |
245
245
  | `krea2_turbo_fp8_scaled` | Krea 2 Turbo — few-step, strong in-image text, up to 2K |
246
+ | `flux3_image_klein_sd_int8_convrot` | FLUX 3 Image Klein (Black Forest Labs) — 16-step text-to-image, `startingImage`, and edits from 1-10 optional `contextImages`; 256-4096px (4K included), guidance fixed at 1, no negative prompt; write full scene captions |
246
247
  | `krea2_identity_edit_v1_2` | Krea 2 Identity Edit LoRA v1.2 — best for transforming a person or character while keeping their likeness; 1-2 reference images |
247
248
  | `chroma-v.46-flash_fp8` | Chroma v.46 Flash — fast, high quality |
248
249
  | `chroma-v48-detail-svd_fp8` | Chroma v.48 Detail — high detail |
@@ -270,6 +271,10 @@ Pick by what the edit has to preserve, not by step count or quality tier.
270
271
  - **Everything else** — use `qwen_image_edit_2511_fp8_lightning` (fast) or
271
272
  `qwen_image_edit_2511_fp8`: general-purpose photo transforms, in-image text
272
273
  edits, multi-person changes, and combining up to 3 reference images.
274
+ - **Compositions from up to 10 references** — `flux3_image_klein_sd_int8_convrot`
275
+ (FLUX 3 Image Klein) takes 1-10 `contextImages`. Describe the whole result as a
276
+ full scene caption and name references in order (the first image, the second
277
+ image); a negative prompt has no effect.
273
278
 
274
279
  A higher-step general-purpose editor does not beat the identity model at a
275
280
  likeness task — it reinterprets the subject instead of preserving it. When an
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "5.63.4",
6
+ "version": "5.64.0",
7
7
  "engines": {
8
8
  "node": ">=22"
9
9
  },
@@ -134,7 +134,7 @@
134
134
  "homepage": "https://github.com/Sogni-AI/sogni-client#readme",
135
135
  "dependencies": {
136
136
  "@lukeed/uuid": "^2.0.1",
137
- "@sogni-ai/sogni-protocol": "1.0.0-alpha.50",
137
+ "@sogni-ai/sogni-protocol": "1.0.0-alpha.51",
138
138
  "@types/js-cookie": "^3.0.6",
139
139
  "@types/lodash": "^4.17.23",
140
140
  "@types/ws": "^8.5.13",
@@ -29,6 +29,7 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
29
29
  "z-turbo",
30
30
  "z-image",
31
31
  "krea-2-turbo",
32
+ "flux-3-klein",
32
33
  "dark-beast-krea2",
33
34
  "dark-beast-z-turbo",
34
35
  "chroma-v46-flash",
@@ -51,15 +52,15 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
51
52
  "pony-faetality",
52
53
  "dreamshaper-xl"
53
54
  ],
54
- "description": "DO NOT SET THIS PARAMETER unless the user names a specific model, asks for a very complex image render, asks for a video storyboard/storyboard sheet/contact sheet/panel layout image, asks for anime without naming a model, requests permitted NSFW/nudity content, or explicitly asks for Z-image/Z-image Turbo/Krea 2 Turbo image-to-image. The app auto-selects based on quality settings. Set \"gpt-image-2.5-flare\" when the user asks for a ChatGPT, OpenAI, GPT, or GPT Image image/model without naming a version. Set \"gpt-image-2\" only when the user explicitly names GPT Image 2, GPT-2, or gpt-image-2; GPT Image 2 is never a default. Set \"gpt-image-2.5-sunburst\" when the user explicitly requests very strong text rendering, and by default for video storyboards and other complex single-image renders that need dense labels, crisp typography, multi-panel composition, timing notes, foley notes, professional storyboard-sheet layout, or a comprehensive character/mascot/model sheet with turnarounds, expressions, accessories, palette swatches, and brand notes. Set \"one-obsession-v22\" when the user asks for an anime or anime-style image and has not named a specific image model. Set \"z-turbo\" when the user asks for Z-image Turbo; set \"z-image\" when they ask for Z-image without Turbo. Set \"krea-2-turbo\" when the user asks for Krea 2 Turbo. If the user names another image model, honor that requested model instead. A model preference usually does not change which tool to use; the Z-image and Krea 2 Turbo image-to-image exception uses sourceImageIndex plus starting_image_strength on this tool. NSFW rule: GPT Image models and Qwen image models CANNOT do nudity. For permitted NSFW/nudity content, prefer \"dark-beast-krea2\", then \"dark-beast-z-turbo\"; \"chroma1-hd\", \"pony-v7\", \"chroma-detail\", \"chroma-v46-flash\", and \"z-turbo\" are compatible fallbacks. GPT Image 2.5 adds two distinct models: use \"gpt-image-2.5-sunburst\" for an explicit Sunburst request and \"gpt-image-2.5-flare\" for an explicit Flare request. For GPT Image 2.5 without a named variant, use Flare. Preserve explicit GPT Image 2.0 as \"gpt-image-2\". Sunburst is positioned for difficult images and precise edits; Flare for faster everyday generation. Both generate and edit. Model choice is independent of rendering quality."
55
+ "description": "DO NOT SET THIS PARAMETER unless the user names a specific model, asks for a very complex image render, asks for a video storyboard/storyboard sheet/contact sheet/panel layout image, asks for anime without naming a model, requests permitted NSFW/nudity content, or explicitly asks for Z-image/Z-image Turbo/Krea 2 Turbo image-to-image. The app auto-selects based on quality settings. Set \"gpt-image-2.5-flare\" when the user asks for a ChatGPT, OpenAI, GPT, or GPT Image image/model without naming a version. Set \"gpt-image-2\" only when the user explicitly names GPT Image 2, GPT-2, or gpt-image-2; GPT Image 2 is never a default. Set \"gpt-image-2.5-sunburst\" when the user explicitly requests very strong text rendering, and by default for video storyboards and other complex single-image renders that need dense labels, crisp typography, multi-panel composition, timing notes, foley notes, professional storyboard-sheet layout, or a comprehensive character/mascot/model sheet with turnarounds, expressions, accessories, palette swatches, and brand notes. Set \"one-obsession-v22\" when the user asks for an anime or anime-style image and has not named a specific image model. Set \"z-turbo\" when the user asks for Z-image Turbo; set \"z-image\" when they ask for Z-image without Turbo. Set \"krea-2-turbo\" when the user asks for Krea 2 Turbo. Set \"flux-3-klein\" when the user asks for FLUX 3 or FLUX 3 Image Klein. If the user names another image model, honor that requested model instead. A model preference usually does not change which tool to use; the Z-image and Krea 2 Turbo image-to-image exception uses sourceImageIndex plus starting_image_strength on this tool. NSFW rule: GPT Image models and Qwen image models CANNOT do nudity. For permitted NSFW/nudity content, prefer \"dark-beast-krea2\", then \"dark-beast-z-turbo\"; \"chroma1-hd\", \"pony-v7\", \"chroma-detail\", \"chroma-v46-flash\", and \"z-turbo\" are compatible fallbacks. GPT Image 2.5 adds two distinct models: use \"gpt-image-2.5-sunburst\" for an explicit Sunburst request and \"gpt-image-2.5-flare\" for an explicit Flare request. For GPT Image 2.5 without a named variant, use Flare. Preserve explicit GPT Image 2.0 as \"gpt-image-2\". Sunburst is positioned for difficult images and precise edits; Flare for faster everyday generation. Both generate and edit. Model choice is independent of rendering quality."
55
56
  },
56
57
  "width": {
57
58
  "type": "number",
58
- "description": "Output image width in pixels. Default: 1024. Supported bounds depend on the selected image model: Z-Image/Z-Image Turbo, Dark Beast Z-Image Turbo, Chroma, and legacy/specialized image models support 256-2048 on either edge; Krea 2 Turbo, Dark Beast KREA 2, and Qwen image models support 256-2560 on either edge; One Obsession v22 supports 256-1920 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., \"1280 wide\", \"1280x720\", \"720p\", \"1080x1920\", \"3840x2160\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
59
+ "description": "Output image width in pixels. Default: 1024. Supported bounds depend on the selected image model: Z-Image/Z-Image Turbo, Dark Beast Z-Image Turbo, Chroma, and legacy/specialized image models support 256-2048 on either edge; Krea 2 Turbo, Dark Beast KREA 2, and Qwen image models support 256-2560 on either edge; FLUX 3 Image Klein supports 256-4096 on either edge, including 4K (3840x2160, 2160x3840, 4096x4096); One Obsession v22 supports 256-1920 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., \"1280 wide\", \"1280x720\", \"720p\", \"1080x1920\", \"3840x2160\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
59
60
  },
60
61
  "height": {
61
62
  "type": "number",
62
- "description": "Output image height in pixels. Default: 1024. Supported bounds depend on the selected image model: Z-Image/Z-Image Turbo, Dark Beast Z-Image Turbo, Chroma, and legacy/specialized image models support 256-2048 on either edge; Krea 2 Turbo, Dark Beast KREA 2, and Qwen image models support 256-2560 on either edge; One Obsession v22 supports 256-1920 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., \"720 high\", \"1280x720\", \"720p\", \"1080x1920\", \"2160x3840\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
63
+ "description": "Output image height in pixels. Default: 1024. Supported bounds depend on the selected image model: Z-Image/Z-Image Turbo, Dark Beast Z-Image Turbo, Chroma, and legacy/specialized image models support 256-2048 on either edge; Krea 2 Turbo, Dark Beast KREA 2, and Qwen image models support 256-2560 on either edge; FLUX 3 Image Klein supports 256-4096 on either edge, including 4K (3840x2160, 2160x3840, 4096x4096); One Obsession v22 supports 256-1920 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., \"720 high\", \"1280x720\", \"720p\", \"1080x1920\", \"2160x3840\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
63
64
  },
64
65
  "numberOfVariations": {
65
66
  "type": "number",
@@ -505,7 +506,7 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
505
506
  "type": "function",
506
507
  "function": {
507
508
  "name": "edit_image",
508
- "description": "Generate images guided by reference photos. Supports GPT Image 2 up to 16 images, Qwen up to 3 images, and Krea 2 Identity Edit / Dark Beast Krea 2 Identity Edit up to 2 images. Best for style-guided generation, combining elements from multiple images, ANY persona image creation, identity-preserving Krea edits, and any uploaded brand asset reuse — logos, brand marks, mascots, product shots, photos, screenshots, sketches, or character designs the user expects to appear in or guide the result. ALWAYS use this (never generate_image) when persona photos OR uploaded image assets meant for reuse are in context — even if a specific edit model is requested. Exception: explicit Z-image/Z-image Turbo/Krea 2 Turbo uploaded-image enhancement uses generate_image with sourceImageIndex and starting_image_strength because those base image-to-image models are not edit_image models. If a previous edit_image attempt did not preserve the uploaded asset well, stay on edit_image and tighten the prompt or switch model; generate_image has no access to the upload.",
509
+ "description": "Generate images guided by reference photos. Supports GPT Image 2 up to 16 images, FLUX 3 Image Klein up to 10 images, Qwen up to 3 images, and Krea 2 Identity Edit / Dark Beast Krea 2 Identity Edit up to 2 images. Best for style-guided generation, combining elements from multiple images, ANY persona image creation, identity-preserving Krea edits, and any uploaded brand asset reuse — logos, brand marks, mascots, product shots, photos, screenshots, sketches, or character designs the user expects to appear in or guide the result. ALWAYS use this (never generate_image) when persona photos OR uploaded image assets meant for reuse are in context — even if a specific edit model is requested. Exception: explicit Z-image/Z-image Turbo/Krea 2 Turbo uploaded-image enhancement uses generate_image with sourceImageIndex and starting_image_strength because those base image-to-image models are not edit_image models. If a previous edit_image attempt did not preserve the uploaded asset well, stay on edit_image and tighten the prompt or switch model; generate_image has no access to the upload.",
509
510
  "parameters": {
510
511
  "type": "object",
511
512
  "properties": {
@@ -522,9 +523,10 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
522
523
  "qwen-lightning",
523
524
  "qwen",
524
525
  "krea-identity-edit",
525
- "dark-beast-krea2-identity-edit"
526
+ "dark-beast-krea2-identity-edit",
527
+ "flux-3-klein"
526
528
  ],
527
- "description": "The app auto-selects Fast→Qwen Lightning and HQ/Pro→full Qwen only for ordinary identity-neutral edits. REQUIRED IDENTITY DEFAULT: set \"krea-identity-edit\" whenever an edit of a referenced person or character must keep likeness or character identity while changing clothing, hair or makeup, pose or position, face/head/body, background, lighting, or visual style. Infer that semantic intent in any language; never route from keyword or regex matching. Also use it for a non-Pro single-character sheet. This default applies even when the user did not name Krea; an explicitly requested model always wins. Set \"dark-beast-krea2-identity-edit\" only when the user explicitly requests that model, its uncensored/community variant, or dark_beast_krea2_identity_edit_v1_2. Set \"gpt-image-2\" only when the user explicitly names legacy GPT Image 2 (GPT Image 2, GPT-2, or gpt-image-2); it is never a default. A ChatGPT, OpenAI, GPT, or GPT Image edit request that names no version uses \"gpt-image-2.5-flare\". Set \"gpt-image-2.5-sunburst\" when precise typography, dense labels, or a professional multi-panel layout is the primary requirement; Pro character sheets use Sunburst unless the user names another model. If GPT Image 2.5 Sunburst is unavailable for detail-critical layout work, fall back to full \"qwen\", never \"qwen-lightning\". Krea identity edit models require at least one reference image, accept up to two context images, and work best at 512-2048px. Let the model tier and worker choose current steps, guidance, sampler, scheduler, grounding, and reference-boost defaults; do not send a negative prompt. When Krea is selected, override the generic prompt-length guidance with a concise 1-4 sentence delta instruction; name only the requested change and details that must remain fixed. Put the base scene/image first and an optional person/detail reference second. Z-image, Z-image Turbo, and base Krea 2 Turbo are generate_image img2img models, not edit_image selectors. If the user names another edit/image model, honor it. GPT Image 2 always processes input images at high fidelity; do not set input_fidelity. GPT Image 2.5 adds two distinct models: use \"gpt-image-2.5-sunburst\" for an explicit Sunburst request and \"gpt-image-2.5-flare\" for an explicit Flare request. For GPT Image 2.5 without a named variant, use Flare. Preserve explicit GPT Image 2.0 as \"gpt-image-2\". Sunburst is positioned for difficult images and precise edits; Flare for faster everyday generation. Both generate and edit. Model choice is independent of rendering quality."
529
+ "description": "The app auto-selects Fast→Qwen Lightning and HQ/Pro→full Qwen only for ordinary identity-neutral edits. REQUIRED IDENTITY DEFAULT: set \"krea-identity-edit\" whenever an edit of a referenced person or character must keep likeness or character identity while changing clothing, hair or makeup, pose or position, face/head/body, background, lighting, or visual style. Infer that semantic intent in any language; never route from keyword or regex matching. Also use it for a non-Pro single-character sheet. This default applies even when the user did not name Krea; an explicitly requested model always wins. Set \"dark-beast-krea2-identity-edit\" only when the user explicitly requests that model, its uncensored/community variant, or dark_beast_krea2_identity_edit_v1_2. Set \"gpt-image-2\" only when the user explicitly names legacy GPT Image 2 (GPT Image 2, GPT-2, or gpt-image-2); it is never a default. A ChatGPT, OpenAI, GPT, or GPT Image edit request that names no version uses \"gpt-image-2.5-flare\". Set \"gpt-image-2.5-sunburst\" when precise typography, dense labels, or a professional multi-panel layout is the primary requirement; Pro character sheets use Sunburst unless the user names another model. If GPT Image 2.5 Sunburst is unavailable for detail-critical layout work, fall back to full \"qwen\", never \"qwen-lightning\". Krea identity edit models require at least one reference image, accept up to two context images, and work best at 512-2048px. Set \"flux-3-klein\" when the user asks for FLUX 3 or FLUX 3 Image Klein; it accepts 1-10 reference images and works at 256-4096px, including 4K. For it, describe the whole result as a full scene caption that folds the requested change into a description of the reference, and refer to references in order (the first image, the second image); guidance is fixed and a negative prompt has no effect, so do not send one. Let the model tier and worker choose current steps, guidance, sampler, scheduler, grounding, and reference-boost defaults; do not send a negative prompt. When Krea is selected, override the generic prompt-length guidance with a concise 1-4 sentence delta instruction; name only the requested change and details that must remain fixed. Put the base scene/image first and an optional person/detail reference second. Z-image, Z-image Turbo, and base Krea 2 Turbo are generate_image img2img models, not edit_image selectors. If the user names another edit/image model, honor it. GPT Image 2 always processes input images at high fidelity; do not set input_fidelity. GPT Image 2.5 adds two distinct models: use \"gpt-image-2.5-sunburst\" for an explicit Sunburst request and \"gpt-image-2.5-flare\" for an explicit Flare request. For GPT Image 2.5 without a named variant, use Flare. Preserve explicit GPT Image 2.0 as \"gpt-image-2\". Sunburst is positioned for difficult images and precise edits; Flare for faster everyday generation. Both generate and edit. Model choice is independent of rendering quality."
528
530
  },
529
531
  "sourceImageIndex": {
530
532
  "type": "number",
@@ -538,11 +540,11 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
538
540
  },
539
541
  "width": {
540
542
  "type": "number",
541
- "description": "Output image width in pixels. Defaults to the context image width. Supported bounds depend on the selected edit model: Qwen edit models support 256-2560 on either edge; Krea 2 Identity Edit and Dark Beast Krea 2 Identity Edit work best from 512-2048 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., \"1280 wide\", \"1280x720\", \"720p\", \"3840x2160\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
543
+ "description": "Output image width in pixels. Defaults to the context image width. Supported bounds depend on the selected edit model: Qwen edit models support 256-2560 on either edge; FLUX 3 Image Klein supports 256-4096 on either edge, including 4K; Krea 2 Identity Edit and Dark Beast Krea 2 Identity Edit work best from 512-2048 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., \"1280 wide\", \"1280x720\", \"720p\", \"3840x2160\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
542
544
  },
543
545
  "height": {
544
546
  "type": "number",
545
- "description": "Output image height in pixels. Defaults to the context image height. Supported bounds depend on the selected edit model: Qwen edit models support 256-2560 on either edge; Krea 2 Identity Edit and Dark Beast Krea 2 Identity Edit work best from 512-2048 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., \"720 high\", \"1280x720\", \"720p\", \"2160x3840\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
547
+ "description": "Output image height in pixels. Defaults to the context image height. Supported bounds depend on the selected edit model: Qwen edit models support 256-2560 on either edge; FLUX 3 Image Klein supports 256-4096 on either edge, including 4K; Krea 2 Identity Edit and Dark Beast Krea 2 Identity Edit work best from 512-2048 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., \"720 high\", \"1280x720\", \"720p\", \"2160x3840\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
546
548
  },
547
549
  "aspectRatio": {
548
550
  "type": "string",
@@ -9,7 +9,11 @@ import {
9
9
  isSeedance25Model,
10
10
  isWan3Model
11
11
  } from '../Projects/utils/index.js';
12
- import { isKreaIdentityEditModel, isQwenImageEditModel } from '../lib/validation.js';
12
+ import {
13
+ isFlux3ImageKleinModel,
14
+ isKreaIdentityEditModel,
15
+ isQwenImageEditModel
16
+ } from '../lib/validation.js';
13
17
 
14
18
  export {
15
19
  calculateVideoFrames,
@@ -98,6 +102,7 @@ export const PREFERRED_MODEL_IDS = {
98
102
  chromaFlash: 'chroma-v.46-flash_fp8',
99
103
  zTurbo: 'z_image_turbo_bf16',
100
104
  krea2Turbo: 'krea2_turbo_fp8_scaled',
105
+ flux3ImageKlein: 'flux3_image_klein_sd_int8_convrot',
101
106
  krea2IdentityEdit: 'krea2_identity_edit_v1_2',
102
107
  darkBeastKrea2IdentityEdit: 'dark_beast_krea2_identity_edit_v1_2',
103
108
  rtxVsr: 'rtx_vsr_pro'
@@ -235,6 +240,15 @@ function normalizeSelectorKey(value: string): string {
235
240
  .replace(/[_\s]+/g, '-');
236
241
  }
237
242
 
243
+ // FLUX 3 Image Klein is one model for text-to-image, start-image and
244
+ // 1-10 reference edits, so generate_image and edit_image share its selectors.
245
+ const FLUX3_IMAGE_KLEIN_SELECTORS: Record<string, string> = {
246
+ 'flux-3-klein': PREFERRED_MODEL_IDS.image.flux3ImageKlein,
247
+ 'flux3-klein': PREFERRED_MODEL_IDS.image.flux3ImageKlein,
248
+ 'flux-3-image-klein': PREFERRED_MODEL_IDS.image.flux3ImageKlein,
249
+ 'flux3-image-klein': PREFERRED_MODEL_IDS.image.flux3ImageKlein
250
+ };
251
+
238
252
  const GPT_IMAGE_25_SELECTORS: Record<string, string> = {
239
253
  'gpt-image-2.5-sunburst': PREFERRED_MODEL_IDS.image.gptImage25Sunburst,
240
254
  'gpt-image-2.5-flare': PREFERRED_MODEL_IDS.image.gptImage25Flare,
@@ -252,6 +266,7 @@ const IMAGE_MODEL_SELECTORS: Record<string, string> = {
252
266
  'z-turbo': 'z_image_turbo_bf16',
253
267
  'krea-2-turbo': 'krea2_turbo_fp8_scaled',
254
268
  'krea2-turbo': 'krea2_turbo_fp8_scaled',
269
+ ...FLUX3_IMAGE_KLEIN_SELECTORS,
255
270
  'z-image': 'z_image_bf16',
256
271
  'chroma-v46-flash': 'chroma-v.46-flash_fp8',
257
272
  'chroma-detail': 'chroma-v48-detail-svd_fp8',
@@ -289,6 +304,7 @@ const EDIT_IMAGE_MODEL_SELECTORS: Record<string, string> = {
289
304
  ...GPT_IMAGE_25_SELECTORS,
290
305
  'qwen-lightning': 'qwen_image_edit_2511_fp8_lightning',
291
306
  qwen: 'qwen_image_edit_2511_fp8',
307
+ ...FLUX3_IMAGE_KLEIN_SELECTORS,
292
308
  'krea-2-identity-edit': PREFERRED_MODEL_IDS.image.krea2IdentityEdit,
293
309
  'krea2-identity-edit': PREFERRED_MODEL_IDS.image.krea2IdentityEdit,
294
310
  'krea-identity-edit': PREFERRED_MODEL_IDS.image.krea2IdentityEdit,
@@ -595,7 +611,8 @@ export function isEditImageModel(modelId: string): boolean {
595
611
  modelId === PREFERRED_MODEL_IDS.image.gptImage25Sunburst ||
596
612
  modelId === PREFERRED_MODEL_IDS.image.gptImage25Flare ||
597
613
  isQwenImageEditModel(modelId) ||
598
- isKreaIdentityEditModel(modelId)
614
+ isKreaIdentityEditModel(modelId) ||
615
+ isFlux3ImageKleinModel(modelId)
599
616
  );
600
617
  }
601
618
 
@@ -2406,7 +2406,7 @@ class ProjectsApi extends ApiGroup<ProjectApiEvents> {
2406
2406
  await this.uploadCNImage(project.id, data.controlNet.image);
2407
2407
  }
2408
2408
 
2409
- // Context images (GPT Image 2 supports up to 16; Qwen Image Edit supports up to 3; Krea 2 Identity Edit and legacy Flux Kontext support up to 2)
2409
+ // Context images (GPT Image 2 supports up to 16; FLUX 3 Image Klein up to 10; Qwen Image Edit supports up to 3; Krea 2 Identity Edit and legacy Flux Kontext support up to 2)
2410
2410
  if (data.contextImages?.length) {
2411
2411
  const maxContextImages = getMaxContextImages(data.modelId);
2412
2412
  if (data.contextImages.length > maxContextImages) {
@@ -105,6 +105,13 @@ export function isKreaIdentityEditModel(modelId: string): boolean {
105
105
  return KREA_IDENTITY_EDIT_MODEL_IDS.has(modelId);
106
106
  }
107
107
 
108
+ /** FLUX 3 Image Klein renders text-to-image, start-image and edits from 1-10 references. */
109
+ const FLUX3_IMAGE_KLEIN_MODEL_ID = 'flux3_image_klein_sd_int8_convrot';
110
+
111
+ export function isFlux3ImageKleinModel(modelId: string): boolean {
112
+ return modelId === FLUX3_IMAGE_KLEIN_MODEL_ID;
113
+ }
114
+
108
115
  const RTX_VSR_MAX_EDGE = 15360;
109
116
 
110
117
  interface ImageSizeValidationOptions {
@@ -122,6 +129,9 @@ function getCustomImageSizeBounds(modelId?: string): { min: number; max: number
122
129
  if (isGptImageModel(modelId)) {
123
130
  return { min: 256, max: 3840 };
124
131
  }
132
+ if (modelId && isFlux3ImageKleinModel(modelId)) {
133
+ return { min: 256, max: 4096 };
134
+ }
125
135
  if (modelId && EXTENDED_IMAGE_SIZE_MODEL_IDS.has(modelId)) {
126
136
  return { min: 256, max: 2560 };
127
137
  }
@@ -214,6 +224,7 @@ export function isComfyModel(modelId: string): boolean {
214
224
  'krea2_',
215
225
  'dark_beast_krea2_',
216
226
  'qwen_image_',
227
+ 'flux3_',
217
228
  'rtx_vsr_',
218
229
  'flashvsr_',
219
230
  'wan_',
@@ -227,6 +238,7 @@ export function isComfyModel(modelId: string): boolean {
227
238
  /**
228
239
  * Get the maximum number of context images supported by a model.
229
240
  * - GPT Image 2: 16 images
241
+ * - FLUX 3 Image Klein: 10 images (optional)
230
242
  * - Qwen Image Edit: 3 images
231
243
  * - Krea 2 Identity Edit: 2 images
232
244
  * - Legacy Flux Kontext matching: 2 images
@@ -236,6 +248,9 @@ export function getMaxContextImages(modelId: string): number {
236
248
  if (isGptImageModel(modelId)) {
237
249
  return 16;
238
250
  }
251
+ if (isFlux3ImageKleinModel(modelId)) {
252
+ return 10;
253
+ }
239
254
  if (QWEN_IMAGE_MODEL_IDS.has(modelId)) {
240
255
  return 3;
241
256
  }
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/generate-version.mjs — do not edit.
2
2
  // Source of truth: package.json version.
3
- export const LIB_VERSION = '5.63.4';
3
+ export const LIB_VERSION = '5.64.0';