Skip to content

studio: FLUX3-K picture models (FLUX 3 Image Klein) beside Qwen 2.1 Turbo - #943

Open
drowzeys wants to merge 4 commits into
ashhart:mainfrom
drowzeys:upstream/studio-flux3k
Open

drowzeys wants to merge 4 commits into
ashhart:mainfrom
drowzeys:upstream/studio-flux3k

Conversation

@drowzeys

Copy link
Copy Markdown
Contributor

Stacked on #942 (upstream/studio-previs), which is stacked on #941; merge after both.
Commits of this PR only: drowzeys/TensorFold@upstream/studio-previs...upstream/studio-flux3k (one commit).

The Studio now makes its pictures with Black Forest Labs' FLUX 3 Image Klein as well as Qwen-Image-2.1-Turbo, on both machines. A person picks the picture model for an image, the scouts a clip starts from, a last frame, and a picture edit with up to nine further references. Qwen 2.1 Turbo stays the default.

Measured at 1344x768 with the model loaded, bf16, one run each (studio/docs/flux3-k.md):

One picture DGX Spark (GB10, 128 GB), ComfyUI Mac Studio M5 Ultra, 256 GB, flux3-mlx
Qwen 2.1 Turbo (8 steps) 9.5 s 9.7 s
FLUX3-K Fast (distilled, 16 steps) 10.3 to 10.7 s (diffusers took 15.5 s for the same picture) 14.9 s
FLUX3-K Full (base, 50 steps, CFG 3.5) 57.5 s 53.6 s
BFL's prompt upsampler, once per prompt about 18 s (8-bit) about 5 s (8-bit MLX)
An edit, seed 7, upsampler included Qwen FLUX3-K Fast FLUX3-K Full
One picture, DGX Spark 24 s 37 s 139 s
One picture, Mac 10 s 37 s 240 s
Two pictures (a person from one put in the other), DGX Spark 23 s 44 s 188 s
Two pictures, Mac 13 s 42 s 427 s
  • Quality, against Qwen on the same six prompts and two seeds: FLUX3-K spelled a poster's title and tagline right where Qwen wrote "SOME ONE IS STOLL LISTENNING", drew whole figures for character sheets where Qwen cut them at the waist, kept two characters recognisable in a two-reference shot, and followed "switch the neon off" in an edit where Qwen left the signs lit. Fast looked as good as Full.
  • Memory: on a DGX Spark FLUX3-K runs inside ComfyUI's own FLUX 3 nodes (upsampler included), so every picture stays under the Studio's memory guard; on a Mac it runs in an environment of its own, never in the Studio's.

Why it matters for TensorFold: a second image family in the same app, chosen per job, with the result feeding TensorFold's video engine as a first frame, a last frame or a reference.

What it adds

  • studio/app/picture_models.py: FLUX3-K Fast and Full join Qwen 2.1 Turbo in IMAGE_MODELS, offered only where installed (their ComfyUI files on a Spark, flux3-mlx and BFL's checkpoints on a Mac).
  • studio/app/picture_edit.py and static/edit.js: the model choice in Edit a picture; image LoRAs, the camera ring and Qwen's 40-step base model stay Qwen's, and a FLUX3-K edit refuses them.
  • Page: the picture-model wording in create.js and tutorial.js (the chooser itself is in the base PR and shows once a second model is installed).
  • Mac: flux3_generate.py and flux3_edit.py on flux3-mlx; scripts/setup-flux3.sh (oneshot-setup.sh --flux3); IMAGE_MODEL=flux3k-fast|flux3k-full in scripts/image.sh and scripts/edit.sh.
  • DGX Spark: spark/flux3_workflows.py, the FLUX3-K ComfyUI workflows (text to image with TextGenerate running BFL's upsampler with their settings; the edit with ReferenceMultiLatent and the upsampler's i2i prompt), dispatched from spark_generate.py and spark_edit.py; oneshot-setup-spark.sh --flux3 (41 GB).
  • Tests: tests/test_image_models.py, six tests: only installed models are offered and asked for; an edit goes to the picked model (and a FLUX3-K edit refuses Qwen's LoRAs, angles and base model); the ComfyUI workflows FLUX3-K becomes on a Spark, text to image and edit, follow BFL's layout; the upsampler is shown the pictures on one canvas; an unknown model is refused by the script.
  • Docs and notices: docs/flux3-k.md, the README's Image only and Edit a picture parts, NOTICE, CREDITS.md, AGENTS.md.

How it relates to the engine and to app/

FLUX3-K does not run on TensorFold yet: on a Spark it is ComfyUI's FLUX 3 implementation, on a Mac felix-ab's flux3-mlx. It sits behind the same IMAGE_MODEL switch as Qwen, so a TensorFold FLUX 3 family can take its place with no change to the app or the page. In the desktop app it is part of the embedded Studio (see #941).

Tests

Passed Failed Skipped
DGX Spark (GB10, 128 GB) 115 3 0
Mac Studio M5 Ultra, 256 GB 108 10 0

The six new tests pass on both; the failures are the same environment ones as in #941.

Lean check

python3 tools/zig/lean_check.py: 1941 files, 517 problems, unchanged (zig/ and tools/zig/ only). Over studio/ with the same rules: 21 findings, one more than #942: "text_encoder/*" in the Python inside setup-flux3.sh, a glob the checker reads as a block comment.

Not tested

  • Renders through the split tree (the measurements above are from the Studio's 2.8.0 code before the split; the moved FLUX3-K functions are AST-identical).
  • More than two seeds per prompt in the comparison; the same seed draws a different picture on the two machines (the runtimes draw their noise differently).
  • FLUX3-K on Macs other than the M5 Ultra, or under 96 GB.

What comes next

  • A TensorFold FLUX 3 family behind the same switch, measured against ComfyUI and flux3-mlx on the same prompts.

Licences

  • FLUX 3 Image Klein is under the FLUX Kommunity License (Black Forest Labs): non-commercial use, and commercial use of the outputs only for Qualifying Users (under US$5M annual revenue). No FLUX 3 weights ship: the install downloads them from Black Forest Labs' gated Hugging Face repositories after the user accepts the licence.
  • flux3-mlx (felix-ab) is Apache-2.0 and installed in its own environment; ComfyUI (GPL-3.0) runs as a separate program. Qwen-Image-2.1 stays under the Qwen Research License (non-commercial).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PfjmufXm4L7qsVNFyRw9ZK

A web app (FastAPI and plain JS pages) that queues picture and video jobs on a Mac (Metal) or a DGX Spark (CUDA):
Qwen 2.1 Turbo pictures and edits, MiniMax H3 and FastH3 clips with sound, reference pictures, videos and audio,
long chains, the Production board and Editor, the Wasserman Slate workflow (a port of Sam Wasserman's Slate), the
LoRA hub, Library actions, the QA gate and shot check, the memory guard and multi-Spark rendering. The render
scripts under scripts/ and spark/ drive TensorFold's H3 and Qwen-Image families; tests run without a GPU.
Install and use, measured receipts, the agent rules, the credits of every author the Studio builds on, and the
licence notices; no model weights ship with the Studio.
…Previs Studio

The tab takes a shot apart (camera move in words, pose and OpenPose skeleton, depth, edges, line art, motion mask)
in its own environment, and hands one layer to the create wizard as <Video 1> of a MiniMax H3 reference clip, with
the control-video prompt, the pace rules (Impacts, Flow, Automatic) and the measured sound-and-movement flag.
Motion Previs Studio is Copyright 2026 Sam Wasserman, Apache-2.0; its NOTICE, the third-party notices and the file
headers are kept.
…urbo

FLUX3-K Fast (distilled, 16 steps) and Full (base, 50 steps) as picture models for images, scouts, last frames and
picture edits with up to nine further references. On a DGX Spark they run inside ComfyUI's FLUX 3 workflow under the
memory guard, on a Mac on flux3-mlx in an environment of their own; BFL's prompt upsampler writes the caption first.
FLUX Kommunity License; no weights ship.
@drowzeys
drowzeys force-pushed the upstream/studio-flux3k branch from 4832943 to e2b4293 Compare October 17, 2026 01:30
@ashhart

ashhart commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thanks @drowzeys for the image-model chooser and the Fast render measurements of 10.3 to 10.7 seconds and 14.9 seconds. Your separation of installed models and refusal of unsupported edit options is useful for the app's design. As in #941, we're building the media workspace in TensorFold's app itself, with credit for these ideas as its stages land. We'll close #943 with its corresponding stage. The supplied FLUX renders use other runtimes, so they do not establish a native TensorFold FLUX family. This follows the app's release schedule; no FLUX feature is promised for the 1.1.0 engine release. No further changes are requested on this PR.

Posted by Ash's AI Assistant Synthena

@ashhart

ashhart commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Thank you. Our plan for the whole Studio stack is in #941: we're folding it into the TensorFold app with your authorship kept. We'll keep this open and link the pieces here as they land.

- Synthema, Ash's AI Assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants