Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(starter-models): limit the FLUX.2 bundle to ungated Apache 2.0 Klein 4B
Josh Corbettf8045e262a20
diff --git a/docs/src/content/docs/Users Guide/03.Models/Local Models/flux-2.mdx b/docs/src/content/docs/Users Guide/03.Models/Local Models/flux-2.mdxindex 88d48e8379..33269ce46a 100644--- a/docs/src/content/docs/Users Guide/03.Models/Local Models/flux-2.mdx+++ b/docs/src/content/docs/Users Guide/03.Models/Local Models/flux-2.mdx@@ -1,7 +1,7 @@---title: FLUX.2description: Generate and edit images with FLUX.2 Klein (4B and 9B, distilled and Base) and FLUX.2 [dev], including multi-reference image editing and the FLUX.2 [dev] Fun-ControlNet-Union.-lastUpdated: 2026-11-01+lastUpdated: 2026-11-02sidebar:order: 5---@@ -58,8 +58,11 @@ quantization](/configuration/optimization/sdnq-quantization/).## Installing-The **FLUX.2 Klein** bundle in the Model Manager is the quickest start. It installs *FLUX.2 Klein 4B (GGUF-Q4)* together with the FLUX.2 VAE and the Qwen3 4B encoder.+The **FLUX.2** bundle in the Model Manager is the quickest start. It installs *FLUX.2 Klein 4B (GGUF Q4)*+together with the FLUX.2 VAE and the Qwen3 4B encoder, about 11 GB. All three are Apache 2.0 and ungated, so+the bundle needs no HuggingFace token. Klein 9B and FLUX.2 [dev] (non-commercial, gated on Black Forest+Labs' repositories; see [License](#license)) and the [PiD decoders](#pid-super-resolution-decode)+(non-commercial / research weights) are separate starter models.A FLUX.2 model needs three components:diff --git a/invokeai/backend/model_manager/starter_models/__init__.py b/invokeai/backend/model_manager/starter_models/__init__.pyindex 1256c446d6..ea502cedfd 100644--- a/invokeai/backend/model_manager/starter_models/__init__.py+++ b/invokeai/backend/model_manager/starter_models/__init__.py@@ -727,17 +727,13 @@ zimage_bundle: list[StarterModel] = [flux_vae,]-# Klein 4B and 9B (each with its Qwen3 encoder), the PiD super-resolution decoder for their latents, and FLUX.2 [dev]-# at GGUF Q4 with its cow-mistral encoder. [dev] is non-commercial; the Klein models are not.+# Klein 4B only (~11 GB): it is Apache 2.0 and ungated, so one click needs no Hugging Face token and installs+# nothing non-commercial. Klein 9B and FLUX.2 [dev] (non-commercial, gated on BFL's repos) and the PiD decoder+# (non-commercial weights) stay available a la carte.flux2_bundle: list[StarterModel] = [flux2_klein_4b_gguf_q4,flux2_klein_qwen3_4b_encoder,- flux2_klein_9b_gguf_q4,- flux2_klein_qwen3_8b_encoder,flux2_vae,- pid_decoder_flux2_2k,- flux2_dev_gguf_q4_k_m,- flux2_dev_cow_mistral_q4,]# Turbo only: both checkpoints are 8B and the full pipeline is a large download, so the bundlediff --git a/tests/backend/model_manager/test_starter_models.py b/tests/backend/model_manager/test_starter_models.pyindex 1776ddb2e7..2750553328 100644--- a/tests/backend/model_manager/test_starter_models.py+++ b/tests/backend/model_manager/test_starter_models.py@@ -1,15 +1,17 @@-"""Tests for the Krea-2 and MiniMax H3 starter-model bundles and the LTX-2 GGUF transformers.+"""Tests for the starter-model bundles and the LTX-2 GGUF transformers.A single-file (nvfp4) or GGUF Krea-2 transformer ships *only* the transformer, so it is unusable without astandalone Qwen-Image VAE and Qwen3-VL text encoder. These tests assert that the Krea-2 launchpadbundle exists, exposes the diffusers, GGUF and nvfp4 options, and that each transformer-only entry declares the-two standalone dependencies so installing it also pulls the pieces needed to run it.+two standalone dependencies so installing it also pulls the pieces needed to run it. The FLUX.2 bundle installs from+one click on the Launchpad, so it must stay free of gated or non-commercial weights and still run on its own."""from invokeai.backend.model_manager.starter_models import (STARTER_BUNDLES,STARTER_MODELS,StarterModel,+ StarterModelWithoutDependencies,)from invokeai.backend.model_manager.taxonomy import (BaseModelType,@@ -20,6 +22,42 @@ from invokeai.backend.model_manager.taxonomy import ()+def _hf_repo(source: str) -> str:+ """The Hugging Face repo a starter source downloads from: `org/repo`, `org/repo::subpath` or a resolve URL."""+ hf_url_prefix = "https://huggingface.co/"+ if source.startswith(hf_url_prefix):+ return "/".join(source.removeprefix(hf_url_prefix).split("/")[:2])+ return source.split("::")[0]+++def _flux2_bundle_installs() -> list[StarterModelWithoutDependencies]:+ """Everything installing the FLUX.2 bundle downloads: its members and each member's dependencies."""+ installs: list[StarterModelWithoutDependencies] = []+ for model in STARTER_BUNDLES[BaseModelType.Flux2].models:+ installs.append(model)+ installs.extend(model.dependencies or [])+ return installs+++def test_flux2_bundle_installs_nothing_gated_or_non_commercial() -> None:+ # Deliberately strict: Klein 4B is the only Apache 2.0, ungated FLUX.2 model, so anything else added to the+ # bundle needs a license review before this allow-list grows.+ offending = [m.name for m in _flux2_bundle_installs() if "klein-4b" not in _hf_repo(m.source).lower()]+ assert offending == [], f"FLUX.2 bundle installs models from outside the Klein 4B repositories: {offending}"+++def test_flux2_bundle_runs_klein_4b_on_its_own() -> None:+ installs = _flux2_bundle_installs()++ assert any(+ m.type is ModelType.Main and m.base is BaseModelType.Flux2 and "klein-4b" in m.source.lower() for m in installs+ )+ assert any(m.type is ModelType.VAE and m.base is BaseModelType.Flux2 for m in installs)+ assert "black-forest-labs/FLUX.2-klein-4B::text_encoder+tokenizer" in {+ m.source for m in installs if m.type is ModelType.Qwen3Encoder+ }++def _krea2_bundle_by_source() -> dict[str, StarterModel]:bundle = STARTER_BUNDLES[BaseModelType.Krea2]return {model.source: model for model in bundle.models}