Skip to content

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.

feat(working-memory): reserve FLUX.3 denoise working memory from measured lines (#10084)

Alexander Eichhornbf42c77b8b0f
diff --git a/docs/src/content/docs/contributing/new-model-integration.mdx b/docs/src/content/docs/contributing/new-model-integration.mdx
index 6d9854e3ce..c398394b89 100644
--- a/docs/src/content/docs/contributing/new-model-integration.mdx
+++ b/docs/src/content/docs/contributing/new-model-integration.mdx
@@ -605,7 +605,7 @@ Packages are discovered automatically. A directory of node modules without an `_
...
```
- Report progress with `context.util.sd_step_callback(state, BaseModelType.NewModel)`; it renders previews through the architecture's `LatentSpaceFacet`. The denoise node is also where these are checked: interrupts (`context.util.is_canceled()`), inpainting, img2img through `denoising_start`, and a working-memory estimate passed to `model_on_device()`: `working_memory=` from an estimator that declares an `EstimatorSpec`, so that calibration runs measure the forward (the Z-Image denoise's is in `invokeai/backend/z_image/denoise_working_memory.py`, MOSS-Image's in `invokeai/backend/moss_image/working_memory.py`), or `working_mem_bytes=<int>` for a plain reservation. A model locked while the transformer is, such as a ControlNet adapter, reserves the estimate's `reservation_bytes` with `working_mem_bytes=`. See the VAE step below and the [model manager](/development/architecture/model-manager/).
+ Report progress with `context.util.sd_step_callback(state, BaseModelType.NewModel)`; it renders previews through the architecture's `LatentSpaceFacet`. The denoise node is also where these are checked: interrupts (`context.util.is_canceled()`), inpainting, img2img through `denoising_start`, and a working-memory estimate passed to `model_on_device()`: `working_memory=` from an estimator that declares an `EstimatorSpec`, so that calibration runs measure the forward (the Z-Image denoise's is in `invokeai/backend/z_image/denoise_working_memory.py`, FLUX.3's in `invokeai/backend/flux3/denoise_working_memory.py`, MOSS-Image's in `invokeai/backend/moss_image/working_memory.py`), or `working_mem_bytes=<int>` for a plain reservation. A model locked while the transformer is, such as a ControlNet adapter, reserves the estimate's `reservation_bytes` with `working_mem_bytes=`. See the VAE step below and the [model manager](/development/architecture/model-manager/).
4. **VAE encode and decode** (`vae/new_model_image_to_latents.py`, `vae/new_model_latents_to_image.py`)
diff --git a/docs/src/content/docs/development/Architecture/model-manager.mdx b/docs/src/content/docs/development/Architecture/model-manager.mdx
index b72fb5f252..bb9ec0b11e 100644
--- a/docs/src/content/docs/development/Architecture/model-manager.mdx
+++ b/docs/src/content/docs/development/Architecture/model-manager.mdx
@@ -1053,12 +1053,12 @@ with vae_info.model_on_device(working_memory=estimate) as (_, vae):
An estimator that declares an `EstimatorSpec` returns a `WorkingMemoryEstimate` (`invokeai/backend/working_memory/estimate.py`): the reservation, the terms it adds up to, the features it was evaluated from, and the source of its coefficients, which `model_on_device()` logs at debug level. A plain byte count goes in as `working_mem_bytes=<int>` instead; never both. The cache never reserves less than `device_working_mem_gb`.
-To write such an estimator (`invokeai/backend/util/vae_working_memory.py` has five for the VAEs, `invokeai/backend/z_image/denoise_working_memory.py`, `invokeai/backend/flux2/denoise_working_memory.py` and `invokeai/backend/moss_image/working_memory.py` one each for a transformer forward, the Z-Image, the FLUX.2 and the MOSS-Image denoise's):
+To write such an estimator (`invokeai/backend/util/vae_working_memory.py` has five for the VAEs, `invokeai/backend/z_image/denoise_working_memory.py`, `invokeai/backend/flux2/denoise_working_memory.py`, `invokeai/backend/flux3/denoise_working_memory.py` and `invokeai/backend/moss_image/working_memory.py` one each for a transformer forward, the Z-Image, the FLUX.2, the FLUX.3 and the MOSS-Image denoise's):
- Register an `EstimatorSpec` at module import, and list the module in `ESTIMATOR_MODULES` (`working_memory/spec.py`); the data test fails on a module that declares a spec without being listed.
- Split the estimator in two. The impure part reads the model and the device and records every runtime decision (tile, the dtype the operation runs in, score-matrix bytes, a quantized model's dequantization transient) as a feature, and refuses a dtype the spec has no line for with a `ValueError` naming the estimator, dtype and platform. The pure `terms(features, values)` turns features and coefficient values into terms, building fitted terms with `WorkingMemoryTerm.fitted(...)`. The public function returns `SPEC.estimate(features, device)`.
- Record the dtype the operation will run in, not the one the cached model holds. The SD1/SDXL nodes cast the shared VAE with `sd_vae_run_dtype`: fp16 for every GPU run that does not ask for fp32 (bf16 never runs), fp32 when asked and for a CPU decode. Their estimate prices the same function's answer, plus what the in-place cast adds to the resident weights. Uncast VAEs compute in their first floating-point parameter wider than a byte, so fp8 or packed SDNQ storage does not count.
-- Declare the line the fitted terms price on with `line=` (a function returning a `fit.Line`): the suffix that names the line's coefficients, the operation's size on its x-axis, whether a measurement of these features fits the line, and how point ids label them. Every estimator declares it and nothing defaults it, so a new estimator cannot inherit another's line, and with it which of its measurements fit. The VAE estimators declare the AutoencoderKL convolution line in output pixels (`fit.convolution_line`), the Z-Image and FLUX.2 denoise ones in attended tokens. The fit subtracts nothing from a point's demand, so a line admits only measurements whose demand is the line's alone: an operation with a term of its own on top of the line (a tile, an in-place upcast, a ControlNet's hints, regional prompting's bias, LoRAs, a dequantization or fp8 cast transient, a materialized score matrix the estimate adds rather than takes the larger of) bounds its estimate but fits nothing.
+- Declare the line the fitted terms price on with `line=` (a function returning a `fit.Line`): the suffix that names the line's coefficients, the operation's size on its x-axis, whether a measurement of these features fits the line, and how point ids label them. Every estimator declares it and nothing defaults it, so a new estimator cannot inherit another's line, and with it which of its measurements fit. The VAE estimators declare the AutoencoderKL convolution line in output pixels (`fit.convolution_line`), the Z-Image, FLUX.2 and FLUX.3 denoise ones in attended tokens. The fit subtracts nothing from a point's demand, so a line admits only measurements whose demand is the line's alone: an operation with a term of its own on top of the line (a tile, an in-place upcast, a ControlNet's hints, regional prompting's bias, LoRAs, a dequantization or fp8 cast transient, a materialized score matrix the estimate adds rather than takes the larger of) bounds its estimate but fits nothing.
- Opt in with `user_calibrated=True` where a user's calibration may move the estimator: the five VAE estimators do. An estimator that does not is shipped-fit only; a calibration run still records its windows. The calibration summary and plan are built on pixel lines (they key sizes by `width` and `height`), so an estimator on another line, such as the Z-Image denoise's in tokens, must not opt in until they key sizes by `Line.size`.
- Bump `version` whenever `terms` changes the formula.
- Key the spec by the platform traits its fitted terms depend on (`platform_keys`; the VAE estimators use `conv_backend` and `allocator`), and ship one coefficient entry per measured platform in `invokeai/backend/working_memory/data/`, either with its own `values` or with `values_from` another estimator's entry, which may carry more values than the borrower reads.
@@ -1067,7 +1067,7 @@ To write such an estimator (`invokeai/backend/util/vae_working_memory.py` has fi
- An entry applies to the OS only when its platform names one, and then takes precedence there over the one that does not. Only MIOpen names one. With the native allocator, Windows demand is concave and up to 1.6x Linux's, so Windows has its own fit and every other OS keeps the Linux one. Expandable segments are measured on Windows only, where they are Invoke's ROCm default, so `MEASURED` lists them for Windows and every other OS prices them as the native allocator there. cuDNN is priced the same on every OS.
- A spec whose fitted terms no platform trait moves declares `platform_keys=()` and ships one entry with an empty `platform`, read alike on every platform, measured or not, never priced as another or floored; its estimate's `source` names it `any platform`, and its points name no platform. MOSS-Image's denoise estimator does this: its fitted term is GEMM and fused-attention activations, not convolution workspaces, and a backend without a fused SDPA kernel is priced by the analytic score-matrix term.
- Ship the measured points next to them. A point's `method` says how it was read: one fresh process per point for `reserved_peak` (the allocator's peak reserved bytes), `driver_peak` (the driver-level device usage), and `demand_peak` (the largest of driver-level, reserved and allocated peak, over two runs, which catches the memory HIP maps beyond the allocator on a process's first operation); `device_peak`, the drop in the driver's free memory (`torch.cuda.mem_get_info`, polled during the operation) below its value just before it, which also counts what is allocated around the allocator's reserve; or `probe_demand`, the probe's `demand_bytes`, the largest over the valid, fit-eligible windows of calibration runs in a running server. `scripts/working_memory/build_shipped.py` builds `probe_demand` points from calibration store exports, takes fresh-process points from the point files a calibration script writes (`--points`), and refits the values (see the Family E2E guide). A point names the OS only where it measured an OS-specific entry. `working_memory/bounds.py` holds the rule the data test (`tests/backend/working_memory/`) and the builder apply: each estimate is at least its point, and where a fitted term decides an in-fit point, at most 1.3 times the point, its ratio in `bounds.UPPER_BOUND_EXCEPTIONS` (points no line can hold within 1.3x), or the point's tighter `max_ratio`. A `probe_demand` point is a lower bound only (`MeasuredPoint.holds_upper_bound`) and takes no `max_ratio`: a warm window in a running server reads below the cold first run after a server start, the worst case a reservation must cover. It may raise a line; only the fresh-process points cap one. The `device_working_mem_gb` floor counts only where an analytic term decides.
-- Fit the values, never hand-tune them. Fitted terms price a line per operation and dtype: `k_<suffix>` bytes per unit of the line's size plus a base of `b_<suffix>` bytes. The AutoencoderKL estimators price their convolutions on lines in output pixels (`k_<operation>_<dtype>`), the Z-Image denoise its forward on lines in attended tokens (`k_denoise_<dtype>`), the FLUX.2 denoise its forward on one such line per dtype and transformer width (`k_denoise_<dtype>_h<width>`).
+- Fit the values, never hand-tune them. Fitted terms price a line per operation and dtype: `k_<suffix>` bytes per unit of the line's size plus a base of `b_<suffix>` bytes. The AutoencoderKL estimators price their convolutions on lines in output pixels (`k_<operation>_<dtype>`), the Z-Image denoise its forward on lines in attended tokens (`k_denoise_<dtype>`), the FLUX.2 and FLUX.3 denoise their forwards on one such line per dtype and transformer width (`k_denoise_<dtype>_h<width>`).
- `working_memory/fit.py` fits each line on the in-fit points its estimators' `line` admits, of every estimator that resolves to the entry: for the convolution lines the untiled single-sample points, leaving out those whose VAE an in-place cast grew (`upcast_weight_bytes`, a term of its own). The fit of the points that hold an upper bound (the fresh-process ones) is the edge of their upper convex hull (with the origin, so the base is never negative) that over-reserves least, rated on the highest reading per size, the steeper on a tie and never a falling one. It needs at least two sizes twice apart. The shipped values add a 5% margin and round up: the slope to a whole byte per unit of size, the base to a whole MiB. A `probe_demand` point is covered by the line and can raise it, but takes no part in that fit.
- A point whose demand is not its line's alone sets `in_fit: false`: it fits nothing and gets only the lower bound. That is a point measured in a regime its platform does not run (CUDA with the math attention kernel forced), and a fit-grid forward whose features its estimator's `line` does not admit, such as one whose build materializes the score matrix. The test lists every such point.
- A line is fitted only once its in-fit fresh-process points alone span two sizes twice apart (`fit.capping_spans`); `fitted_values` refuses any other line. The shipped pair is the fresh-process fit where it covers every other point of the line by the 5% margin. Where it does not, `fit.raised_pair` raises it by the least the upper bounds allow: of the lines at or above it, per coefficient, that cover every point by 5% and keep the upper bound of every point priced on the line (`bounds.line_bounds`, in the line's units: tiled, batched and upcast VAE operations and denoise forwards with an analytic term included, though their line admits them to no fit, read where the line decides their estimate), the one whose reservation averaged over the fresh-process sizes is smallest, the steeper on a tie. The candidates are the lines that ship, a whole byte of slope per unit of size and a whole MiB of base, checked against the conditions exactly, with no allowance. Each condition is a half-plane in slope and base, so the lines that keep them all form a convex region: the search scans each whole MiB of base across that region, taking the lowest whole slope the conditions leave at it, which finds the lowest rounded line or proves there is none (some milliseconds per line on the shipped data). Where no rounded line satisfies them all, also where only a line between whole bytes or MiB would, it refuses with `fit.LineConflict`, naming the probe and the bounds that conflict (each bound by its point's id, measured bytes and the most it allows, since two points can share an id), or saying that the floor itself already breaks a bound. The data then conflicts with the bounds: `build_shipped.py` prints the changes it would make, writes nothing and exits 1, as for a result the bounds reject; it exits 2 only for input it cannot use. A `probe_demand` point thus lowers neither the slope nor the base, and since probe sizes do not enter the average, a probe the shipped line already covers leaves it where it is.
@@ -1085,6 +1085,12 @@ To write such an estimator (`invokeai/backend/util/vae_working_memory.py` has fi
- Two analytic terms price what no fit point measures. Every point is a fully resident model, but the cache may load the transformer partially, and then copies each RAM-held layer to the device for its forward, alive beside the activations: the estimate reserves the largest layer as stored, read off the transformer (the largest module's own parameters and buffers, `calc_tensor_size`): in bf16 the single-stream blocks' fused projection of `9 × width²` elements, 679,477,248 bytes for [dev]; for an fp8-stored or GGUF build its float8 or quantized bytes, whose widened copy the fp8 cast and dequantization terms already price. A real [dev] in bf16 with 15.0 of 64.4 GB resident on the RTX 4090 (native allocator) demanded 5509 MB at 8704 tokens (1024 px with one 1024 px reference), 5459 MB at 8612 (1440 px) and 3305 MB at 4608 (1024 px), 535, 518 and 719 MB above the resident 2-block points; the line alone covers 0.96, 0.96 and 0.85 times that, with this term 1.08, 1.08 and 1.05 times. It is charged on every forward, because whether the lock loads the model whole is decided after, and from, the estimate; the calibration script passes `weights_resident=True` for its resident models. With a regional mask, the forward runs on CUDA's memory-efficient kernel, which materializes the bias again in a layout of its own: on top of the `S × S` bias the estimate reserves one copy per sample with its last dimension padded to a multiple of 8. On the RTX 4090 a 2-block Klein 9B-width forward at 1440 px with two 512-token regional captions (S = 9124, a 166.5 MB bias) took 158 MB more of the driver's figure and 168 MB more reserved than the unmasked one, about one bias-sized transient.
- CUDA on Linux prices with the RTX 4090's Windows-measured lines without the unmeasured floor, by judgement rather than measurement: the activations come from the same allocator and kernels on both systems, and the Windows driver model maps more per allocation if anything.
- `denoise.flux2` is not `user_calibrated`.
+- The FLUX.3 denoise (`denoise.flux3`, `data/denoise.json`) prices its activations as `k_denoise_<dtype>_h<width>` bytes per attended token and sample plus a base of `b_denoise_<dtype>_h<width>`, a line per dtype (bf16, fp16, fp32: the node runs the dtype `TorchDevice.choose_bfloat16_safe_dtype` picks) and transformer width, read off the transformer. Every released checkpoint is 3072 wide: Klein and Klein Base differ only by Klein's target-timestep embedder and price on one line. The attended tokens are the joint blocks' sequence: the caption's, padded to a multiple of 80, the image's at 1/16 of each side and every reference image's, and the line's size is those times the batch; Klein Base's CFG passes run one after the other, so only the longer caption counts.
+ - The lines are fitted on fresh-process points of `scripts/calibrate_flux3_denoise_working_memory.py` (bf16, fp16 and fp32 from 512 to 2048 px with a 560-token caption, 1024 and 1440 px with an 80-token one, at 1024 px one, three and (bf16, fp16) ten 1024 px references, a batch of two and Klein Base, and in bf16 long sequences up to 2048 px with ten references, 57904 tokens, on a random-init transformer of the loader's geometry with 2 per-mode blocks per stream and 2 joint blocks): an RTX 4090 with the native allocator and with `cudaMallocAsync`, an RX 9060 XT under ROCm 10 with AOTriton's fused kernels, with expandable segments and with the native allocator on Windows, and a Radeon Pro W7900 under ROCm 10 on Linux with the native allocator. The RX 9060 XT does not fit the ten-reference forwards in 16 GB, so its lines are measured up to 33328 tokens. Plain forwards take 0.289 MiB per token in bf16 and fp16 on the RTX 4090 under the native allocator (0.184 under `cudaMallocAsync`), 0.291 on the RX 9060 XT and the W7900 under the native allocator (0.167 on the RX 9060 XT with expandable segments), and 0.33 to 0.48 in fp32. Reference images cost up to 8% more per token under the native allocator and up to 17% more with expandable segments, and the fit is the upper envelope of every point, so the reference forwards decide most lines: the RTX 4090's native bf16 line is 0.328 MiB per token with no base, 1.05x its ten-reference forward. Five RTX 4090 forwards without references, one of them a batch of two, sit just above 1.3x under their lines and are listed in `bounds.UPPER_BOUND_EXCEPTIONS`. From 26160 to 57904 tokens the bf16 lines reserve 1.05 to 1.18x each long forward. Klein Base demanded what Klein does (32 MiB more under `cudaMallocAsync`), and 4 blocks per stream the same as 2 on the RTX 4090 and the W7900 and 4.2% more on the RX 9060 XT. A forced math kernel measured 13.69 bytes per score element over the default kernel on the RTX 4090, against the 17 the score term charges; on ROCm, where the SDPA guard computes it in chunks and the term charges one 1 GiB chunk, it took 129 MiB more on the RX 9060 XT and 122 MiB less on the W7900. The released Klein in bf16, fully resident (`--mode real`, at 1024 and 2048 px and at 1024 px with one and three references), demanded exactly what the 2-block points of the same tokens do on the RTX 4090, and the same or up to 21 MiB less on the W7900; on the RX 9060 XT (expandable segments) 6 to 8% more at the short sequences, shrinking to 0.6% with three references, a near-constant 20 to 180 MiB for its extra depth. Fully resident the estimate reserves 1.07 to 1.15x those forwards on the RTX 4090, 1.04 to 1.16x on the RX 9060 XT and 1.05 to 1.13x on the W7900, 1.08 to 1.24x with the streamed layer the node adds. They ship as out-of-fit points, which hold every refit to the released model from below.
+ - Every platform nothing measures prices as a measured one, and the entries it borrows, each with the native allocator (cuDNN; MIOpen on Windows; MIOpen on every other OS, the W7900's), floor every value at the legacy constants the node reserved by hand, 0.33 MiB per token and sample truncated to 346030 bytes and a 1 GiB base for every dtype, which `tests/app/invocations/test_flux3_denoise_working_memory.py` holds every unmeasured platform to at least. They lie above every measured bf16 and fp16 line at any size a card holds: the W7900's, 0.1% steeper, meets them only at 2.9 million tokens, 932 GiB.
+ - Two judgements, not measurements, extend an entry past the card it was measured on. CUDA on Linux reuses the RTX 4090's lines without the floor, as for FLUX.2. ROCm with the native allocator on every OS but Windows prices every card with the W7900's lines, because two generations on two systems measured close: at every shape both measured, the RX 9060 XT (gfx1200, Windows) demanded 35 to 45 MiB more than the W7900 (gfx1100, Linux) in bf16 and 74 to 84 MiB more in fp16, on the same 0.291 MiB per token, and 290 to 454 MiB less in fp32. A ROCm card without a fused kernel for these shapes prices the score matrix on top, capped at the 1 GiB chunk the SDPA guard computes math attention in.
+ - The line admits the plain forward, reference images, batches and Klein Base included. Its analytic terms are the largest layer partial loading streams (in bf16 the 20480 x 3072 caption embedder, 125,829,120 bytes; zero for the calibration script's resident models), a materialized score matrix, and a GGUF build's dequantization or an fp8-stored build's cast transient; a forward with any of them bounds its estimate but fits nothing. The node has no LoRA, regional prompting or ControlNet path, so the estimate has no term for them.
+ - `denoise.flux3` is not `user_calibrated`.
#### Measuring estimates: the probe
diff --git a/invokeai/app/invocations/flux3/flux3_denoise.py b/invokeai/app/invocations/flux3/flux3_denoise.py
index ea9ee324cf..1f66f2434b 100644
--- a/invokeai/app/invocations/flux3/flux3_denoise.py
+++ b/invokeai/app/invocations/flux3/flux3_denoise.py
@@ -22,6 +22,7 @@ from invokeai.backend.flux.sampling_utils import clip_timestep_schedule_fraction
from invokeai.backend.flux2.latent_norm import bn_denormalize, bn_normalize, read_vae_bn_stats
from invokeai.backend.flux2.sampling_utils import pack_flux2, unpack_flux2
from invokeai.backend.flux3.denoise import denoise
+from invokeai.backend.flux3.denoise_working_memory import estimate_flux3_denoise_working_memory
from invokeai.backend.flux3.ref_images import FLUX3_MAX_REFERENCE_IMAGES, encode_flux3_references
from invokeai.backend.flux3.sampling import (
get_noise_flux3,
@@ -31,20 +32,11 @@ from invokeai.backend.flux3.sampling import (
text_position_ids,
)
from invokeai.backend.model_manager.taxonomy import BaseModelType, Flux3VariantType, ModelType
-from invokeai.backend.quantization.dequantizing_linear import peak_dequant_transient_bytes
from invokeai.backend.rectified_flow.rectified_flow_inpaint_extension import RectifiedFlowInpaintExtension
from invokeai.backend.stable_diffusion.diffusers_pipeline import PipelineIntermediateState
from invokeai.backend.stable_diffusion.diffusion.conditioning_data import Flux3ConditioningInfo
-from invokeai.backend.util.attention import sdpa_score_matrix_bytes
from invokeai.backend.util.devices import TorchDevice
-FLUX3_ATTENTION_HEAD_DIM = 128
-FLUX3_ATTENTION_HEADS = 24
-# Peak activation bytes per attended token (image + reference + text) in bf16, at driver level: one Klein forward
-# on an RTX 4090 measured 0.286 MB/token from 1 to 4 MP without references and up to 0.320 with six 1 MP
-# references (the allocator peak is about half of that). ROCm is unmeasured; FLUX.2 Klein 4B ran ~8 % higher there.
-FLUX3_BYTES_PER_TOKEN = int(0.33 * 1024**2)
-
@invocation(
"flux3_denoise",
@@ -211,22 +203,23 @@ class Flux3DenoiseInvocation(BaseInvocation):
ref_tokens = ref_tokens.expand(batch_size, -1, -1) if ref_tokens is not None else None
packed_h, packed_w = self.height // 16, self.width // 16
- working_memory = self._estimate_working_memory(
- num_tokens=packed_h * packed_w
- + (ref_tokens.shape[1] if ref_tokens is not None else 0)
- + max(txt.shape[1], neg_txt.shape[1] if neg_txt is not None else 0),
- batch_size=batch_size,
- device=device,
- dtype=compute_dtype,
- )
-
with ExitStack() as exit_stack:
transformer_info = context.models.load(self.transformer.transformer)
- # A GGUF build dequantizes each linear per forward, a transient its resident size does not cover.
- dequant_bytes = peak_dequant_transient_bytes(transformer_info.model, compute_dtype)
- (_, transformer) = exit_stack.enter_context(
- transformer_info.model_on_device(working_mem_bytes=working_memory + dequant_bytes)
+ # Ask the model cache to keep free what one transformer forward needs. Reference images are the dominant
+ # term: their tokens join the attended sequence, so ten 1 MP references add ten times the tokens of a
+ # 1 MP image. Priced on the unlocked model, whose GGUF or fp8-stored layers add a transient per forward,
+ # before the VRAM lock the reservation applies to. CFG runs its two forwards one after the other, so only
+ # the longer caption counts.
+ working_memory = estimate_flux3_denoise_working_memory(
+ transformer_info.model,
+ image_seq_len=packed_h * packed_w,
+ ref_image_seq_len=ref_tokens.shape[1] if ref_tokens is not None else 0,
+ text_seq_len=max(txt.shape[1], neg_txt.shape[1] if neg_txt is not None else 0),
+ batch_size=batch_size,
+ device=device,
+ dtype=compute_dtype,
)
+ (_, transformer) = exit_stack.enter_context(transformer_info.model_on_device(working_memory=working_memory))
x = denoise(
model=transformer,
img=x,
@@ -280,28 +273,6 @@ class Flux3DenoiseInvocation(BaseInvocation):
)
return mask.to(device=latents.device, dtype=latents.dtype).expand_as(latents)
- @staticmethod
- def _estimate_working_memory(num_tokens: int, batch_size: int, device: torch.device, dtype: torch.dtype) -> int:
- """Peak transformer activation memory, so the model cache keeps that much VRAM free.
-
- Attention runs through SDPA without materializing the score matrix, so activations grow linearly with
- the attended sequence -- image, reference and text tokens alike. References are the dominant term: ten
- 1 MP references add ten times the tokens of a 1 MP image. CFG runs its two forwards one after the
- other, so it does not double the peak. The fixed base covers allocator slack and transient casts.
- """
- estimated = num_tokens * batch_size * FLUX3_BYTES_PER_TOKEN + int(1.0 * 1024**3)
- estimated += sdpa_score_matrix_bytes(
- device=device,
- dtype=dtype,
- num_heads=FLUX3_ATTENTION_HEADS * batch_size,
- head_dim=FLUX3_ATTENTION_HEAD_DIM,
- seq_len=num_tokens,
- has_attn_mask=False,
- # diffusers' FLUX.3 transformer attends through `dispatch_attention_fn`.
- via_diffusers_dispatch=True,
- )
- return estimated
-
def _build_step_callback(self, context: InvocationContext) -> Callable[[PipelineIntermediateState], None]:
def step_callback(state: PipelineIntermediateState) -> None:
# The x0 estimate in the normalized space, unpacked: the space FLUX2_32's preview factors expect.
diff --git a/invokeai/backend/flux2/denoise_working_memory.py b/invokeai/backend/flux2/denoise_working_memory.py
index 76cdcb9d6e..10a7cfc2f5 100644
--- a/invokeai/backend/flux2/denoise_working_memory.py
+++ b/invokeai/backend/flux2/denoise_working_memory.py
@@ -62,7 +62,7 @@ The analytic terms:
- The largest layer's stored weights, for a transformer the model cache may load partially: the weights it leaves in
RAM are copied to the device per forward, one layer at a time, and the copy is alive during its layer's matmul
alongside the activations. No point prices it: every point is a fully resident model. The size is read off the
- transformer, the largest module's own parameters and buffers as stored (`calc_tensor_size`, as the cache counts
+ transformer, the largest module's own parameters and buffers as stored (`largest_module_bytes`, as the cache counts
them): in bf16 the single-stream blocks' fused projection (`to_qkv_mlp_proj`, ``width x 9 width``), 679,477,248
bytes for [dev]; for an fp8-stored or GGUF build its float8 or quantized bytes, whose widened copy is the fp8 cast or
dequant transient's term. A real [dev] in bf16 with 15.0 of its 64.4 GB resident on the RTX 4090 (native
@@ -103,7 +103,7 @@ import torch
from invokeai.backend.quantization.dequantizing_linear import peak_dequant_transient_bytes
from invokeai.backend.util.attention import sdpa_score_matrix_bytes
-from invokeai.backend.util.calc_tensor_size import calc_tensor_size
+from invokeai.backend.util.calc_tensor_size import largest_module_bytes
from invokeai.backend.util.fp8 import peak_fp8_cast_transient_bytes
from invokeai.backend.working_memory.estimate import FeatureValue, WorkingMemoryEstimate, WorkingMemoryTerm
from invokeai.backend.working_memory.fit import Line, off_line_reasons
@@ -191,17 +191,6 @@ def _terms(features: Mapping[str, FeatureValue], values: Mapping[str, float]) ->
)
-def _largest_layer_bytes(transformer: torch.nn.Module) -> int:
- """The largest module's own parameters and buffers as stored: what partial loading copies for one layer."""
- return max(
- (
- sum(calc_tensor_size(t) for t in (*module.parameters(recurse=False), *module.buffers(recurse=False)))
- for module in transformer.modules()
- ),
- default=0,
- )
-
-
def _padded_bias_bytes(mask: Optional[torch.Tensor], dtype: torch.dtype) -> int:
"""One sample's copy of the additive bias in `dtype`, its last dimension padded to `_BIAS_ALIGNMENT`; 0 without one."""
if mask is None:
@@ -266,7 +255,7 @@ def estimate_flux2_denoise_working_memory(
"has_attention_mask": has_attention_mask,
"regional_bias_bytes": regional_attn_mask.numel() * dtype.itemsize if regional_attn_mask is not None else 0,
"padded_bias_bytes": _padded_bias_bytes(regional_attn_mask, dtype) * batch_size,
- "streamed_layer_bytes": 0 if weights_resident else _largest_layer_bytes(transformer),
+ "streamed_layer_bytes": 0 if weights_resident else largest_module_bytes(transformer),
"score_matrix_bytes": sdpa_score_matrix_bytes(
device=device,
dtype=dtype,
diff --git a/invokeai/backend/flux3/denoise_working_memory.py b/invokeai/backend/flux3/denoise_working_memory.py
new file mode 100644
index 0000000000..3809d9f223
--- /dev/null
+++ b/invokeai/backend/flux3/denoise_working_memory.py
@@ -0,0 +1,245 @@
+"""The working memory of one FLUX.3 transformer forward, as the denoise node reserves it.
+
+The transformer attends over one joint sequence per sample: the caption's tokens, padded to a multiple of 80 (the
+transformer attends to the padding, `flux3/text_encoding.py`), the image's at 1/16 of each side, and those of every
+reference image (`flux3/ref_images.py`), a stream of their own that the joint blocks concatenate after the image's. The
+per-mode blocks before them attend within one stream each, over a shorter sequence. On a fused SDPA kernel the
+activations scale linearly with the joint sequence and with the batch, which runs as that many sequences:
+`k_denoise_<dtype>_h<width>` bytes per attended token per sample plus a base of `b_denoise_<dtype>_h<width>` bytes,
+shipped per platform in `backend/working_memory/data/denoise.json`. The cost per token follows the transformer's width,
+read off the transformer itself (heads times head width). Every released FLUX.3 checkpoint is 3072 wide: Klein, the
+step-distilled flow map, and Klein Base share one geometry and differ only by Klein's embedder of the timestep each step
+jumps to (`ref_time_in`, one 256 x 3072 and one 3072 x 3072 linear), so both price on one line per dtype. The node runs
+the transformer in the dtype its loaders build it in, `TorchDevice.choose_bfloat16_safe_dtype`: bf16, else fp16 on a
+CUDA card without bf16, else fp32, each a line of its own. Klein Base's conditional and unconditional passes run one
+after the other, so only the longer caption counts. The platform keys are those of the VAE estimators; for a
+transformer, `conv_backend` just names the CUDA (`cudnn`) or ROCm (`miopen`) stack it runs on.
+
+That line is `denoise_<dtype>_h<width>` over the attended tokens times the batch (`_line`), and only the plain forward
+fits it: every analytic term below comes to zero. A batch fits too, because the line prices exactly what a batch adds,
+its sequences, and a forward's base is paid once whatever the batch. Reference images fit it as well: they are tokens of
+the joint sequence. `_line` reads the fit off the terms themselves, so a term added here takes the forwards it prices
+out of the fit. The fit takes a point's demand as measured, so a forward with an analytic term bounds its estimate but
+fits nothing: a materialized score matrix's term is an upper bound, and a line fitted on the demand less that term
+would come out low by its slack. The spec does not opt in to user calibration (`EstimatorSpec.user_calibrated`): the
+lines are the shipped fit's alone.
+
+The lines are fitted per platform and dtype on fresh-process points of
+`scripts/calibrate_flux3_denoise_working_memory.py` (their provenance is in the data): an RTX 4090 with the native
+allocator and with `cudaMallocAsync`, an RX 9060 XT under ROCm 10 with AOTriton's fused kernels, with expandable
+segments and with the native allocator on Windows, and a Radeon Pro W7900 under ROCm 10 on Linux, with fused SDPA and
+the native allocator. In bf16, fp16 and fp32 the fit grid runs 512 to 2048px with a 560-token caption, 1024 and 1440px
+with an 80-token one, at 1024px one, three and (bf16 and fp16) ten 1024px references and a batch of two, and Klein Base
+at 1024px beside Klein; in bf16 the long sequences add 2048px with one 2048px reference (33328 tokens), 1536px with one
+(26160), 2048px with three 1024px references (29232) and with ten (57904). They run on a random-init transformer of the
+loader's geometry with 2 per-mode blocks per stream and 2 joint blocks. The RTX 4090 and the W7900 run them all; the RX
+9060 XT cannot fit the ten-reference forwards (45616 and 57904 tokens) in 16 GB beside their weights, so its lines are
+measured up to 33328 tokens.
+
+The plain forwards from 512 to 2048px take, per token, 0.289 MiB in bf16 and fp16 and 0.476 in fp32 on the RTX 4090
+under the native allocator, 0.184 and 0.369 under `cudaMallocAsync`; on the RX 9060 XT 0.291 and 0.440 under the native
+allocator, 0.167 (over a 0.22 GiB intercept) and 0.333 with expandable segments; on the W7900 0.291 and 0.440 as well,
+fp32's over a 0.48 GiB intercept. bf16 and fp16 measure within 34 MiB of each other, but for one forward under
+`cudaMallocAsync` (144 MiB). Reference images cost more per token than the image and the caption: three 1024px
+references sit 1.07x above the plain forwards' line under the native allocator (ten 1.08x on the RTX 4090 and the
+W7900), and up to 1.12x under `cudaMallocAsync` and 1.17x with expandable segments. The fit is the upper envelope of
+every in-fit point, so the reference forwards decide most lines and the plain ones sit below them: the RTX 4090's native
+bf16 line, 0.328 MiB per token with no base, reserves 1.05x the ten-reference forward and 1.11 to 1.20x the plain ones
+but its 1440px forward with an 80-token caption, which it holds at 1.31x. That forward in fp16, and under
+`cudaMallocAsync` a batch of two in bf16 and two fp32 forwards, are held at 1.31 to 1.32x as well
+(`bounds.UPPER_BOUND_EXCEPTIONS`); on the W7900 it sits at 1.26x, the most its lines reserve. A batch of two lies within
+0.91 to 1.05x of the line of the plain forwards. Klein Base demanded what Klein does, byte for byte on the RTX 4090 and
+the RX 9060 XT and within 20 KiB on the W7900, except under `cudaMallocAsync`, where it took 32 MiB more at 1024px,
+inside the line. 4 blocks per stream measured the same as 2 on the RTX 4090 and the W7900 and 4.2% more on the RX 9060
+XT with expandable segments (993 against 953 MiB at 1024px), which its line covers at 1.17x. On the RX 9060 XT a
+process's first forward maps ~245 MiB more than its second; every point takes the larger of its cold and its warm
+forward, so the envelope carries it. With SDPA forced onto the math kernel at 1024px the RTX 4090 took 13.69 bytes per
+score element over the default kernel, against the 17 the score term charges; on ROCm the SDPA guard chunks the math
+kernel, which took 129 MiB more on the RX 9060 XT and 122 MiB less on the W7900, against the 1 GiB chunk the term
+charges. The released Klein in bf16, fully resident (`--mode real`), demanded what the 2-block point of the same tokens
+does at 1024 and 2048px and at 1024px with one and three references: exactly on the RTX 4090 (native allocator), the
+same or up to 21 MiB less on the W7900. On the RX 9060 XT (expandable segments) it demanded 1.08 and 1.06x it at 1024
+and 2048px and 1.08x with one reference, but 1.006x with three: its extra depth costs a near-constant 20 to 180 MiB
+there, not a share of the sequence. Fully resident the estimate reserves 1.07 to 1.15x those forwards on the RTX 4090,
+1.04 to 1.16x on the RX 9060 XT and 1.05 to 1.13x on the W7900, and 1.08 to 1.24x with the streamed layer the node adds.
+They ship as out-of-fit points, which hold every refit to the released model from below; the W7900's 1024px one is held
+by its 4-block forward, an out-of-fit point of the same features that demanded 21 MiB more.
+
+The node caps neither the image's side nor its references (ten of up to 1 MP each, or one of up to 4 MP), so a longer
+sequence prices on its line extrapolated linearly, as the FLUX.2 lines do: on fused attention kernels the activations
+grow linearly with the sequence. From 26160 to 57904 tokens the bf16 lines reserve 1.05 to 1.17x what each measured
+forward demands under the native allocator, 1.11 to 1.18x under `cudaMallocAsync` and 1.12 to 1.18x with expandable
+segments.
+
+Every platform nothing measures is priced as a measured one (`priced_as`), and the three fitted entries those borrow,
+each with the native allocator, the RTX 4090's, the RX 9060 XT's on Windows and the W7900's on every other OS, floor
+every value there at the constants the node reserved by hand (`unmeasured_floor`): 0.33 MiB per attended token and
+sample, truncated to whole bytes (346030), and a 1 GiB base, for every dtype. No unmeasured platform reserves less than
+the node did by hand. The 0.33 bounded a real Klein forward on an RTX 4090 at the driver level: 0.286 MB per token from
+1 to 4 MP without references, up to 0.320 with six 1 MP references. The constants lie above every measured bf16 and fp16
+line at any size a card holds: the W7900's, 0.1% steeper, meets them only at 2.9 million tokens, 932 GiB. They lie below
+the steeper fp32 lines past 2700 to 13000 tokens. The legacy base also covers the fp8 weights cast per forward, which an
+fp8-stored model reserves as a term of its own as well, so it pays that cast twice wherever they price.
+
+Two judgements, not measurements, extend an entry past the card it was measured on. CUDA on Linux reuses the RTX
+4090's Windows-measured lines without the floor, as the FLUX.2 denoise does and for the same reason: the same allocator
+and kernels on both systems. ROCm with the native allocator on every OS but Windows prices every card with the W7900's
+lines, because two generations on two systems measured close: at every shape both measured, the RX 9060 XT (gfx1200,
+Windows) demanded 35 to 45 MiB more than the W7900 (gfx1100, Linux) in bf16 and 74 to 84 MiB more in fp16, on the same
+0.291 MiB per token, and 290 to 454 MiB less in fp32. A ROCm card without a fused kernel for these shapes prices the
+score matrix on top, capped at the 1 GiB chunk the SDPA guard computes math attention in.
+
+The analytic terms:
+
+- The largest layer's stored weights, for a transformer the model cache may load partially: the weights it leaves in
+ RAM are copied to the device per forward, one layer at a time, and the copy is alive during its layer's matmul
+ alongside the activations. No point prices it: every point is a fully resident model. The size is read off the
+ transformer, the largest module's own parameters and buffers as stored (`largest_module_bytes`, as the cache counts
+ them): in bf16 the caption embedder (`context_embedder`, 20480 x 3072), 125,829,120 bytes; for an fp8-stored or GGUF
+ build its float8 or quantized bytes, whose widened copy is the fp8 cast or dequant transient's term. The node charges
+ it on every forward: whether the cache loads the transformer whole is decided by the lock this estimate sizes, after
+ it, so residency is unknown when the estimate is taken. A fully resident model over-reserves one layer. The
+ calibration script, whose models are always resident, declares them so (`weights_resident`), and the term is zero.
+- Where SDPA has no fused kernel for these shapes it materializes the score matrices, shaped (batch, heads, S, S) over
+ the joint sequence: `sdpa_score_matrix_bytes` prices them only where they are really built. No mask is passed.
+- The dequantization copy a GGUF build materializes per quantized linear and forward, alive alongside the activations
+ and invisible to them (`peak_dequant_transient_bytes`); zero for every other build.
+- The compute-dtype copies of a layer's float8-stored weights that FP8 Storage widens per forward
+ (`peak_fp8_cast_transient_bytes`); zero for every other build.
+"""
+
+from collections.abc import Mapping
+from typing import Any, Final, cast
+
+import torch
+
+from invokeai.backend.quantization.dequantizing_linear import peak_dequant_transient_bytes
+from invokeai.backend.util.attention import sdpa_score_matrix_bytes
+from invokeai.backend.util.calc_tensor_size import largest_module_bytes
+from invokeai.backend.util.fp8 import peak_fp8_cast_transient_bytes
+from invokeai.backend.working_memory.estimate import FeatureValue, WorkingMemoryEstimate, WorkingMemoryTerm
+from invokeai.backend.working_memory.fit import Line, off_line_reasons
+from invokeai.backend.working_memory.platform import platform_for
+from invokeai.backend.working_memory.spec import EstimatorSpec, register
+
+FLUX3_HIDDEN_SIZES: Final = (3072,)
+"""The transformer widths with a line: every released FLUX.3 checkpoint's, Klein's and Klein Base's."""
+
+_DTYPE_NAMES: Final[Mapping[torch.dtype, str]] = {torch.bfloat16: "bf16", torch.float16: "fp16", torch.float32: "fp32"}
+"""The dtypes `TorchDevice.choose_bfloat16_safe_dtype` runs the transformer in."""
+_LINES: Final = tuple(f"denoise_{dtype}_h{width}" for dtype in _DTYPE_NAMES.values() for width in FLUX3_HIDDEN_SIZES)
+_COEFFICIENTS: Final = frozenset(f"{part}_{line}" for part in ("k", "b") for line in _LINES)
+
+
+def _suffix(features: Mapping[str, FeatureValue]) -> str | None:
+ """The line a forward's dtype and width price on, None for a pair that has none."""
+ suffix = f"denoise_{features.get('dtype')}_h{features.get('hidden_size')}"
+ return suffix if suffix in _LINES else None
+
+
+def _line(features: Mapping[str, FeatureValue]) -> Line | None:
+ """The forward's line, `denoise_<dtype>_h<width>` over the attended tokens of every sample. Only the plain forward
+ fits it: every analytic term of `_terms` zero (see the module docstring). The label names what puts a forward off
+ the line, each analytic term that is not zero, in bytes, and Klein Base by `-base`. A dtype or width without a line
+ names none."""
+ suffix = _suffix(features)
+ tokens, batch = features.get("tokens"), features.get("batch_size")
+ if suffix is None or not isinstance(tokens, int) or not isinstance(batch, int):
+ return None
+ off_line = off_line_reasons(_terms, features, _COEFFICIENTS)
+ references = features.get("reference_tokens")
+ shape = "+".join(
+ (
+ str(features.get("image_tokens")),
+ *([f"{references}ref"] if references else []),
+ f"{features.get('text_tokens')}tok",
+ )
+ )
+ batched = [f"b{batch}"] if batch != 1 else []
+ variant = [] if features.get("flow_map", True) else ["base"]
+ label = "-".join(
+ ("denoise", str(features["dtype"]), f"h{features['hidden_size']}", shape, *batched, *variant, *off_line)
+ )
+ return Line(suffix, tokens * batch, not off_line, label)
+
+
+def _terms(features: Mapping[str, FeatureValue], values: Mapping[str, float]) -> tuple[WorkingMemoryTerm, ...]:
+ suffix = _suffix(features)
+ if suffix is None:
+ raise ValueError(f"no denoise line for {features.get('dtype')} at width {features.get('hidden_size')}")
+ batch = cast(int, features["batch_size"])
+ return (
+ WorkingMemoryTerm.fitted("activations", f"k_{suffix}", cast(int, features["tokens"]) * batch, values),
+ WorkingMemoryTerm.fitted("base", f"b_{suffix}", 1, values),
+ WorkingMemoryTerm("streamed_layer", cast(int, features["streamed_layer_bytes"]), True),
+ WorkingMemoryTerm("attention_scores", cast(int, features["score_matrix_bytes"]), True),
+ WorkingMemoryTerm("dequant_transient", cast(int, features["dequant_transient_bytes"]), True),
+ WorkingMemoryTerm("fp8_cast_transient", cast(int, features["fp8_cast_transient_bytes"]), True),
+ )
+
+
+FLUX3_DENOISE_SPEC = register(
+ EstimatorSpec(
+ id="denoise.flux3",
+ version=1,
+ coefficients=_COEFFICIENTS,
+ platform_keys=("conv_backend", "allocator"),
+ terms=_terms,
+ line=_line,
+ )
+)
+
+
+def estimate_flux3_denoise_working_memory(
+ transformer: torch.nn.Module,
+ *,
+ image_seq_len: int,
+ ref_image_seq_len: int,
+ text_seq_len: int,
+ batch_size: int,
+ weights_resident: bool = False,
+ device: torch.device,
+ dtype: torch.dtype,
+) -> WorkingMemoryEstimate:
+ """The working memory one forward of `transformer` needs on `device` in `dtype`.
+
+ `transformer` is the `Flux3Transformer2DModel` about to be locked, read unlocked: its width and head count from its
+ config, its largest layer, and its dequantization and fp8 cast transients. `image_seq_len`, `ref_image_seq_len`
+ and `text_seq_len` are one sample's token counts, the longer caption of a CFG pair, and `batch_size` the samples the
+ forward runs. `weights_resident` is True only where the caller knows every weight stays on the device for the
+ forward; otherwise the largest layer, which partial loading would stream, is reserved too.
+ """
+ config: Any = transformer.config # a diffusers ConfigMixin's
+ heads, head_dim = int(config.num_attention_heads), int(config.attention_head_dim)
+ hidden_size = heads * head_dim
+ dtype_name = _DTYPE_NAMES.get(dtype)
+ if dtype_name is None or hidden_size not in FLUX3_HIDDEN_SIZES:
+ raise ValueError(
+ f"Working-memory estimator '{FLUX3_DENOISE_SPEC.id}' has no {dtype} line at width {hidden_size} on "
+ f"{platform_for(device)}: the transformer runs in a dtype or at a width it is not measured for."
+ )
+ tokens = image_seq_len + ref_image_seq_len + text_seq_len
+ features: dict[str, FeatureValue] = {
+ "hidden_size": hidden_size,
+ "flow_map": bool(config.flow_map),
+ "image_tokens": image_seq_len,
+ "reference_tokens": ref_image_seq_len,
+ "text_tokens": text_seq_len,
+ "tokens": tokens,
+ "batch_size": batch_size,
+ "dtype": dtype_name,
+ "streamed_layer_bytes": 0 if weights_resident else largest_module_bytes(transformer),
+ "score_matrix_bytes": sdpa_score_matrix_bytes(
+ device=device,
+ dtype=dtype,
+ num_heads=heads * batch_size,
+ head_dim=head_dim,
+ seq_len=tokens,
+ # diffusers' FLUX.3 transformer attends through `dispatch_attention_fn`, which can route around torch's
+ # SDPA, including to a forced `math` backend.
+ via_diffusers_dispatch=True,
+ ),
+ "dequant_transient_bytes": peak_dequant_transient_bytes(transformer, dtype),
+ "fp8_cast_transient_bytes": peak_fp8_cast_transient_bytes(transformer, dtype),
+ }
+ return FLUX3_DENOISE_SPEC.estimate(features, device)
diff --git a/invokeai/backend/model_manager/load/model_loaders/flux3.py b/invokeai/backend/model_manager/load/model_loaders/flux3.py
index ace65302bf..4bef391ecc 100644
--- a/invokeai/backend/model_manager/load/model_loaders/flux3.py
+++ b/invokeai/backend/model_manager/load/model_loaders/flux3.py
@@ -12,6 +12,7 @@ Submodel map of a Diffusers folder (subfolder == ``SubModelType`` value, except
Single-file and GGUF builds are only the transformer, in Black Forest Labs' key layout.
"""
+from collections.abc import Callable
from pathlib import Path
from typing import Optional
@@ -61,6 +62,38 @@ def _build_transformer(state_dict: dict) -> torch.nn.Module:
return Flux3Transformer2DModel(**model_config)
+def flux3_transformer_from_native(
+ sd: dict, dtype: torch.dtype, reserve: Optional[Callable[[int], None]] = None
+) -> torch.nn.Module:
+ """The transformer of a native single-file FLUX.3 state dict in `dtype`, on the device its tensors are on, the QK
+ norms in float32. Empties `sd`. `reserve` asks the RAM cache for room before the cast, as `reserve_for_load` does;
+ None asks nothing, for a caller that loads outside the cache (the working-memory calibration script)."""
+ sd = CheckpointPrefix.detect(sd).strip(sd)
+ # Identification refuses quantized builds already; this catches a record made before it did.
+ reject_quantized_side_channel(sd, "a FLUX.3 single-file checkpoint")
+
+ model = _build_transformer(sd)
+ sd = convert_flux3_native_to_diffusers(sd)
+ skip_patterns = _model_declared_skip_patterns(model)
+ if reserve is not None:
+ reserve_for_load(
+ reserve,
+ sd,
+ dtype,
+ keep_fp8=False,
+ model=model,
+ skip_patterns=skip_patterns,
+ fp8_layers={},
+ nvfp4_payloads={},
+ )
+ cast_state_dict(sd, dtype, keep_fp8=False, model=model, skip_patterns=skip_patterns)
+ load_state_dict_ignoring_extras(model, sd, source="FLUX.3 single-file checkpoint", assign=True, allow_missing=True)
+ reject_incomplete_load(model, what="FLUX.3 single-file checkpoint")
+ sd.clear()
+ _keep_qk_norms_in_fp32(model)
+ return model
+
+
@ModelLoaderRegistry.register(base=BaseModelType.Flux3, type=ModelType.Main, format=ModelFormat.Diffusers)
class Flux3DiffusersModel(ModelLoader):
"""Loads the submodels of a FLUX.3 Diffusers folder."""
@@ -133,31 +166,7 @@ class Flux3CheckpointModel(ModelLoader):
from safetensors.torch import load_file
model_dtype = TorchDevice.choose_bfloat16_safe_dtype(TorchDevice.choose_torch_device())
- sd = load_file(Path(config.path))
- sd = CheckpointPrefix.detect(sd).strip(sd)
- # Identification refuses quantized builds already; this catches a record made before it did.
- reject_quantized_side_channel(sd, "a FLUX.3 single-file checkpoint")
-
- model = _build_transformer(sd)
- sd = convert_flux3_native_to_diffusers(sd)
- skip_patterns = _model_declared_skip_patterns(model)
- reserve_for_load(
- self._ram_cache.make_room,
- sd,
- model_dtype,
- keep_fp8=False,
- model=model,
- skip_patterns=skip_patterns,
- fp8_layers={},
- nvfp4_payloads={},
- )
- cast_state_dict(sd, model_dtype, keep_fp8=False, model=model, skip_patterns=skip_patterns)
- load_state_dict_ignoring_extras(
- model, sd, source="FLUX.3 single-file checkpoint", assign=True, allow_missing=True
- )
- reject_incomplete_load(model, what="FLUX.3 single-file checkpoint")
- sd.clear()
- _keep_qk_norms_in_fp32(model)
+ model = flux3_transformer_from_native(load_file(Path(config.path)), model_dtype, self._ram_cache.make_room)
return self._apply_fp8_layerwise_casting(model, config, SubModelType.Transformer)
diff --git a/invokeai/backend/util/calc_tensor_size.py b/invokeai/backend/util/calc_tensor_size.py
index 2a3f57ee7b..1a715e4b98 100644
--- a/invokeai/backend/util/calc_tensor_size.py
+++ b/invokeai/backend/util/calc_tensor_size.py
@@ -16,3 +16,15 @@ def calc_tensor_size(t: torch.Tensor) -> int:
def calc_tensors_size(tensors: list[torch.Tensor | None]) -> int:
"""Calculate the size of a list of tensors in bytes."""
return sum(calc_tensor_size(t) for t in tensors if t is not None)
+
+
+def largest_module_bytes(model: torch.nn.Module) -> int:
+ """The largest module's own parameters and buffers as stored (`calc_tensor_size`, as the model cache counts them):
+ what partial loading copies to the device for one layer's forward. 0 for a model without tensors."""
+ return max(
+ (
+ sum(calc_tensor_size(t) for t in (*module.parameters(recurse=False), *module.buffers(recurse=False)))
+ for module in model.modules()
+ ),
+ default=0,
+ )
diff --git a/invokeai/backend/working_memory/bounds.py b/invokeai/backend/working_memory/bounds.py
index d80c017a1c..93bc6e2e50 100644
--- a/invokeai/backend/working_memory/bounds.py
+++ b/invokeai/backend/working_memory/bounds.py
@@ -46,10 +46,15 @@ UPPER_BOUND_EXCEPTIONS: Final[Mapping[str, float]] = MappingProxyType(
"vae.flux2-miopen,native,windows-decode-bf16-512x512-scores-RX9060XT-demand_peak": 1.33,
"denoise.flux2-cudnn,native-denoise-bf16-h3072-8100+77tok-RTX4090-demand_peak": 1.42,
"denoise.flux2-miopen,native,windows-denoise-bf16-h3072-8100+77tok-RX9060XT-demand_peak": 1.40,
+ "denoise.flux3-cudnn,native-denoise-bf16-h3072-8100+80tok-RTX4090-demand_peak": 1.31,
+ "denoise.flux3-cudnn,native-denoise-fp16-h3072-8100+80tok-RTX4090-demand_peak": 1.31,
+ "denoise.flux3-cudnn,cudaMallocAsync-denoise-bf16-h3072-4096+560tok-b2-RTX4090-demand_peak": 1.31,
+ "denoise.flux3-cudnn,cudaMallocAsync-denoise-fp32-h3072-8100+80tok-RTX4090-demand_peak": 1.31,
+ "denoise.flux3-cudnn,cudaMallocAsync-denoise-fp32-h3072-1024+560tok-RTX4090-demand_peak": 1.32,
}
)
"""In-fit points, by `point_id`, whose envelope sits more than 1.3x above them, with the ratio they are held to
-instead. All are the native allocator, never expandable segments or `cudaMallocAsync`:
+instead. All but the FLUX.3 ones are the native allocator, never expandable segments or `cudaMallocAsync`:
- The VAE points are MIOpen on Windows, where the demand is concave in the size: first-run driver spikes at small sizes
and a second run reserving up to 1.6x the first at large ones, so a line that covers every point cannot stay within
@@ -57,7 +62,14 @@ instead. All are the native allocator, never expandable segments or `cudaMallocA
- The FLUX.2 denoise points are the Klein 4B width at 1440px with a 77-token caption, 8177 tokens, on both cards: the
native allocator served them from 1676 MiB (RTX 4090) and 1879 MiB (RX 9060 XT), while the 512-token caption at
8612 tokens took 2382 and 2577 MiB. The line has to cover the latter. Under `cudaMallocAsync` and expandable
- segments the two lie on one line."""
+ segments the two lie on one line.
+- The FLUX.3 denoise points are forwards without reference images on the RTX 4090, one of them a batch of two, that
+ the reference points put 1.302 to 1.320x under their line: references cost more per token than the image and the
+ caption (up to 8% under the native allocator, 12% under `cudaMallocAsync`; see `flux3/denoise_working_memory.py`), and
+ the line has to cover the reference forwards. Under the native allocator
+ the 1440px forward with an 80-token caption (8180 tokens, 2060 MiB, against 2516 MiB for the 560-token caption at 8660
+ tokens) in bf16 and fp16, under `cudaMallocAsync` a batch of two at 1024px in bf16 and, in fp32, the 512px forward
+ and the 1440px one with an 80-token caption."""
def point_id(point: MeasuredPoint, spec: "EstimatorSpec") -> str:
diff --git a/invokeai/backend/working_memory/data/denoise.json b/invokeai/backend/working_memory/data/denoise.json
index 57ff04f2be..222517e89a 100644
--- a/invokeai/backend/working_memory/data/denoise.json
+++ b/invokeai/backend/working_memory/data/denoise.json
@@ -208,6 +208,117 @@
"b_denoise_bf16_h6144": 284164096
},
"provenance": "Windows only, where expandable segments are Invoke's ROCm default. The FLUX.2 transformer forward's lines, bytes per attended token and sample plus a base, one per width (3072, 4096, 6144), bf16. RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True, MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 (fused SDPA), ROCm SDPA guard installed. Measured by scripts/calibrate_flux2_denoise_working_memory.py on 2026-10-18 per width: 512, 768, 1024, 1440 and 2048px with a 512-token caption, 1024 and 1440px with a 77-token one, and at 1024px one and three 1024px reference images and a batch of two, and with --mode large long sequences: 2048px with one 2024px reference (33025 tokens), 1536px with one (25857) and 1328px with three 1328px references, which the node resizes to 1024px each (19689); plain forwards on a random-init transformer of the model loader's geometry (memory does not depend on weight values) with 2 double-stream and 2 single-stream blocks, one fresh process per point with the server's runtime, demand_peak (the largest of the driver, reserved and allocated peak) of the larger of a cold and a warm forward. Fitted by scripts/working_memory/build_shipped.py: working_memory/fit.py's upper envelope of the points below, plus 5%. Reference images and the batch lie on the line of the plain forwards. 4 blocks per stream measured 5 to 7% more than 2 at 1024px on this card (953 against 893 MiB at width 3072, 1193 against 1133 MiB at 4096, expandable segments; [dev] with 4 blocks does not fit 16 GB). [dev]'s line comes from 512 to 1440px, one 1024px reference included: at 2048px, with three references and in the large grid it does not fit 16 GB beside its weights; the Klein 4B and 9B lines are measured up to 33025 tokens where they fit. The base carries the ~245 MiB a process's first forward maps beyond its second (453 against 224 MiB at 512px, width 3072). The real models in a running server (calibration probe windows, kept as evidence and not shipped) demanded 0.81 to 0.95 times the 2-block point at the same tokens for a bf16 Klein 4B, and 0.71 to 0.77 for an fp8 Klein 9B after its 576 MiB fp8 cast term: the 2-block points bound the real models, the extra blocks' 5 to 7% included."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "values": {
+ "k_denoise_bf16_h3072": 343751,
+ "b_denoise_bf16_h3072": 0,
+ "k_denoise_fp16_h3072": 343751,
+ "b_denoise_fp16_h3072": 0,
+ "k_denoise_fp32_h3072": 550763,
+ "b_denoise_fp32_h3072": 0
+ },
+ "unmeasured_floor": {
+ "k_denoise_bf16_h3072": 346030,
+ "b_denoise_bf16_h3072": 1073741824,
+ "k_denoise_fp16_h3072": 346030,
+ "b_denoise_fp16_h3072": 1073741824,
+ "k_denoise_fp32_h3072": 346030,
+ "b_denoise_fp32_h3072": 1073741824
+ },
+ "provenance": "The FLUX.3 transformer forward's lines, bytes per attended token and sample plus a base, one per dtype (bf16, fp16, fp32) at width 3072, Klein and Klein Base alike. RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (the native allocator), fused SDPA. Measured by scripts/calibrate_flux3_denoise_working_memory.py on 2026-10-31 per dtype: 512, 768, 1024, 1440 and 2048px with a 560-token caption, 1024 and 1440px with an 80-token one, and at 1024px one, three and (bf16, fp16) ten 1024px reference images, a batch of two and Klein Base beside Klein, and in bf16 with --mode large long sequences: 2048px with one 2048px reference (33328 tokens), 1536px with one (26160), 2048px with three 1024px references (29232) and with ten (57904); forwards on a random-init transformer of the model loader's geometry (memory does not depend on weight values) with 2 per-mode blocks per stream and 2 joint blocks, one fresh process per point with the server's runtime, demand_peak (the largest of the driver, reserved and allocated peak) of the larger of a cold and a warm forward. Fitted by scripts/working_memory/build_shipped.py: working_memory/fit.py's upper envelope of the points below, plus 5%. Plain forwards take 0.289 MiB per token in bf16 and fp16, which measured byte for byte the same, and 0.476 in fp32. Reference images cost up to 8% more per token than the image and caption (1.07x the 512-2048px line with three 1024px references, 1.08x with ten), and the ten-reference forward at 1024px (45616 tokens) decides the bf16 and fp16 lines: they reserve 1.05x it, 1.06 to 1.17x the long sequences and 1.11 to 1.20x every other plain forward. Klein Base demanded what Klein does, and 4 blocks per stream the same as 2 at 1024px. The 1440px forward with an 80-token caption is held at 1.31x in bf16 and fp16 (`bounds.UPPER_BOUND_EXCEPTIONS`): the native allocator served it from 2060 MiB, the 560-token caption at 6% more tokens from 2516 MiB. Where this entry prices a platform nothing is measured on (MPS, XPU, the CPU, or cuDNN with expandable segments), each value is floored at the legacy constants the node reserved by hand, 0.33 MiB per token truncated to 346030 bytes and a 1 GiB base: the fit describes the card its points were measured on, not the platforms it stands in for."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "values": {
+ "k_denoise_bf16_h3072": 227448,
+ "b_denoise_bf16_h3072": 0,
+ "k_denoise_fp16_h3072": 212092,
+ "b_denoise_fp16_h3072": 0,
+ "k_denoise_fp32_h3072": 456023,
+ "b_denoise_fp32_h3072": 0
+ },
+ "provenance": "The FLUX.3 transformer forward's lines, bytes per attended token and sample plus a base, one per dtype (bf16, fp16, fp32) at width 3072, Klein and Klein Base alike. RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync, fused SDPA. Measured by scripts/calibrate_flux3_denoise_working_memory.py on 2026-10-31 per dtype: 512, 768, 1024, 1440 and 2048px with a 560-token caption, 1024 and 1440px with an 80-token one, and at 1024px one, three and (bf16, fp16) ten 1024px reference images, a batch of two and Klein Base beside Klein, and in bf16 with --mode large long sequences: 2048px with one 2048px reference (33328 tokens), 1536px with one (26160), 2048px with three 1024px references (29232) and with ten (57904); forwards on a random-init transformer of the model loader's geometry (memory does not depend on weight values) with 2 per-mode blocks per stream and 2 joint blocks, one fresh process per point with the server's runtime, demand_peak (the largest of the driver, reserved and allocated peak) of the larger of a cold and a warm forward. Fitted by scripts/working_memory/build_shipped.py: working_memory/fit.py's upper envelope of the points below, plus 5%. Plain forwards take 0.184 MiB per token in bf16 and fp16 and 0.369 in fp32, 36 and 23% less than under the native allocator. Reference images scatter above that line, up to 1.12x it with one 1024px reference and 1.13x with three in fp32; the one-reference forward decides the bf16 line, the three-reference one the fp32 line, and the line reserves 1.11 to 1.18x the long sequences. fp16 served the one-reference forward from 144 MiB less than bf16, so its line lies lower. Klein Base demanded 32 MiB more than Klein at 1024px (816 against 784 MiB in bf16), which the line covers. Held above 1.3x (`bounds.UPPER_BOUND_EXCEPTIONS`): the batch of two in bf16 at 1.31x and, in fp32, the 512px forward at 1.32x and the 1440px one with an 80-token caption at 1.31x."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "values": {
+ "k_denoise_bf16_h3072": 346367,
+ "b_denoise_bf16_h3072": 99614720,
+ "k_denoise_fp16_h3072": 346367,
+ "b_denoise_fp16_h3072": 93323264,
+ "k_denoise_fp32_h3072": 525118,
+ "b_denoise_fp32_h3072": 587202560
+ },
+ "unmeasured_floor": {
+ "k_denoise_bf16_h3072": 346030,
+ "b_denoise_bf16_h3072": 1073741824,
+ "k_denoise_fp16_h3072": 346030,
+ "b_denoise_fp16_h3072": 1073741824,
+ "k_denoise_fp32_h3072": 346030,
+ "b_denoise_fp32_h3072": 1073741824
+ },
+ "provenance": "Every OS but Windows, which has its own entry. The FLUX.3 transformer forward's lines, bytes per attended token and sample plus a base, one per dtype (bf16, fp16, fp32) at width 3072, Klein and Klein Base alike. Radeon Pro W7900 (gfx1100, 48 GB), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL unset (fused SDPA), ROCm SDPA guard installed. Measured by scripts/calibrate_flux3_denoise_working_memory.py on 2026-10-31 per dtype: 512, 768, 1024, 1440 and 2048px with a 560-token caption, 1024 and 1440px with an 80-token one, and at 1024px one, three and (bf16, fp16) ten 1024px reference images, a batch of two and Klein Base beside Klein, and in bf16 with --mode large long sequences: 2048px with one 2048px reference (33328 tokens), 1536px with one (26160), 2048px with three 1024px references (29232) and with ten (57904); forwards on a random-init transformer of the model loader's geometry (memory does not depend on weight values) with 2 per-mode blocks per stream and 2 joint blocks, one fresh process per point with the server's runtime, demand_peak (the largest of the driver, reserved and allocated peak) of the larger of a cold and a warm forward. Fitted by scripts/working_memory/build_shipped.py: working_memory/fit.py's upper envelope of the points below, plus 5%. Plain forwards take 0.291 MiB per token in bf16 and fp16, which measured within 13 MiB of each other, and 0.440 in fp32 over a 0.48 GiB intercept; three 1024px references sit 1.07x above that line (1.08x in fp32), ten 1.08x. The 768px forward and the ten-reference one (45616 tokens) decide the bf16 and fp16 lines, the 768px forward and three references fp32's. The bf16 line reserves 1.07 to 1.16x the long sequences and at most 1.26x any forward: the 1440px one with an 80-token caption, which the native allocator served from 2229 MiB, the 560-token caption at 6% more tokens from 2685 MiB. Klein Base demanded what Klein does, and 4 blocks per stream the same as 2 at 1024px. At every shape both measured, the RX 9060 XT's native-allocator forwards on Windows demanded 35 to 45 MiB more than this card's in bf16, 74 to 84 MiB more in fp16 and 290 to 454 MiB less in fp32. Bounding their estimates from below only, out of the fit: the 4-block forward, which stands for the two other checks of its features that demanded no more (one shipped point per measurement), the math check's default-kernel forward and the released Klein's at 1024px; SDPA forced onto the math kernel at 1024px (--mode math), which the ROCm SDPA guard chunks and which took 122 MiB less than the default kernel, against the 1 GiB chunk the score term charges; and the released Klein in bf16, fully resident (--mode real), at 2048px and at 1024px with one and three references. At all four shapes the released Klein demanded what the 2-block point of the same tokens does, up to 21 MiB less: its extra depth costs nothing on this card. The floor below is declared, not fitted: where this entry prices a platform nothing is measured on (MIOpen with expandable segments or under hipMallocAsync, off Windows), each value is floored at the legacy constants the node reserved by hand, 0.33 MiB per token truncated to 346030 bytes and a 1 GiB base: the fit describes the card its points were measured on, not the platforms it stands in for."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "values": {
+ "k_denoise_bf16_h3072": 344534,
+ "b_denoise_bf16_h3072": 148897792,
+ "k_denoise_fp16_h3072": 344534,
+ "b_denoise_fp16_h3072": 186646528,
+ "k_denoise_fp32_h3072": 558408,
+ "b_denoise_fp32_h3072": 0
+ },
+ "unmeasured_floor": {
+ "k_denoise_bf16_h3072": 346030,
+ "b_denoise_bf16_h3072": 1073741824,
+ "k_denoise_fp16_h3072": 346030,
+ "b_denoise_fp16_h3072": 1073741824,
+ "k_denoise_fp32_h3072": 346030,
+ "b_denoise_fp32_h3072": 1073741824
+ },
+ "provenance": "Windows only; every other OS has its own entry, measured on Linux. The FLUX.3 transformer forward's lines, bytes per attended token and sample plus a base, one per dtype (bf16, fp16, fp32) at width 3072, Klein and Klein Base alike. RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 (fused SDPA), ROCm SDPA guard installed. Measured by scripts/calibrate_flux3_denoise_working_memory.py on 2026-10-31 per dtype: 512, 768, 1024, 1440 and 2048px with a 560-token caption, 1024 and 1440px with an 80-token one, and at 1024px one, three and (bf16, fp16) ten 1024px reference images, a batch of two and Klein Base beside Klein, and in bf16 with --mode large long sequences: 2048px with one 2048px reference (33328 tokens), 1536px with one (26160), 2048px with three 1024px references (29232) and with ten (57904); forwards on a random-init transformer of the model loader's geometry (memory does not depend on weight values) with 2 per-mode blocks per stream and 2 joint blocks, one fresh process per point with the server's runtime, demand_peak (the largest of the driver, reserved and allocated peak) of the larger of a cold and a warm forward. Fitted by scripts/working_memory/build_shipped.py: working_memory/fit.py's upper envelope of the points below, plus 5%. Plain forwards take 0.291 MiB per token in bf16 and fp16 and 0.440 in fp32; three 1024px references sit 1.07x above that line (1.09x in fp32) and decide it in bf16 and fp16; the 768px forward decides fp32's. The ten-reference forwards (45616 and 57904 tokens) do not fit 16 GB beside their weights, so the lines are measured up to 33328 tokens; the line reserves 1.07 to 1.16x the long sequences that fit. Klein Base demanded what Klein does. A process's first forward maps ~245 MiB beyond its second (625 against 380 MiB at 512px in bf16), which the cold forward each point takes the larger of carries into the envelope. Where this entry prices a platform nothing is measured on (MIOpen under hipMallocAsync on Windows), each value is floored at the legacy constants the node reserved by hand, 0.33 MiB per token truncated to 346030 bytes and a 1 GiB base: the fit describes the card its points were measured on, not the platforms it stands in for."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "values": {
+ "k_denoise_bf16_h3072": 220775,
+ "b_denoise_bf16_h3072": 193986560,
+ "k_denoise_fp16_h3072": 220775,
+ "b_denoise_fp16_h3072": 231735296,
+ "k_denoise_fp32_h3072": 428799,
+ "b_denoise_fp32_h3072": 0
+ },
+ "provenance": "Windows only, where expandable segments are Invoke's ROCm default. The FLUX.3 transformer forward's lines, bytes per attended token and sample plus a base, one per dtype (bf16, fp16, fp32) at width 3072, Klein and Klein Base alike. RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True, MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 (fused SDPA), ROCm SDPA guard installed. Measured by scripts/calibrate_flux3_denoise_working_memory.py on 2026-10-31 per dtype: 512, 768, 1024, 1440 and 2048px with a 560-token caption, 1024 and 1440px with an 80-token one, and at 1024px one, three and (bf16, fp16) ten 1024px reference images, a batch of two and Klein Base beside Klein, and in bf16 with --mode large long sequences: 2048px with one 2048px reference (33328 tokens), 1536px with one (26160), 2048px with three 1024px references (29232) and with ten (57904); forwards on a random-init transformer of the model loader's geometry (memory does not depend on weight values) with 2 per-mode blocks per stream and 2 joint blocks, one fresh process per point with the server's runtime, demand_peak (the largest of the driver, reserved and allocated peak) of the larger of a cold and a warm forward. Fitted by scripts/working_memory/build_shipped.py: working_memory/fit.py's upper envelope of the points below, plus 5%. Plain forwards take 0.167 MiB per token in bf16 and fp16 over a 0.22 GiB intercept, and 0.333 in fp32; three 1024px references sit 1.17x above that line in bf16 and fp16 and decide it there; one reference decides fp32's. The ten-reference forwards do not fit 16 GB beside their weights, so the lines are measured up to 33328 tokens; the line reserves 1.12 to 1.18x the long sequences that fit. Klein Base demanded what Klein does. 4 blocks per stream measured 4.2% more than 2 at 1024px (993 against 953 MiB in bf16), which the line covers at 1.17x. A process's first forward maps ~250 MiB beyond its second (493 against 244 MiB at 512px in bf16), which the cold forward each point takes the larger of carries into the envelope."
}
],
"points": [
@@ -6307,6 +6418,5347 @@
"method": "demand_peak",
"device": "RX 9060 XT (gfx1200)",
"provenance": "scripts/calibrate_flux2_denoise_working_memory.py, 2026-10-18: RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 (fused SDPA), ROCm SDPA guard installed. Random-init FLUX.2 transformer of width 4096 with the model loader's geometry (memory does not depend on weight values), 2 double-stream and 2 single-stream blocks; 4 blocks per stream measured 5 to 7% more than 2 at 1024px on this card (953 against 893 MiB at width 3072, 1193 against 1133 MiB at 4096, expandable segments; [dev] with 4 blocks does not fit 16 GB), which the 5% margin and the real models' lower demand cover. demand_peak: the largest of the driver, reserved and allocated peak over the baseline, the larger of a cold and a warm forward, one fresh process per point with the server's runtime; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 33328,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 6710886400,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 9216,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 26160,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5133828096,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 29232,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5972688896,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 57904,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 11156848640,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 301989888,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 520093696,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 822083584,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1677721600,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3271557120,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 754974720,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1459617792,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1895825408,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3422552064,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 45616,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8959033344,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1627389952,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 855638016,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein Base transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 301989888,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 520093696,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 822083584,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1677721600,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3271557120,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 754974720,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1459617792,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1744830464,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3422552064,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 45616,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8959033344,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1627389952,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 855638016,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein Base transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 547356672,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1151336448,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1855979520,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3198156800,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 6486491136,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1486880768,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2862612480,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3735027712,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 7358906368,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3701473280,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1889533952,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init FLUX.3 Klein Base transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 33328,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 9808379904,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 9216,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 26160,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8344567808,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 29232,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8615100416,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 57904,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 18744344576,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 452984832,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 855638016,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1411383296,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2638217216,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5102370816,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1289748480,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2160066560,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2619342848,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5465178112,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 45616,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 14933819392,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2816475136,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1411383296,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein Base transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 452984832,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 855638016,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1411383296,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2638217216,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5102370816,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1289748480,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2160066560,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2619342848,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5465178112,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 45616,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 14933819392,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2816475136,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1411383296,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein Base transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 689963008,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1277165568,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2281701376,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4294967296,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8357150720,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2088763392,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3751804928,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4223664128,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8887730176,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4615831552,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2281701376,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). Random-init FLUX.3 Klein Base transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 33328,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 6410338304,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 9216,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 26160,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5277876224,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 29232,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5927993344,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 517341184,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 706084864,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 999686144,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1649803264,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3201695744,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1041629184,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1775632384,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1880489984,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3746955264,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1733689344,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 999686144,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 553058304,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 741801984,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1035403264,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1685520384,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3237412864,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1077346304,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1811349504,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1916207104,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3782672384,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1769406464,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1035403264,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 638124032,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1120468992,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1749614592,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3133734912,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 6006833152,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1591279616,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2975399936,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3574136832,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 6594035712,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3343450112,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1749614592,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 33328,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 10050994176,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 9216,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 26160,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8566210560,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 29232,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8859811840,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 655753216,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1081475072,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1647706112,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2851471360,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5347082240,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1505099776,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2373320704,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2857762816,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5701500928,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3054895104,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1647706112,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 691470336,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1117192192,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1683423232,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2887188480,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5382799360,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1540816896,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2409037824,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2893479936,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5737218048,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3090612224,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1683423232,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 780730368,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1523122176,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2244542464,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4083744768,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 7873298432,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2075721728,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3891855360,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4337500160,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8561164288,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4385734656,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2244542464,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1411383296,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5102370816,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2619342848,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5465178112,
+ "method": "demand_peak",
+ "device": "RTX 4090",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): NVIDIA GeForce RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (torch reports the native allocator). The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1083572224,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3390439424,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2027290624,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3767926784,
+ "method": "demand_peak",
+ "device": "RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon RX 9060 XT (gfx1200), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Windows, PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1, ROCm SDPA guard installed. The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 613081088,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1038802944,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1609248768,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2815102976,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5300248576,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1466613760,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2336940032,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2817187840,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5662343168,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 45616,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 15141519360,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3014336512,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1609228288,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 607481856,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1033211904,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1603633152,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2809503744,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5294645248,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1453170688,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2323472384,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2811588608,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5656752128,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 45616,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 15135924224,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 3008729088,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1603637248,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in float16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 1024,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 1584,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1251053568,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 2304,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 2864,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1990565888,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2716192768,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 8660,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4559589376,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8338669568,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 4176,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2459971584,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 8100,
+ "reference_tokens": 0,
+ "text_tokens": 80,
+ "tokens": 8180,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4278222848,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4809154560,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 9032138752,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 2,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 4690063360,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": false,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "fp32",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2716180480,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein Base transformer in float32 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1609232384,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 4 per-mode blocks per stream and 4 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 33328,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 10006265856,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 9216,
+ "reference_tokens": 16384,
+ "text_tokens": 560,
+ "tokens": 26160,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8521461760,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 29232,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 8812285952,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 40960,
+ "text_tokens": 560,
+ "tokens": 57904,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 18910117888,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill."
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 4656,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 1073741824,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 1481396224,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. Random-init FLUX.3 Klein (flow map) transformer in bfloat16 with the model loader's geometry, 2 per-mode blocks per stream and 2 joint, SDPA forced onto the math kernel; memory does not depend on weight values. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 16384,
+ "reference_tokens": 0,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5299544064,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 4096,
+ "text_tokens": 560,
+ "tokens": 8752,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 2795532288,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
+ },
+ {
+ "estimator": "denoise.flux3",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "features": {
+ "hidden_size": 3072,
+ "flow_map": true,
+ "image_tokens": 4096,
+ "reference_tokens": 12288,
+ "text_tokens": 560,
+ "tokens": 16944,
+ "batch_size": 1,
+ "dtype": "bf16",
+ "streamed_layer_bytes": 0,
+ "score_matrix_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0
+ },
+ "measured_bytes": 5662351360,
+ "method": "demand_peak",
+ "device": "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "provenance": "scripts/calibrate_flux3_denoise_working_memory.py (2026-10-31): AMD Radeon Pro W7900 Dual Slot (gfx1100), torch 2.13.0+rocm10.0.0 (HIP 7.15.26333), Linux, no allocator configuration (torch reports the native allocator), MIOPEN_FIND_MODE=FAST, TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=unset, ROCm SDPA guard installed. The real FLUX.3 Klein (flow map) single file flux3_image_klein_sd_bf16.safetensors, loaded in bfloat16 through the model loader's conversion and fully resident. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no failed allocation, allocator retry or spill.",
+ "in_fit": false
}
]
}
diff --git a/invokeai/backend/working_memory/spec.py b/invokeai/backend/working_memory/spec.py
index 2afb662af8..19b9be7a7e 100644
--- a/invokeai/backend/working_memory/spec.py
+++ b/invokeai/backend/working_memory/spec.py
@@ -20,6 +20,7 @@ ESTIMATOR_MODULES: Final = (
"invokeai.backend.util.vae_working_memory",
"invokeai.backend.z_image.denoise_working_memory",
"invokeai.backend.flux2.denoise_working_memory",
+ "invokeai.backend.flux3.denoise_working_memory",
)
"""Every module that registers an `EstimatorSpec`. The registry holds only the specs of modules imported so far, so a
caller that needs all of them imports these (`import_estimator_modules`); `tests/backend/working_memory/` fails on a
diff --git a/scripts/calibrate_flux3_denoise_working_memory.py b/scripts/calibrate_flux3_denoise_working_memory.py
new file mode 100644
index 0000000000..e4b3b1a435
--- /dev/null
+++ b/scripts/calibrate_flux3_denoise_working_memory.py
@@ -0,0 +1,898 @@
+"""Measure the working memory of one FLUX.3 transformer forward, as shipped-data points for `denoise.flux3`.
+
+What a point measures
+---------------------
+The demand of one transformer forward, measured as a fresh window (`invokeai/backend/working_memory/measurement.py`,
+whose definitions the in-server probe's windows share). With the model and its inputs resident: synchronize, release the
+allocator's cached blocks, read the baseline and reset the peaks; run the forward; the demand is then the largest growth
+of three counters over the baseline: the driver's figure for this process, torch's reserved peak and its allocated peak.
+A forward whose allocations failed, or only succeeded after the allocator released its cache and retried (a squeezed
+peak), or after which Windows keeps more than `measurement.SPILL_TOLERANCE_BYTES` of the process in shared memory, is
+invalid: it is recorded as such, not as a point.
+
+Every point runs in a fresh process (`scripts/working_memory/fresh_points.py`, which the calibration scripts share),
+which first applies the server's runtime (`apply_server_runtime` in `invokeai/app/run_app.py`): the `MIOPEN_FIND_MODE`
+default, the integrated-GPU check, the allocator, the AOTriton decision and the monkeypatches, the ROCm SDPA guard among
+them, in the server's order. Its settings are those of a server without a config file, except the allocator
+configuration: `--alloc-conf`, or without one the platform default the server uses (expandable segments for ROCm on
+Windows, torch's native allocator elsewhere). This script's own process runs the integrated-GPU check once before the
+first point: the measuring processes inherit the `HIP_VISIBLE_DEVICES` it sets, which their own check keeps, as the
+server keeps an exported one. A measuring process is `sys.executable` running this file, so it imports `invokeai` from
+the interpreter that started the run.
+
+The forward then runs twice, cold and warm, and the point takes the larger demand (`measure_cold_and_warm` and
+`measured_bytes_and_method` in `measurement.py`): a `demand_peak` where both forwards read the driver's figure, else a
+`reserved_peak` of torch's counters alone.
+
+The transformer is diffusers' `Flux3Transformer2DModel` at the geometry the model loader reads off the released
+checkpoints (`flux3/conversion.py`: width 3072 in 24 heads of 128, a 20480-wide caption, feedforward ratio 3), with
+random weights in the measured dtype and the QK norms in float32, as the loader keeps them, because memory depends on
+shapes, not on weight values. It has 2 per-mode blocks per stream (`Flux3ModeTransformerBlock`, one stack each for the
+text, the image and the references) and 2 joint blocks (`Flux3SingleTransformerBlock`): a no-grad forward frees each
+block's intermediates, which `--extra-blocks 4` re-checks at 1024px. It is Klein, the flow map with its target-timestep
+embedder, unless a point says Klein Base. The inputs are what the node hands it: the image's tokens, the references'
+tokens on a stream of their own with their position ids, a caption, the timestep and, for Klein, the timestep the step
+jumps to, a sample of each per batch entry. A point carries the features of `estimate_flux3_denoise_working_memory`,
+taken in the measuring process after the runtime setup from the very transformer it measures, so its
+`score_matrix_bytes` reflects the attention kernel this build really runs.
+
+Each point is priced before it runs: the estimate for it plus its weights. It is skipped when that exceeds free device
+memory, unless `--force`. An oversized allocation does not always fail: where the driver backs it with system RAM
+(NVIDIA's sysmem fallback, AMD on Windows) it pages, which can stall the whole machine. `--dry-run` prints that price
+per point as a CPU prices it: a CPU is an unmeasured platform, so that is cuDNN's native-allocator entry floored at the
+legacy constants (`unmeasured_floor`).
+
+Modes
+-----
+- `fit` (default): the fit grid, in each of `--dtypes` (bfloat16, float16 and float32, the dtypes
+ `TorchDevice.choose_bfloat16_safe_dtype` runs the transformer in). The `--sizes` (512, 768, 1024, 1440, 2048 px) run
+ with a `--text-tokens` caption (560). Those among `--short-text-sizes` (1024, 1440) also run with a
+ `--short-text-tokens` caption (80), for the text slope. At 1024px, `--references` (1, 3 and 10; at most 3 in float32,
+ `FLOAT32_MAX_REFERENCES`) runs with that many `--reference-px` (1024) reference images, `--batches` (2) with that many
+ samples, and Klein Base beside Klein (unless `--no-base`). `--extra-blocks N` adds one forward with N blocks per
+ stream at 1024px, in the first dtype.
+- `large`: long sequences, in each of `--dtypes` (default bfloat16): 2048px with one 2048px reference, 33328 tokens with
+ a 560-token caption; 1536px with one 2048px reference, 26160; 2048px with three 1024px references, 29232; and 2048px
+ with ten, 57904. The node caps neither the image's side nor the references' (one of up to 4 MP, or ten of up to 1 MP
+ each); longer sequences price on the line extrapolated.
+- `math`: SDPA forced onto the math kernel at 1024px, next to the default kernel, in each of `--dtypes` (default
+ bfloat16): what a materialized score matrix costs per element, against what the estimate charges for it.
+- `real`: the released model itself, a `--checkpoint` bf16 safetensors single file in BFL's layout (Klein or Klein
+ Base, read off its keys), loaded through the model loader's conversion (`flux3_transformer_from_native`) straight onto
+ the device and fully resident: 1024 and 2048 px with a `--text-tokens` caption, and 1024 px with one and with three
+ `--reference-px` references. Each forward is set against the shipped 2-block point of the same features on this
+ platform and card, and against the shipped estimate, both as the calibration script prices it (fully resident) and as
+ the node prices it (the streamed largest layer included). Its weights take ~10.3 GiB beside the forward. It refuses
+ the options it would ignore, and any other checkpoint (GGUF, another dtype).
+
+ Its points are checks (`"fit": false`), and shipped they stay out of the fit: `build_shipped.py --points` takes them
+ as out-of-fit points, which bound their estimate from below only. The data test holds every shipped estimate to at
+ least each such point, and the builder refuses (exit 1) any refit that would price one below what it demanded. Such a
+ point never raises a line: only the fit points decide it.
+
+Captions are multiples of 80 tokens, as `flux3/text_encoding.py` pads them, and the transformer attends to the padding.
+80 is a short prompt's window; 560 the smallest multiple of 80 at or above the 512-token caption the FLUX.2 lines are
+measured with, a long prompt's. A reference image's tokens are what `flux3/ref_images.py` makes of it: resized as
+`fit_reference_image` resizes it (one reference to at most 4 MP, each of several to at most 1 MP), center-cropped to
+whole 16 px cells, one token per cell. A 1024px reference is 4096 tokens, a 2048px single one 16384.
+
+The fit grid's and the large grid's points are fit points (`"fit": true`): the plain forwards, reference images, batches
+and Klein Base included, which the estimator's line admits (`denoise_working_memory._line`). The checks' points, the
+extra-blocks and the real model's forwards included, test analytic terms or assumptions rather than the line: they are
+marked `"fit": false`, and their `in_fit` is false. A fit point is `in_fit` only where the line admits its features: on
+a build whose SDPA kernel materializes the score matrix, the fit grid's forwards carry a score term on top of the line,
+so they measure that term rather than the line, as a check does.
+
+Output
+------
+Every measured point is appended to `--out` as one JSON object per line, the point file
+`scripts/working_memory/build_shipped.py --points` reads. It carries the fields of a `MeasuredPoint`
+(`invokeai/backend/working_memory/coefficients.py`):
+
+- `estimator`, `version` and `features`, the estimate's own;
+- `platform`, as `platform_for` gives it, OS included; the builder names the OS only where the data needs it;
+- `measured_bytes` (the demand), `method`, `device` and `in_fit`;
+- `provenance`, which names the GPU, the torch build, the OS, the allocator configuration, on ROCm `MIOPEN_FIND_MODE`,
+ the AOTriton switch and the SDPA guard, the variant, the block count and the date.
+
+The other keys are the script's, which the builder ignores: `fit`, `point` (the grid entry) and `raw` (each forward's
+counter deltas, the prediction and the runtime facts). An invalid, skipped or failed forward is no point: it shows in
+the table on stdout, with its reasons, and stays out of the file.
+
+Usage
+-----
+RTX 4090 (CUDA): the native allocator, then `cudaMallocAsync`; the math check once.
+
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 4090-native.jsonl --extra-blocks 4
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 4090-native-large.jsonl --mode large
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 4090-async.jsonl --alloc-conf backend:cudaMallocAsync
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 4090-async-large.jsonl --mode large \
+ --alloc-conf backend:cudaMallocAsync
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 4090-checks.jsonl --mode math
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 4090-real.jsonl --mode real \
+ --checkpoint E:/ModelStuffSSD/flux-3-image-klein-comfy/diffusion_models/flux3_image_klein_sd_bf16.safetensors
+
+RX 9060 XT (ROCm on Windows): the server's default expandable segments, then the native allocator; the math check once.
+
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 9060xt-expandable.jsonl --extra-blocks 4
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 9060xt-expandable-large.jsonl --mode large
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 9060xt-native.jsonl \
+ --alloc-conf expandable_segments:False
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 9060xt-native-large.jsonl --mode large \
+ --alloc-conf expandable_segments:False
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 9060xt-checks.jsonl --mode math
+ python scripts/calibrate_flux3_denoise_working_memory.py --out 9060xt-real.jsonl --mode real \
+ --checkpoint E:/ModelStuffSSD/flux-3-image-klein-comfy/diffusion_models/flux3_image_klein_sd_bf16.safetensors
+
+Radeon Pro W7900 (ROCm on Linux): the server's default native allocator; the math check once.
+
+ python scripts/calibrate_flux3_denoise_working_memory.py --out w7900-native.jsonl --extra-blocks 4
+ python scripts/calibrate_flux3_denoise_working_memory.py --out w7900-native-large.jsonl --mode large
+ python scripts/calibrate_flux3_denoise_working_memory.py --out w7900-checks.jsonl --mode math
+ python scripts/calibrate_flux3_denoise_working_memory.py --out w7900-real.jsonl --mode real \
+ --checkpoint flux3_image_klein_sd_bf16.safetensors
+
+`--dry-run` prints the planned points without touching a device, each priced as a CPU prices it, e.g.
+
+ python scripts/calibrate_flux3_denoise_working_memory.py --dry-run --mode large
+"""
+
+import argparse
+import dataclasses
+import datetime
+import json
+import struct
+import sys
+from collections.abc import Mapping, Sequence
+from contextlib import nullcontext
+from dataclasses import dataclass
+from pathlib import Path
+from typing import TYPE_CHECKING, Any, Literal
+
+# None of these imports torch: a measuring process has to configure the allocator before torch is imported.
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+from scripts.working_memory import fresh_points # noqa: E402
+
+if TYPE_CHECKING:
+ import torch
+
+ from invokeai.backend.working_memory.estimate import WorkingMemoryEstimate
+
+GIB = 2**30
+MIB = 2**20
+
+CELL_PX = 16
+"""One token per 16x16 pixel cell: the VAE's 8x downsampling times the 2x2 packing."""
+TEXT_PAD_MULTIPLE = 80
+"""`flux3/text_encoding.py` pads every caption to a multiple of this; kept literal so no torch import is needed."""
+MAX_TEXT_TOKENS = 8192
+MAX_REFERENCES = 10
+GEOMETRY: Mapping[str, Any] = {
+ "in_channels": 128,
+ "cond_in_channels": 128,
+ "attention_head_dim": 128,
+ "num_attention_heads": 24,
+ "joint_attention_dim": 20480,
+ "timestep_channels": 256,
+ "mlp_ratio": 3.0,
+ "axes_dims_rope": (32, 32, 32, 32),
+}
+"""What `flux3/conversion.py`'s `flux3_transformer_config` reads off the released Klein and Klein Base checkpoints,
+less the block counts and the flow map, which a point sets."""
+CHECK_PX = 1024
+"""The size the reference, batch, Klein Base and extra-blocks points and the checks run at."""
+REFERENCE_PX = 1024
+"""The fit grid's reference images' side, `--reference-px`'s default."""
+LARGE_GRID = ((2048, 1, 2048), (1536, 1, 2048), (2048, 3, 1024), (2048, 10, 1024))
+"""The large grid's forwards: image side, reference count and reference side."""
+DTYPES = ("bfloat16", "float16", "float32")
+"""The dtypes `TorchDevice.choose_bfloat16_safe_dtype` runs the transformer in."""
+FLOAT32_MAX_REFERENCES = 3
+"""The most references a float32 fit-grid forward attends to. The RTX 4090's float32 lines price ten (45616 tokens) at
+19.4 GiB under `cudaMallocAsync` and 23.4 under the native allocator, which with 4.7 GiB of float32 weights at 2 blocks
+is more than its 24 GB hold, so a run there skips them. At most three (16944 tokens) keep the float32 grid the same on
+every card."""
+REAL_GRID = ((1024, 0), (2048, 0), (1024, 1), (1024, 3))
+"""The real model's forwards: image side and reference count."""
+REAL_DTYPE = "bfloat16"
+"""The dtype the real model is measured in: the released single file's, and the node's on every measured card."""
+FLOW_MAP_KEY = "ref_time_in.in_layer.weight"
+"""`flux3/conversion.py`'s `FLUX3_NATIVE_FLOW_MAP_KEY`, kept literal so the driving process imports no torch: only the
+step-distilled checkpoint has it."""
+TIMESTEP = 0.5
+TARGET_TIMESTEP = 0.4
+
+LOGGER_NAME = "calibrate_flux3_denoise_working_memory"
+
+Kind = Literal["fit", "blocks", "baseline", "math", "real"]
+Mode = Literal["fit", "large", "math", "real"]
+
+
+@dataclass(frozen=True)
+class Point:
+ """One transformer forward to measure, in a process of its own."""
+
+ kind: Kind
+ """`fit` for a point of the fit grid; otherwise the check it serves: another block count (`blocks`), the
+ default-kernel forward a check compares with (`baseline`), the forced math kernel (`math`) or the released model
+ (`real`)."""
+ dtype: str
+ """A torch dtype name, one of `DTYPES`."""
+ px: int
+ text_tokens: int
+ references: int = 0
+ """How many reference images of `reference_px` square the forward attends to."""
+ reference_px: int = REFERENCE_PX
+ batch: int = 1
+ blocks: int = 2
+ """Per-mode blocks per stream, and joint blocks; a real point's checkpoint sets its own."""
+ flow_map: bool = True
+ """Klein, the step-distilled flow map; False for Klein Base."""
+ force_math: bool = False
+ checkpoint: str = ""
+ """A `real` point's single file; empty for a random-init transformer of `blocks` blocks."""
+
+ @property
+ def fit(self) -> bool:
+ return self.kind == "fit"
+
+
+def image_tokens(px: int) -> int:
+ """A square image's tokens: one per 16x16 cell."""
+ side = px // CELL_PX
+ return side * side
+
+
+def reference_grids(point: Point) -> list[tuple[int, int]]:
+ """Each reference's token grid, rows by columns, as `flux3/ref_images.py` sizes it: resized as
+ `fit_reference_image` resizes one of `point.references`, center-cropped to whole 16 px cells."""
+ if not point.references:
+ return []
+ from PIL import Image
+
+ from invokeai.backend.flux3.ref_images import fit_reference_image
+
+ fitted = fit_reference_image(Image.new("RGB", (point.reference_px, point.reference_px)), point.references)
+ return [(fitted.height // CELL_PX, fitted.width // CELL_PX)] * point.references
+
+
+def reference_tokens(point: Point) -> int:
+ return sum(rows * columns for rows, columns in reference_grids(point))
+
+
+def checkpoint_header(path: str) -> dict[str, Any]:
+ """A safetensors file's header: per tensor its dtype, shape and offsets, read without torch."""
+ with open(path, "rb") as file:
+ (length,) = struct.unpack("<Q", file.read(8))
+ header = json.loads(file.read(length))
+ header.pop("__metadata__", None)
+ return header
+
+
+def checkpoint_is_flow_map(path: str) -> bool:
+ """Whether a single file in BFL's layout is Klein, the flow map, rather than Klein Base, under any key prefix."""
+ return any(key.endswith(FLOW_MAP_KEY) for key in checkpoint_header(path))
+
+
+def checkpoint_problem(path: str) -> str | None:
+ """Why real mode cannot measure `path`, or None: it measures a bf16 safetensors single file in BFL's layout."""
+ if Path(path).suffix != ".safetensors":
+ return f"{path} is no safetensors single file (a GGUF build is not measured in real mode)"
+ dtypes = sorted({entry["dtype"] for entry in checkpoint_header(path).values()} - {"BF16"})
+ return f"{path} holds {', '.join(dtypes)} tensors; real mode measures a bf16 single file" if dtypes else None
+
+
+REAL_MODE_IGNORES = (
+ "dtypes",
+ "sizes",
+ "short_text_tokens",
+ "short_text_sizes",
+ "references",
+ "batches",
+ "no_base",
+ "blocks",
+ "extra_blocks",
+)
+"""The options real mode has no use for: it measures `REAL_GRID` in `REAL_DTYPE` on the checkpoint's own blocks."""
+
+
+def plan(
+ mode: Mode,
+ *,
+ dtypes: Sequence[str],
+ sizes: Sequence[int],
+ text_tokens: int,
+ short_text_tokens: int,
+ short_text_sizes: Sequence[int],
+ references: Sequence[int],
+ batches: Sequence[int],
+ blocks: int,
+ extra_blocks: int,
+ base: bool = True,
+ reference_px: int = REFERENCE_PX,
+ checkpoint: str = "",
+) -> list[Point]:
+ """The forwards a run measures, in order: per dtype, the fit grid, the large grid or the math check's pair of
+ forwards; in fit mode then the extra-blocks forward, in the first dtype; in real mode the real model's forwards of
+ `checkpoint`, in `REAL_DTYPE`."""
+ if mode == "real":
+ flow_map = checkpoint_is_flow_map(checkpoint)
+ return [
+ Point(
+ "real",
+ REAL_DTYPE,
+ px,
+ text_tokens,
+ references=n,
+ reference_px=reference_px,
+ flow_map=flow_map,
+ checkpoint=checkpoint,
+ )
+ for px, n in REAL_GRID
+ ]
+ points: list[Point] = []
+ for dtype in dtypes:
+ if mode == "large":
+ points += [
+ Point("fit", dtype, px, text_tokens, references=n, reference_px=ref_px, blocks=blocks)
+ for px, n, ref_px in LARGE_GRID
+ ]
+ continue
+ if mode == "math":
+ points.append(Point("baseline", dtype, CHECK_PX, text_tokens, blocks=blocks))
+ points.append(Point("math", dtype, CHECK_PX, text_tokens, blocks=blocks, force_math=True))
+ continue
+ points += [Point("fit", dtype, px, text_tokens, blocks=blocks) for px in sizes]
+ points += [Point("fit", dtype, px, short_text_tokens, blocks=blocks) for px in sizes if px in short_text_sizes]
+ points += [
+ Point("fit", dtype, CHECK_PX, text_tokens, references=n, reference_px=reference_px, blocks=blocks)
+ for n in references
+ if n and (dtype != "float32" or n <= FLOAT32_MAX_REFERENCES)
+ ]
+ points += [Point("fit", dtype, CHECK_PX, text_tokens, batch=n, blocks=blocks) for n in batches if n != 1]
+ if base:
+ points.append(Point("fit", dtype, CHECK_PX, text_tokens, blocks=blocks, flow_map=False))
+ if mode == "fit" and extra_blocks:
+ points.append(Point("blocks", dtypes[0], CHECK_PX, text_tokens, blocks=extra_blocks))
+ return points
+
+
+def provenance(point: Point, facts: Mapping[str, Any], date: str) -> str:
+ """A measured point's `provenance`: where and how it was measured."""
+ regime = ", SDPA forced onto the math kernel" if point.force_math else ""
+ variant = "Klein (flow map)" if point.flow_map else "Klein Base"
+ blocks = f"{point.blocks} per-mode block{'' if point.blocks == 1 else 's'} per stream and {point.blocks} joint"
+ model = (
+ f"The real FLUX.3 {variant} single file {Path(point.checkpoint).name}, loaded in {point.dtype} through the "
+ "model loader's conversion and fully resident"
+ if point.checkpoint
+ else f"Random-init FLUX.3 {variant} transformer in {point.dtype} with the model loader's geometry, {blocks}"
+ f"{regime}; memory does not depend on weight values"
+ )
+ return (
+ f"scripts/calibrate_flux3_denoise_working_memory.py ({date}): {fresh_points.runtime_provenance(facts)}. "
+ f"{model}. A fresh process with the server's runtime, the larger demand of a cold and a warm forward; no "
+ "failed allocation, allocator retry or spill."
+ )
+
+
+# Everything below imports torch. In a measuring process it runs only after `fresh_points.apply_server_runtime`.
+
+
+def _transformer(point: Point) -> "torch.nn.Module":
+ """The FLUX.3 transformer of the point's variant, block count and dtype, on the meta device: as the model loader
+ builds it, the QK norms in float32. A real point's has the geometry its checkpoint's shapes give, as the loader
+ reads them (`_build_transformer`)."""
+ import torch
+ from diffusers import Flux3Transformer2DModel
+
+ from invokeai.backend.model_manager.checkpoint_prefix import CheckpointPrefix
+ from invokeai.backend.model_manager.load.model_loaders.flux3 import _build_transformer, _keep_qk_norms_in_fp32
+
+ if point.checkpoint:
+ shapes = {key: _Shape(tuple(entry["shape"])) for key, entry in checkpoint_header(point.checkpoint).items()}
+ model = _build_transformer(CheckpointPrefix.detect(shapes).strip(shapes))
+ if bool(model.config.flow_map) != point.flow_map:
+ raise SystemExit(f"{point.checkpoint} is not the variant the point names (flow_map={point.flow_map}).")
+ else:
+ with torch.device("meta"):
+ model = Flux3Transformer2DModel(
+ **GEOMETRY, num_layers=point.blocks, num_single_layers=point.blocks, flow_map=point.flow_map
+ )
+ # torch's own cast: diffusers' `ModelMixin.to` warns about the QK norms, which the next line keeps in float32.
+ model = torch.nn.Module.to(model, getattr(torch, point.dtype))
+ _keep_qk_norms_in_fp32(model)
+ return model
+
+
+@dataclass(frozen=True)
+class _Shape:
+ """A header entry's shape, which is all `flux3_transformer_config` reads of a tensor."""
+
+ shape: tuple[int, ...]
+
+
+def _load_real(point: Point, device: "torch.device") -> "torch.nn.Module":
+ """The point's checkpoint, built as `Flux3CheckpointModel` builds it (`flux3_transformer_from_native`), except
+ straight onto `device` and outside the RAM cache."""
+ import torch
+ from safetensors.torch import load_file
+
+ from invokeai.backend.model_manager.load.model_loaders.flux3 import flux3_transformer_from_native
+
+ model = flux3_transformer_from_native(load_file(point.checkpoint, device=str(device)), getattr(torch, point.dtype))
+ return model.eval()
+
+
+def _weight_bytes(transformer: "torch.nn.Module") -> int:
+ """A meta-device transformer's weights as they will be allocated."""
+ return sum(param.numel() * param.element_size() for param in transformer.parameters())
+
+
+def _estimate(
+ point: Point, device: "torch.device", transformer: "torch.nn.Module", *, resident: bool = True
+) -> "WorkingMemoryEstimate":
+ """The estimate for the point's forward on `device`, priced in the kernel regime the caller holds: fully resident,
+ as measured, unless `resident` is False, as the node prices it."""
+ import torch
+
+ from invokeai.backend.flux3.denoise_working_memory import estimate_flux3_denoise_working_memory
+
+ return estimate_flux3_denoise_working_memory(
+ transformer,
+ image_seq_len=image_tokens(point.px),
+ ref_image_seq_len=reference_tokens(point),
+ text_seq_len=point.text_tokens,
+ batch_size=point.batch,
+ # Measured whole on the device: nothing is streamed per forward.
+ weights_resident=resident,
+ device=device,
+ dtype=getattr(torch, point.dtype),
+ )
+
+
+def _inputs(point: Point, device: "torch.device") -> dict[str, Any]:
+ """What the node hands the transformer per forward (`flux3/denoise.py`): the image's tokens, the references' on a
+ stream of their own with their position ids, a caption, the timestep and, for Klein, the timestep it jumps to,
+ `point.batch` samples of each."""
+ import torch
+
+ from invokeai.backend.flux3.sampling import image_position_ids, text_position_ids
+
+ dtype = getattr(torch, point.dtype)
+ side = point.px // CELL_PX
+ inputs: dict[str, Any] = {
+ "hidden_states": torch.randn(point.batch, side * side, GEOMETRY["in_channels"], device=device, dtype=dtype),
+ "encoder_hidden_states": torch.randn(
+ point.batch, point.text_tokens, GEOMETRY["joint_attention_dim"], device=device, dtype=dtype
+ ),
+ "timestep": torch.full((point.batch,), TIMESTEP, device=device, dtype=dtype),
+ "img_ids": image_position_ids(side, side, l_coord=0, device=device),
+ "txt_ids": text_position_ids(point.text_tokens, device=device),
+ "target_timestep": torch.full((point.batch,), TARGET_TIMESTEP, device=device, dtype=dtype)
+ if point.flow_map
+ else None,
+ "return_dict": False,
+ }
+ grids = reference_grids(point)
+ if grids:
+ inputs["image_cond_hidden_states"] = torch.randn(
+ point.batch, reference_tokens(point), GEOMETRY["cond_in_channels"], device=device, dtype=dtype
+ )
+ inputs["image_cond_ids"] = torch.cat(
+ [
+ image_position_ids(rows, columns, l_coord=-(1 + index), device=device)
+ for index, (rows, columns) in enumerate(grids)
+ ]
+ )
+ return inputs
+
+
+def _measure(point: Point, force: bool) -> dict[str, Any]:
+ """The output line of `point`, measured in this process after `fresh_points.apply_server_runtime`."""
+ import torch
+ from torch.nn.attention import SDPBackend, sdpa_kernel
+
+ from invokeai.backend.flux3 import denoise_working_memory
+ from invokeai.backend.util.devices import TorchDevice
+ from invokeai.backend.working_memory.measurement import measure_cold_and_warm
+ from invokeai.backend.working_memory.platform import platform_for
+
+ # The device the node itself takes.
+ device = TorchDevice.choose_torch_device()
+ if device.type != "cuda":
+ raise SystemExit(f"Needs a CUDA or ROCm device; this process would run on {device}.")
+
+ def kernel():
+ return sdpa_kernel(SDPBackend.MATH) if point.force_math else nullcontext()
+
+ with torch.inference_mode():
+ transformer = _transformer(point)
+ # In the forward's kernel regime, so the score matrix is priced for the kernel that runs.
+ with kernel():
+ estimate = _estimate(point, device, transformer)
+ platform = platform_for(device)
+ facts = fresh_points.runtime_facts(device, platform.os, denoise_working_memory.__file__)
+ common = {
+ "estimator": estimate.estimator,
+ "version": estimate.version,
+ "platform": dataclasses.asdict(platform),
+ "features": dict(estimate.features),
+ "device": facts["device"],
+ }
+
+ weights = _weight_bytes(transformer)
+ free, _ = TorchDevice.cuda_mem_get_info(device)
+ raw = {
+ "reservation_bytes": estimate.reservation_bytes,
+ "weight_bytes": weights,
+ "predicted_bytes": estimate.reservation_bytes + weights,
+ "free_bytes": free,
+ "runtime": facts,
+ }
+ if point.checkpoint:
+ raw["node_reservation_bytes"] = _estimate(point, device, transformer, resident=False).reservation_bytes
+ if raw["predicted_bytes"] > free and not force:
+ return fresh_points.skipped_line(point, common, raw)
+
+ if point.checkpoint:
+ transformer = _load_real(point, device)
+ else:
+ # Allocated directly on the device in the dtypes the meta model holds and randomly initialized, so no
+ # block passes through the host in float32 first.
+ transformer = transformer.to_empty(device=device)
+ for param in transformer.parameters():
+ torch.nn.init.normal_(param, std=0.02)
+ transformer.eval()
+ inputs = _inputs(point, device)
+
+ def forward() -> object:
+ with kernel():
+ return transformer(**inputs)
+
+ windows = measure_cold_and_warm(device, forward)
+ date = datetime.date.today().isoformat()
+ return fresh_points.point_line(
+ point, common=common, provenance=provenance(point, facts, date), windows=windows, raw=raw
+ )
+
+
+_COLUMNS = (
+ f"{'kind':>8} {'dtype':>8} {'base':>4} {'blocks':>6} {'px':>5} {'text':>5} {'refs':>4} {'ref px':>6} "
+ f"{'batch':>5} {'tokens':>7}"
+)
+
+
+def _grid(point: Mapping[str, Any]) -> str:
+ return (
+ f"{point['kind']:>8} {point['dtype']:>8} {'' if point['flow_map'] else 'yes':>4} "
+ f"{'ckpt' if point['checkpoint'] else point['blocks']:>6} "
+ f"{point['px']:>5} {point['text_tokens']:>5} {point['references']:>4} "
+ f"{point['reference_px'] if point['references'] else '':>6} {point['batch']:>5}"
+ )
+
+
+def _attended(line: Mapping[str, Any]) -> int:
+ """The tokens of every sample of a measured line: its size on the line."""
+ return line["features"]["tokens"] * line["features"]["batch_size"]
+
+
+def _head(line: Mapping[str, Any]) -> str:
+ """A line's grid columns in the table."""
+ return f"{_grid(line['point'])} {_attended(line) if 'features' in line else '':>7}"
+
+
+def _px(line: Mapping[str, Any]) -> int:
+ return line["point"]["px"]
+
+
+_SHAPE = ("dtype", "px", "text_tokens", "references", "reference_px", "batch")
+"""What makes two grid points the same forward but for the variant or the block count."""
+
+
+def _same_shape(line: Mapping[str, Any], other: Mapping[str, Any]) -> bool:
+ return all(line["point"][key] == other["point"][key] for key in _SHAPE)
+
+
+def _summarize_fit(lines: Sequence[Mapping[str, Any]], text_tokens: int) -> None:
+ measured = [line for line in lines if line["status"] == "point"]
+ grid = [line for line in measured if line["fit"]]
+ # The line's slopes from the points that fit it; the extra-blocks forward compares with any grid point.
+ fit = [line for line in grid if line["in_fit"]]
+ for dtype in dict.fromkeys(line["point"]["dtype"] for line in fit):
+ of_dtype = [line for line in fit if line["point"]["dtype"] == dtype]
+ plain = [
+ line
+ for line in of_dtype
+ if line["point"]["references"] == 0 and line["point"]["batch"] == 1 and line["point"]["flow_map"]
+ ]
+ main = sorted((line for line in plain if line["point"]["text_tokens"] == text_tokens), key=_attended)
+ for line in main:
+ print(f"{dtype}, {_px(line)}px: {line['measured_bytes'] / _attended(line) / MIB:.4f} MiB per token")
+ if len(main) < 2:
+ continue
+ lo, hi = main[0], main[-1]
+ slope = (hi["measured_bytes"] - lo["measured_bytes"]) / (_attended(hi) - _attended(lo))
+ base = lo["measured_bytes"] - slope * _attended(lo)
+ print(f"{dtype}, {_px(lo)}-{_px(hi)}px: {slope / MIB:.4f} MiB per token, intercept {base / GIB:.3f} GiB")
+ # Reference images, batches and Klein Base sit on the same line, which `build_shipped.py` fits on all of them.
+ for line in of_dtype:
+ if line in main:
+ continue
+ on_line = base + slope * _attended(line)
+ point = line["point"]
+ print(
+ f"{dtype}{'' if point['flow_map'] else ' Klein Base'}, {_px(line)}px, {point['text_tokens']} text, "
+ f"{point['references']} references, batch {point['batch']}: {line['measured_bytes'] / GIB:.3f} GiB "
+ f"at {_attended(line)} tokens, {line['measured_bytes'] / on_line:.3f}x the {_px(lo)}-{_px(hi)}px line"
+ )
+ for line in (line for line in grid if not line["point"]["flow_map"]):
+ klein = next((ref for ref in grid if ref["point"]["flow_map"] and _same_shape(ref, line)), None)
+ if klein is not None:
+ extra = line["measured_bytes"] - klein["measured_bytes"]
+ print(
+ f"Klein Base against Klein, {line['point']['dtype']}, {_px(line)}px: {extra / MIB:+.0f} MiB "
+ f"({line['measured_bytes'] / klein['measured_bytes']:.3f}x)"
+ )
+ for line in (line for line in measured if line["point"]["kind"] == "blocks"):
+ base_line = next((ref for ref in grid if ref["point"]["flow_map"] and _same_shape(ref, line)), None)
+ if base_line is not None:
+ extra = line["measured_bytes"] - base_line["measured_bytes"]
+ print(
+ f"{line['point']['blocks']} against {base_line['point']['blocks']} blocks per stream, "
+ f"{line['point']['dtype']}, {_px(line)}px: {extra / MIB:+.0f} MiB "
+ f"({line['measured_bytes'] / base_line['measured_bytes']:.3f}x)"
+ )
+
+
+def _summarize_large(lines: Sequence[Mapping[str, Any]]) -> None:
+ for line in (line for line in lines if line["status"] == "point"):
+ point, reserved = line["point"], line["raw"]["reservation_bytes"]
+ print(
+ f"{point['dtype']}, {_px(line)}px + {point['references']}x{point['reference_px']}px: "
+ f"{line['measured_bytes'] / GIB:.3f} GiB at {_attended(line)} tokens, "
+ f"{line['measured_bytes'] / _attended(line) / MIB:.4f} MiB per token; the shipped estimate reserves "
+ f"{reserved / GIB:.3f} GiB ({reserved / line['measured_bytes']:.3f}x)"
+ )
+
+
+def _summarize_checks(lines: Sequence[Mapping[str, Any]]) -> None:
+ from invokeai.backend.util.attention import SDPA_MATH_BYTES_PER_SCORE_ELEMENT
+
+ measured = [line for line in lines if line["status"] == "point"]
+ for line in (line for line in measured if line["point"]["kind"] == "math"):
+ point = line["point"]
+ baseline = next(
+ (ref for ref in measured if ref["point"]["kind"] == "baseline" and ref["point"]["dtype"] == point["dtype"]),
+ None,
+ )
+ if baseline is None:
+ print(f"math kernel, {point['dtype']}: no default-kernel forward to compare with")
+ continue
+ extra = line["measured_bytes"] - baseline["measured_bytes"]
+ charged = line["raw"]["reservation_bytes"] - baseline["raw"]["reservation_bytes"]
+ tokens = line["features"]["tokens"]
+ elements = GEOMETRY["num_attention_heads"] * line["features"]["batch_size"] * tokens * tokens
+ print(
+ f"math kernel, {point['dtype']}, {point['px']}px: {extra / GIB:.3f} GiB over the default kernel, "
+ f"{extra / elements:.2f} bytes per score element; the estimate adds {charged / GIB:.3f} GiB "
+ f"({SDPA_MATH_BYTES_PER_SCORE_ELEMENT} bytes per element, one chunk where the ROCm guard chunks)"
+ )
+
+
+def _summarize_real(lines: Sequence[Mapping[str, Any]]) -> None:
+ """Each real forward against the shipped 2-block point of the same features on this platform and card, and against
+ the shipped estimate, fully resident and as the node prices it."""
+ from invokeai.backend.working_memory.coefficients import shipped_data
+
+ shipped = [point for data in shipped_data().values() for point in data.points]
+ for line in (line for line in lines if line["status"] == "point"):
+ point, raw, demand = line["point"], line["raw"], line["measured_bytes"]
+ shape = f"{_px(line)}px + {point['references']}x{point['reference_px']}px, {point['text_tokens']} text"
+ two_block = next(
+ (
+ ref
+ for ref in shipped
+ if ref.in_fit
+ and ref.estimator == line["estimator"]
+ # Shipped points name the card short (`RTX 4090`), the measuring process as the driver does.
+ and ref.device in line["device"]
+ and ref.features == line["features"]
+ and ref.platform.items() <= line["platform"].items()
+ ),
+ None,
+ )
+ against = (
+ f"{demand / two_block.measured_bytes:.3f}x the shipped 2-block point ({two_block.measured_bytes / GIB:.3f} "
+ "GiB)"
+ if two_block is not None
+ else "no shipped 2-block point of these features on this platform and card"
+ )
+ print(
+ f"real {point['dtype']}, {shape}: {demand / GIB:.3f} GiB at {_attended(line)} tokens, {against}; the "
+ f"shipped estimate reserves {raw['reservation_bytes'] / demand:.3f}x it fully resident, "
+ f"{raw['node_reservation_bytes'] / demand:.3f}x with the streamed layer the node adds"
+ )
+
+
+def _print_plan(points: Sequence[Point]) -> None:
+ """The planned points, each priced as a CPU prices it, plus the weights: the estimate with cuDNN's native-allocator
+ values floored at the legacy constants, as every unmeasured platform's, the forced math kernel's score matrix
+ included."""
+ import torch
+ from torch.nn.attention import SDPBackend, sdpa_kernel
+
+ print(f"{_COLUMNS} {'estimate GiB':>12} {'weights GiB':>11} {'total GiB':>9}")
+ cpu = torch.device("cpu")
+ models: dict[tuple[str, int, bool, str], torch.nn.Module] = {}
+ for point in points:
+ geometry = (point.dtype, point.blocks, point.flow_map, point.checkpoint)
+ if geometry not in models:
+ models[geometry] = _transformer(point)
+ transformer = models[geometry]
+ with sdpa_kernel(SDPBackend.MATH) if point.force_math else nullcontext():
+ estimate = _estimate(point, cpu, transformer)
+ weights = _weight_bytes(transformer)
+ tokens = estimate.features["tokens"] * point.batch
+ print(
+ f"{_grid(dataclasses.asdict(point))} {tokens:>7} {estimate.reservation_bytes / GIB:>12.2f} "
+ f"{weights / GIB:>11.2f} {(estimate.reservation_bytes + weights) / GIB:>9.2f}"
+ f"{' forced math' if point.force_math else ''}"
+ )
+ print(f"{len(points)} forwards, one process each")
+
+
+def _ints(text: str) -> list[int]:
+ try:
+ return [int(part) for part in text.split(",") if part.strip()]
+ except ValueError:
+ raise argparse.ArgumentTypeError(f"not a comma-separated list of integers: {text!r}")
+
+
+def _sizes(text: str) -> list[int]:
+ sizes = _ints(text)
+ if any(px <= 0 or px % CELL_PX for px in sizes):
+ raise argparse.ArgumentTypeError(f"sizes must be positive multiples of {CELL_PX} px, got {text!r}")
+ return sizes
+
+
+def _caption(text: str) -> int:
+ try:
+ tokens = int(text)
+ except ValueError:
+ raise argparse.ArgumentTypeError(f"not a token count: {text!r}")
+ if tokens <= 0 or tokens % TEXT_PAD_MULTIPLE or tokens > MAX_TEXT_TOKENS:
+ raise argparse.ArgumentTypeError(
+ f"a caption is a positive multiple of {TEXT_PAD_MULTIPLE} tokens up to {MAX_TEXT_TOKENS}, as the node "
+ f"pads it, got {tokens}"
+ )
+ return tokens
+
+
+def _dtypes(text: str) -> list[str]:
+ names = [part.strip() for part in text.split(",") if part.strip()]
+ if not names or not set(names) <= set(DTYPES):
+ raise argparse.ArgumentTypeError(f"dtypes must be among {', '.join(DTYPES)}, got {text!r}")
+ return names
+
+
+def _side(text: str) -> int:
+ try:
+ side = int(text)
+ except ValueError:
+ raise argparse.ArgumentTypeError(f"not a side length in px: {text!r}")
+ if side < CELL_PX:
+ raise argparse.ArgumentTypeError(f"a reference must be at least {CELL_PX} px, got {side}")
+ return side
+
+
+def _references(text: str) -> list[int]:
+ counts = _ints(text)
+ if any(count < 0 or count > MAX_REFERENCES for count in counts):
+ raise argparse.ArgumentTypeError(f"reference counts must lie between 0 and {MAX_REFERENCES}, got {text!r}")
+ return counts
+
+
+def _counts(text: str) -> list[int]:
+ counts = _ints(text)
+ if any(count < 0 for count in counts):
+ raise argparse.ArgumentTypeError(f"counts must not be negative, got {text!r}")
+ return counts
+
+
+def main(argv: Sequence[str] | None = None) -> None:
+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
+ parser.add_argument("--mode", choices=("fit", "large", "math", "real"), default="fit", help="Default: fit.")
+ parser.add_argument("--checkpoint", default="", help="Real mode: the FLUX.3 single file to measure.")
+ parser.add_argument("--out", type=Path, help="The JSON-lines file the lines are appended to. Required to measure.")
+ parser.add_argument(
+ "--dtypes", type=_dtypes, help="Transformer dtypes. Default: all three in fit mode, bfloat16 otherwise."
+ )
+ parser.add_argument("--sizes", type=_sizes, default="512,768,1024,1440,2048", help="The fit grid's sizes, px.")
+ parser.add_argument("--text-tokens", type=_caption, default=560, help="The caption at every size. Default 560.")
+ parser.add_argument("--short-text-tokens", type=_caption, default=80, help="The text-slope caption. Default 80.")
+ parser.add_argument(
+ "--short-text-sizes", type=_sizes, default="1024,1440", help="Fit sizes that also run the text-slope caption."
+ )
+ parser.add_argument(
+ "--references", type=_references, default="1,3,10", help="Reference images at 1024px, each run. Default 1,3,10."
+ )
+ parser.add_argument(
+ "--reference-px", type=_side, default=REFERENCE_PX, help="The fit grid's reference side, px. Default 1024."
+ )
+ parser.add_argument("--batches", type=_counts, default="2", help="Batch sizes at 1024px beyond 1. Default 2.")
+ parser.add_argument("--no-base", action="store_true", help="Fit mode: leave out the Klein Base forward at 1024px.")
+ parser.add_argument("--blocks", type=int, default=2, help="Blocks per stream. Default 2.")
+ parser.add_argument("--extra-blocks", type=int, default=0, help="Fit mode: this block count at 1024px as well.")
+ parser.add_argument(
+ "--alloc-conf",
+ default="",
+ help="The allocator configuration, as the server's pytorch_cuda_alloc_conf. Empty: the platform's default.",
+ )
+ parser.add_argument("--force", action="store_true", help="Run points predicted not to fit free device memory.")
+ parser.add_argument("--dry-run", action="store_true", help="Print the planned points without touching a device.")
+ parser.add_argument("--single", help=argparse.SUPPRESS)
+ args = parser.parse_args(argv)
+
+ if args.single is not None:
+ fresh_points.measure_in_this_process(args.single, point_type=Point, measure=_measure, logger_name=LOGGER_NAME)
+ if (args.mode == "real") != bool(args.checkpoint):
+ parser.error("--checkpoint names the single file real mode measures, and only real mode takes one")
+ if args.checkpoint and not Path(args.checkpoint).is_file():
+ parser.error(f"--checkpoint {args.checkpoint} is not a file")
+ if args.mode == "real":
+ defaults = vars(parser.parse_args([]))
+ ignored = [f"--{name.replace('_', '-')}" for name in REAL_MODE_IGNORES if getattr(args, name) != defaults[name]]
+ if ignored:
+ parser.error(
+ f"real mode measures its own grid on the checkpoint's blocks and takes no {', '.join(ignored)}"
+ )
+ problem = checkpoint_problem(args.checkpoint)
+ if problem is not None:
+ parser.error(problem)
+ points = plan(
+ args.mode,
+ dtypes=args.dtypes or (list(DTYPES) if args.mode == "fit" else ["bfloat16"]),
+ sizes=args.sizes,
+ text_tokens=args.text_tokens,
+ short_text_tokens=args.short_text_tokens,
+ short_text_sizes=args.short_text_sizes,
+ references=args.references,
+ batches=args.batches,
+ blocks=args.blocks,
+ extra_blocks=args.extra_blocks,
+ base=not args.no_base,
+ reference_px=args.reference_px,
+ checkpoint=args.checkpoint,
+ )
+ if args.dry_run:
+ _print_plan(points)
+ return
+ if args.out is None:
+ parser.error("--out is required to measure")
+ fresh_points.check_alloc_conf(parser, args.alloc_conf)
+ lines = fresh_points.measure_points(
+ points,
+ script=Path(__file__).resolve(),
+ out=args.out,
+ alloc_conf=args.alloc_conf,
+ force=args.force,
+ logger_name=LOGGER_NAME,
+ columns=_COLUMNS,
+ head=_head,
+ )
+
+ print()
+ if args.mode == "fit":
+ _summarize_fit(lines, args.text_tokens)
+ elif args.mode == "large":
+ _summarize_large(lines)
+ elif args.mode == "real":
+ _summarize_real(lines)
+ else:
+ _summarize_checks(lines)
+ fresh_points.print_counts(lines, args.out)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/app/invocations/test_flux3_denoise_wiring.py b/tests/app/invocations/test_flux3_denoise_wiring.py
index 35988c2add..5f319f58e8 100644
--- a/tests/app/invocations/test_flux3_denoise_wiring.py
+++ b/tests/app/invocations/test_flux3_denoise_wiring.py
@@ -64,7 +64,12 @@ def _drive(
info.model_on_device.return_value.__enter__.return_value = (None, model)
return info
- transformer = SimpleNamespace(config=SimpleNamespace(flow_map=variant is Flux3VariantType.Klein))
+ # A module without weights, so the working-memory estimate walks an empty tree; its config is the released
+ # geometry's, which the estimate prices on.
+ transformer = torch.nn.Module()
+ transformer.config = SimpleNamespace(
+ flow_map=variant is Flux3VariantType.Klein, num_attention_heads=24, attention_head_dim=128
+ )
vae_info, transformer_info = model_info(MagicMock()), model_info(transformer)
context = MagicMock()
@@ -109,7 +114,6 @@ def _drive(
patch.object(flux3_denoise.TorchDevice, "choose_torch_device", return_value=torch.device("cpu")),
patch.object(flux3_denoise, "read_vae_bn_stats", return_value=(BN_MEAN, BN_STD)),
patch.object(flux3_denoise, "get_noise_flux3", return_value=noise),
- patch.object(flux3_denoise, "peak_dequant_transient_bytes", return_value=0),
patch.object(flux3_denoise, "denoise", recording_denoise),
patch.object(flux3_denoise, "RectifiedFlowInpaintExtension", _RecordingInpaintExtension),
):
diff --git a/tests/app/invocations/test_flux3_denoise_working_memory.py b/tests/app/invocations/test_flux3_denoise_working_memory.py
new file mode 100644
index 0000000000..569ba2b9af
--- /dev/null
+++ b/tests/app/invocations/test_flux3_denoise_working_memory.py
@@ -0,0 +1,437 @@
+"""FLUX.3 denoise working memory: the estimate as `denoise.flux3` declares it, what the node hands it, and the formula
+it replaced.
+
+The estimate prices with the lines `backend/working_memory/data/denoise.json` ships, the fit of the forwards measured
+there, which `tests/backend/working_memory/` holds it to, plus its analytic terms (`TestEstimate`): the largest layer
+partial loading streams, a quantized build's dequantization copy and an fp8-stored transformer's cast transient, which
+no measured forward carries, and the score matrix an attention build without a fused kernel materializes, which only
+the forced-math forwards carry. Every platform nothing is measured on prices as a measured one, whose entry floors
+every value at the constants the node reserved by hand, and `TestUnmeasuredPlatforms` holds it to that formula, frozen
+below, at least. `TestMeasuredChecks` holds the estimate to the forced-math forwards the shipped points leave out.
+"""
+
+import itertools
+from types import SimpleNamespace
+from typing import get_args
+from unittest.mock import MagicMock, patch
+
+import pytest
+import torch
+from gguf import GGMLQuantizationType
+
+import invokeai.app.invocations.flux3.flux3_denoise as flux3_denoise
+from invokeai.app.invocations.flux3.flux3_denoise import Flux3DenoiseInvocation
+from invokeai.backend.flux3.denoise_working_memory import FLUX3_DENOISE_SPEC, estimate_flux3_denoise_working_memory
+from invokeai.backend.model_manager.load.load_default import ModelLoader
+from invokeai.backend.model_manager.load.model_loaders.flux3 import _build_transformer
+from invokeai.backend.model_manager.taxonomy import BaseModelType, Flux3VariantType, ModelType
+from invokeai.backend.quantization.gguf.ggml_tensor import GGMLTensor
+from invokeai.backend.quantization.int8_convrot import CONVROT_GROUP_SIZE, Int8ConvrotLinear
+from invokeai.backend.stable_diffusion.diffusion.conditioning_data import ConditioningFieldData, Flux3ConditioningInfo
+from invokeai.backend.util.attention import SDPA_MATH_BYTES_PER_SCORE_ELEMENT, sdpa_score_matrix_bytes
+from invokeai.backend.util.devices import TorchDevice
+from invokeai.backend.working_memory import spec as spec_module
+from invokeai.backend.working_memory.coefficients import shipped_coefficients
+from invokeai.backend.working_memory.platform import Allocator, ConvBackend, OperatingSystem, Platform, is_measured
+from tests.app.invocations.test_z_image_denoise_working_memory import ATTENTION
+from tests.backend.model_manager.load.state_dicts.flux3_klein_keys import state_dict_keys as KLEIN_KEYS
+
+KLEIN_HEADS = 24
+HEAD_DIM = 128
+WIDTH = KLEIN_HEADS * HEAD_DIM
+
+
+def _config(*, flow_map: bool = True, heads: int = KLEIN_HEADS) -> SimpleNamespace:
+ return SimpleNamespace(flow_map=flow_map, num_attention_heads=heads, attention_head_dim=HEAD_DIM)
+
+
+def _dense_transformer(**config) -> torch.nn.Module:
+ """A one-layer stand-in with the released geometry's config: what the estimate reads off a transformer."""
+ model = torch.nn.Module()
+ model.config = _config(**config)
+ model.proj = torch.nn.Linear(CONVROT_GROUP_SIZE, 8)
+ return model
+
+
+def _int8_transformer(out_features: int) -> torch.nn.Module:
+ """An int8_tensorwise layer on the meta device: it materializes two weight-sized bf16 tensors per forward."""
+ model = torch.nn.Module()
+ model.config = _config()
+ model.proj = Int8ConvrotLinear(
+ torch.zeros(out_features, CONVROT_GROUP_SIZE, dtype=torch.int8, device="meta"),
+ torch.ones(out_features, 1, device="meta"),
+ convrot=False,
+ )
+ return model
+
+
+def _released_transformer(flow_map: bool = True) -> torch.nn.Module:
+ """The transformer the loaders build (`_build_transformer`) from the released Klein checkpoint's shapes, one block
+ per stack as the captured key fixture holds them, Klein Base without the flow-map embedder, in bf16 on the meta
+ device."""
+ shapes = {
+ key: SimpleNamespace(shape=tuple(shape))
+ for key, (shape, _) in KLEIN_KEYS.items()
+ if flow_map or not key.startswith("ref_time_in.")
+ }
+ return torch.nn.Module.to(_build_transformer(shapes), torch.bfloat16)
+
+
+def _estimate(
+ transformer=None, *, image=4096, refs=0, text=560, batch=1, resident=False, dtype=torch.bfloat16, device="cuda"
+):
+ return estimate_flux3_denoise_working_memory(
+ transformer if transformer is not None else _dense_transformer(),
+ image_seq_len=image,
+ ref_image_seq_len=refs,
+ text_seq_len=text,
+ batch_size=batch,
+ weights_resident=resident,
+ device=torch.device(device),
+ dtype=dtype,
+ )
+
+
+class TestEstimate:
+ @pytest.mark.parametrize("flow_map", [True, False], ids=["klein", "klein-base"])
+ def test_a_transformer_that_may_load_partially_reserves_its_largest_layer(self, flow_map):
+ """Partial loading copies a RAM-held layer to the device for its forward, alive beside the activations. On the
+ released geometry in bf16 the largest is the caption embedder, 20480 x 3072, for Klein and Klein Base alike."""
+ model = _released_transformer(flow_map)
+
+ with ATTENTION["cuda"].answers():
+ added = _estimate(model).reservation_bytes - _estimate(model, resident=True).reservation_bytes
+
+ assert added == 20480 * 3072 * 2 == 125_829_120
+
+ def test_a_gguf_layer_streams_its_quantized_bytes(self):
+ """A Q8_0 weight stores 34 bytes per block of 32 elements; its dequantized copy is the dequant term's."""
+ model = _dense_transformer()
+ quantized = GGMLTensor(
+ torch.zeros(64, 34, dtype=torch.uint8), GGMLQuantizationType.Q8_0, torch.Size([64, 32]), torch.bfloat16
+ )
+ model.proj = torch.nn.Linear(32, 64, bias=False)
+ model.proj.weight = torch.nn.Parameter(quantized, requires_grad=False)
+
+ with ATTENTION["cuda"].answers():
+ features = _estimate(model).features
+
+ assert features["streamed_layer_bytes"] == 64 * 34
+
+ def test_an_fp8_stored_transformer_reserves_its_largest_layer_widened(self):
+ """FP8 Storage widens a layer's weight and bias to the compute dtype for its forward."""
+ fp8_stored = _dense_transformer()
+ ModelLoader._apply_fp8_to_nn_module(fp8_stored, storage_dtype=torch.float8_e4m3fn, compute_dtype=torch.bfloat16)
+
+ with ATTENTION["cuda"].answers():
+ added = _estimate(fp8_stored, resident=True).reservation_bytes - _estimate(resident=True).reservation_bytes
+ streamed = _estimate(fp8_stored).features["streamed_layer_bytes"]
+
+ assert added == (8 * CONVROT_GROUP_SIZE + 8) * torch.bfloat16.itemsize
+ # What partial loading copies is the stored float8 weight; its widening is the cast term's.
+ assert streamed == (8 * CONVROT_GROUP_SIZE + 8) * 1
+
+ def test_a_quantized_transformer_reserves_its_dequantization_copy(self):
+ """An int8_tensorwise layer materializes its weight and a scaled copy in bf16 per forward."""
+ with ATTENTION["cuda"].answers():
+ added = (
+ _estimate(_int8_transformer(64), resident=True).reservation_bytes
+ - _estimate(resident=True).reservation_bytes
+ )
+
+ assert added == 2 * 64 * CONVROT_GROUP_SIZE * 2
+
+ @pytest.mark.parametrize("batch", [1, 2])
+ def test_a_materialized_score_matrix_counts_the_transformers_heads_per_sample_over_the_joint_sequence(self, batch):
+ """The joint blocks attend over the caption, the image and the references at once."""
+ tokens = 4096 + 4096 + 560
+
+ with ATTENTION["mps"].answers():
+ scores = _estimate(refs=4096, batch=batch, resident=True).features["score_matrix_bytes"]
+
+ assert scores == KLEIN_HEADS * batch * tokens * tokens * SDPA_MATH_BYTES_PER_SCORE_ELEMENT
+
+ @pytest.mark.parametrize(
+ "build, scores",
+ [
+ ("cuda", 0),
+ ("cuda-fused-backend", 0),
+ ("hip", 2**30),
+ ("mps", KLEIN_HEADS * (4096 + 560) ** 2 * SDPA_MATH_BYTES_PER_SCORE_ELEMENT),
+ ],
+ )
+ def test_the_score_term_is_what_the_attention_build_materializes(self, build, scores):
+ """No mask is passed, so torch's fused kernel builds no score matrix, and a fused diffusers backend (flash,
+ sage) never reaches torch's SDPA, which in that build would build one. Without a fused kernel it is heads x S x
+ S over the 4656-token joint sequence, 8.2 GiB, of which the ROCm guard's chunked math kernel keeps one 1 GiB
+ chunk alive at a time."""
+ attention_build = ATTENTION[build]
+ with attention_build.answers():
+ terms = _estimate(resident=True, device=attention_build.device.type).terms
+
+ assert [(term.bytes, term.included) for term in terms if term.name == "attention_scores"] == [(scores, True)]
+
+ @pytest.mark.parametrize("heads, dtype", [(32, torch.bfloat16), (KLEIN_HEADS, torch.float64)])
+ def test_a_dtype_or_width_without_a_line_is_refused(self, heads, dtype):
+ """Pricing it on another width's or dtype's line would be a guess; the estimator says what is missing."""
+ with pytest.raises(ValueError, match=r"'denoise\.flux3' has no torch\.\w+ line at width \d+ on Platform\("):
+ _estimate(_dense_transformer(heads=heads), dtype=dtype, device="cpu")
+
+
+class TestLine:
+ """Which forwards a point of may fit the `denoise_<dtype>_h3072` line: the plain ones, whose demand is the line's
+ alone."""
+
+ def _line(self, *args, resident=True, **kwargs):
+ with ATTENTION["cuda"].answers():
+ features = _estimate(*args, resident=resident, **kwargs).features
+ return FLUX3_DENOISE_SPEC.line(features)
+
+ @pytest.mark.parametrize(
+ "dtype, name", [(torch.bfloat16, "bf16"), (torch.float16, "fp16"), (torch.float32, "fp32")]
+ )
+ def test_a_plain_forward_fits_its_dtypes_line_over_every_attended_token(self, dtype, name):
+ line = self._line(image=4096, refs=40960, text=80, dtype=dtype)
+
+ assert (line.suffix, line.size, line.fits) == (f"denoise_{name}_h3072", 4096 + 40960 + 80, True)
+ assert line.label == f"denoise-{name}-h3072-4096+40960ref+80tok"
+
+ def test_a_batch_fits_the_line_at_its_sequences_together(self):
+ """The line prices what a batch adds, its sequences; the base is a forward's, paid once."""
+ line = self._line(batch=2)
+
+ assert (line.size, line.fits, line.label) == (2 * (4096 + 560), True, "denoise-bf16-h3072-4096+560tok-b2")
+
+ def test_klein_base_prices_on_klein_s_line_and_its_points_say_so(self):
+ klein = self._line(_dense_transformer(flow_map=True))
+ base = self._line(_dense_transformer(flow_map=False))
+
+ assert (base.suffix, base.size, base.fits) == (klein.suffix, klein.size, True)
+ assert base.label == f"{klein.label}-base"
+
+ def test_a_forward_with_an_analytic_term_fits_nothing_and_says_why(self):
+ quantized = self._line(_int8_transformer(64))
+ streamed = self._line(_released_transformer(), resident=False)
+ with ATTENTION["mps"].answers():
+ scored = FLUX3_DENOISE_SPEC.line(_estimate(resident=True, device="mps").features)
+
+ assert not (quantized.fits or streamed.fits or scored.fits)
+ assert quantized.label.endswith(f"-dequant_transient={2 * 64 * CONVROT_GROUP_SIZE * 2}")
+ assert streamed.label.endswith(f"-streamed_layer={20480 * 3072 * 2}")
+ scores = KLEIN_HEADS * (4096 + 560) ** 2 * SDPA_MATH_BYTES_PER_SCORE_ELEMENT
+ assert scored.label.endswith(f"-attention_scores={scores}")
+
+
+# The reservation the node priced by hand before its estimate declared an `EstimatorSpec`, frozen verbatim with the
+# node's constants (`Flux3DenoiseInvocation._estimate_working_memory`). The shipped entries floor every value at those
+# constants where they price a platform nothing is measured on (`unmeasured_floor`).
+_LEGACY_ATTENTION_HEAD_DIM = 128
+_LEGACY_ATTENTION_HEADS = 24
+_LEGACY_BYTES_PER_TOKEN = int(0.33 * 1024**2)
+
+
+def _legacy_estimate_working_memory(num_tokens: int, batch_size: int, device: torch.device, dtype: torch.dtype) -> int:
+ estimated = num_tokens * batch_size * _LEGACY_BYTES_PER_TOKEN + int(1.0 * 1024**3)
+ estimated += sdpa_score_matrix_bytes(
+ device=device,
+ dtype=dtype,
+ num_heads=_LEGACY_ATTENTION_HEADS * batch_size,
+ head_dim=_LEGACY_ATTENTION_HEAD_DIM,
+ seq_len=num_tokens,
+ has_attn_mask=False,
+ via_diffusers_dispatch=True,
+ )
+ return estimated
+
+
+# Height, width: an elongated frame included.
+SIZES = [(512, 512), (784, 1040), (1024, 1024), (2048, 2048)]
+# None, one 1024px reference, one 4 MP one, three and ten 1 MP ones.
+REFERENCE_TOKENS = [0, 4096, 16384, 12288, 40960]
+CAPTIONS = [80, 560, 8192]
+BATCHES = [1, 2]
+DTYPES = [torch.bfloat16, torch.float16, torch.float32]
+
+EVERY_PLATFORM = [
+ Platform(*keys) for keys in itertools.product(get_args(ConvBackend), get_args(Allocator), get_args(OperatingSystem))
+]
+
+
+class TestUnmeasuredPlatforms:
+ @pytest.mark.parametrize(
+ "platform",
+ [p for p in EVERY_PLATFORM if not is_measured(p)],
+ ids=lambda p: f"{p.conv_backend}-{p.allocator}-{p.os}",
+ )
+ def test_an_unmeasured_platform_reserves_the_legacy_formula_at_least(self, platform: Platform):
+ """`priced_as` prices it with a measured platform's lines: MPS, XPU, the CPU and cuDNN with expandable segments
+ with the RTX 4090's native-allocator ones; MIOpen under `hipMallocAsync`, and off Windows with expandable
+ segments, with the native-allocator ones of its OS, the RX 9060 XT's on Windows and the W7900's elsewhere. Those
+ entries floor every value at the legacy constants, so it never reserves less than the node did by hand."""
+ short = []
+ with ATTENTION["cuda"].answers(), patch.object(spec_module, "platform_for", return_value=platform):
+ for (height, width), refs, caption, batch, dtype in itertools.product(
+ SIZES, REFERENCE_TOKENS, CAPTIONS, BATCHES, DTYPES
+ ):
+ image_seq_len = (height // 16) * (width // 16)
+ legacy = _legacy_estimate_working_memory(
+ image_seq_len + refs + caption, batch, torch.device("cuda"), dtype
+ )
+ reserved = _estimate(
+ image=image_seq_len, refs=refs, text=caption, batch=batch, dtype=dtype
+ ).reservation_bytes
+ if reserved < legacy:
+ short.append(((height, width, refs, caption, batch, dtype), legacy, reserved))
+ assert not short, f"{len(short)} cases below the formula, e.g. (case, legacy, reserved): {short[:3]}"
+
+
+class _StopBeforeLoad(Exception):
+ """Raised in place of entering the transformer's device context, to end `_run_diffusion` early."""
+
+
+SIZE = 256
+IMAGE_TOKENS = (SIZE // 16) ** 2
+
+
+def _requested_features(
+ *,
+ variant: Flux3VariantType = Flux3VariantType.Klein,
+ cfg_scale: float = 1.0,
+ positive_tokens: int = 80,
+ negative_tokens: int | None = None,
+ reference_tokens: int = 0,
+ init_batch: int | None = None,
+) -> dict:
+ """Drive `_run_diffusion` up to the transformer's lock and return the features of the estimate it hands
+ `model_on_device()`, after checking that it hands no plain byte count."""
+ transformer = _dense_transformer(flow_map=variant is Flux3VariantType.Klein)
+ transformer_info = MagicMock()
+ transformer_info.model = transformer
+ transformer_info.model_on_device = MagicMock(side_effect=_StopBeforeLoad)
+ vae_info = MagicMock()
+ vae_info.model_on_device.return_value.__enter__.return_value = (None, MagicMock())
+
+ context = MagicMock()
+ context.models.get_config.return_value = SimpleNamespace(
+ base=BaseModelType.Flux3, type=ModelType.Main, name="flux3", variant=variant
+ )
+ context.models.load.side_effect = lambda key: vae_info if key == "vae" else transformer_info
+ lengths = {"pos": positive_tokens, "neg": negative_tokens}
+ context.conditioning.load.side_effect = lambda name: ConditioningFieldData(
+ conditionings=[Flux3ConditioningInfo(prompt_embeds=torch.zeros(1, lengths[name], 8))]
+ )
+ if init_batch is not None:
+ context.tensors.load.return_value = torch.zeros(init_batch, 32, SIZE // 8, SIZE // 8)
+
+ references = [SimpleNamespace(image=SimpleNamespace(image_name="ref"))] if reference_tokens else None
+ invocation = Flux3DenoiseInvocation.model_construct(
+ latents=SimpleNamespace(latents_name="init") if init_batch is not None else None,
+ denoise_mask=None,
+ denoising_start=0.0,
+ denoising_end=1.0,
+ add_noise=True,
+ transformer=SimpleNamespace(transformer="transformer", loras=[]),
+ positive_conditioning=SimpleNamespace(conditioning_name="pos"),
+ negative_conditioning=SimpleNamespace(conditioning_name="neg") if negative_tokens is not None else None,
+ cfg_scale=cfg_scale,
+ width=SIZE,
+ height=SIZE,
+ steps=4,
+ seed=0,
+ vae=SimpleNamespace(vae="vae"),
+ kontext_conditioning=references,
+ )
+ encoded = (torch.zeros(1, reference_tokens, 128), torch.zeros(reference_tokens, 4))
+
+ with (
+ patch.object(flux3_denoise.TorchDevice, "choose_torch_device", return_value=torch.device("cpu")),
+ patch.object(flux3_denoise, "read_vae_bn_stats", return_value=(torch.zeros(128), torch.ones(128))),
+ patch.object(flux3_denoise, "encode_flux3_references", return_value=encoded),
+ pytest.raises(_StopBeforeLoad),
+ ):
+ invocation._run_diffusion(context)
+
+ transformer_info.model_on_device.assert_called_once()
+ requested = transformer_info.model_on_device.call_args.kwargs
+ assert set(requested) == {"working_memory"}
+ estimate = requested["working_memory"]
+ assert estimate.estimator == FLUX3_DENOISE_SPEC.id
+ return dict(estimate.features)
+
+
+class TestFlux3DenoiseRequestsWorkingMemory:
+ """What the node hands the estimate: one sample's tokens of each stream, the samples the forward runs, the dtype
+ it runs in and the variant, read off the transformer it is about to lock."""
+
+ def test_a_plain_generation_prices_its_image_and_caption_tokens(self):
+ features = _requested_features()
+
+ assert (features["image_tokens"], features["reference_tokens"], features["text_tokens"]) == (
+ IMAGE_TOKENS,
+ 0,
+ 80,
+ )
+ assert (features["tokens"], features["batch_size"], features["flow_map"]) == (IMAGE_TOKENS + 80, 1, True)
+ names = {torch.bfloat16: "bf16", torch.float16: "fp16", torch.float32: "fp32"}
+ assert features["dtype"] == names[TorchDevice.choose_bfloat16_safe_dtype(torch.device("cpu"))]
+
+ def test_the_layer_partial_loading_streams_is_reserved(self):
+ """The node cannot know at the estimate whether the cache loads the transformer whole, so it reserves the
+ stand-in's one layer, a float32 `Linear` of 8 x `CONVROT_GROUP_SIZE` with its bias."""
+ assert _requested_features()["streamed_layer_bytes"] == (8 * CONVROT_GROUP_SIZE + 8) * 4
+
+ def test_reference_images_join_the_attended_tokens(self):
+ """Ten 1 MP references add 40960 tokens to a generation of any size."""
+ features = _requested_features(reference_tokens=40960)
+
+ assert (features["reference_tokens"], features["tokens"]) == (40960, IMAGE_TOKENS + 40960 + 80)
+
+ def test_a_batched_init_latent_sets_the_batch(self):
+ """The node builds its noise at batch 1; two init latents broadcast the blend to two samples, references
+ repeated per sample."""
+ features = _requested_features(init_batch=2, reference_tokens=4096)
+
+ assert (features["batch_size"], features["reference_tokens"]) == (2, 4096)
+
+ @pytest.mark.parametrize("negative, text", [(160, 160), (80, 80)], ids=["negative-longer", "positive-longer"])
+ def test_klein_base_cfg_prices_the_longer_caption_of_the_pair(self, negative, text):
+ """The conditional and unconditional forwards run one after the other, so the longer caption is what one
+ forward attends."""
+ features = _requested_features(
+ variant=Flux3VariantType.KleinBase, cfg_scale=3.5, positive_tokens=80, negative_tokens=negative
+ )
+
+ assert (features["text_tokens"], features["flow_map"]) == (text, False)
+
+ def test_a_negative_caption_without_cfg_runs_no_forward_and_is_not_priced(self):
+ features = _requested_features(variant=Flux3VariantType.KleinBase, negative_tokens=800)
+
+ assert features["text_tokens"] == 80
+
+
+# The forwards at 1024px with a 560-token caption, 4656 tokens, the default kernel and SDPA forced onto the math kernel
+# (`scripts/calibrate_flux3_denoise_working_memory.py --mode math`, 2026-10-31): platform, the math forward's score term
+# as the estimate priced it in that process, and the measured demands in bytes. On the RTX 4090 (native allocator) the
+# math kernel took 13.69 bytes per score element over the default one, against the 17 the term charges. On the RX 9060
+# XT (expandable segments) the ROCm SDPA guard computes math attention in chunks, so the term is one 1 GiB chunk and the
+# forward took 129 MiB more. The W7900's math forward ships as an out-of-fit point, which the data test holds.
+MATH_KERNEL_FORWARDS = [
+ (Platform("cudnn", "native", "windows"), KLEIN_HEADS * 4656 * 4656 * 17, 1411383296, 8535408640),
+ (Platform("miopen", "expandable", "windows"), 2**30, 999686144, 1134821376),
+]
+
+
+class TestMeasuredChecks:
+ @pytest.mark.parametrize("platform, scores, default_kernel, math_kernel", MATH_KERNEL_FORWARDS, ids=["cuda", "hip"])
+ def test_a_math_kernel_forward_is_covered_by_the_line_and_its_score_matrix(
+ self, platform, scores, default_kernel, math_kernel
+ ):
+ """A regime no server runs by default, so it bounds the estimate from below only. The score matrix's own term
+ covers what the math kernel adds over the default one."""
+ with ATTENTION["cuda"].answers():
+ features = dict(_estimate(image=4096, refs=0, text=560, resident=True).features)
+ features["score_matrix_bytes"] = scores
+ reserved = FLUX3_DENOISE_SPEC.evaluate(features, shipped_coefficients(FLUX3_DENOISE_SPEC, platform))
+
+ assert math_kernel - default_kernel <= scores
+ assert reserved.reservation_bytes >= math_kernel
diff --git a/tests/backend/working_memory/test_shipped_coefficients.py b/tests/backend/working_memory/test_shipped_coefficients.py
index 3b52cb826b..b897680b2c 100644
--- a/tests/backend/working_memory/test_shipped_coefficients.py
+++ b/tests/backend/working_memory/test_shipped_coefficients.py
@@ -67,9 +67,26 @@ from invokeai.backend.working_memory.platform import (
)
from invokeai.backend.working_memory.spec import ESTIMATOR_MODULES, EstimatorSpec, import_estimator_modules
-OUT_OF_FIT = {((("allocator", "native"), ("conv_backend", "cudnn")), "RTX 4090", "reserved_peak"): 6}
+OUT_OF_FIT = {
+ ((("allocator", "native"), ("conv_backend", "cudnn")), "RTX 4090", "reserved_peak"): 6,
+ ((("allocator", "native"), ("conv_backend", "cudnn")), "RTX 4090", "demand_peak"): 4,
+ (
+ (("allocator", "expandable"), ("conv_backend", "miopen"), ("os", "windows")),
+ "RX 9060 XT (gfx1200)",
+ "demand_peak",
+ ): 4,
+ (
+ (("allocator", "native"), ("conv_backend", "miopen")),
+ "AMD Radeon Pro W7900 Dual Slot (gfx1100)",
+ "demand_peak",
+ ): 5,
+}
"""The out-of-fit points by platform, device and method: the six CUDA forced-math-kernel decodes and encodes, which
-check the score-matrix term. A point that leaves the fit needs an edit here."""
+check the score-matrix term, and the FLUX.3 denoise's checks. Those are the real Klein's forwards on each card, which
+hold the 2-block lines to the released model from below, and on the W7900 the forced-math forward, which checks the
+score-matrix term, and the 4-block forward. That one stands for the real Klein's 1024px forward and the math check's
+default-kernel one, out-of-fit points of the same features that demanded no more: the builder ships the larger of one
+measurement (`build_shipped.point_identity`). A point that leaves the fit needs an edit here."""
LEGACY_ENTRIES = {
("denoise.z_image", (("allocator", "native"), ("conv_backend", "miopen"))),
diff --git a/tests/test_calibrate_flux3_denoise_working_memory.py b/tests/test_calibrate_flux3_denoise_working_memory.py
new file mode 100644
index 0000000000..9b8606ec92
--- /dev/null
+++ b/tests/test_calibrate_flux3_denoise_working_memory.py
@@ -0,0 +1,422 @@
+"""scripts/calibrate_flux3_denoise_working_memory.py: the forwards it plans, what it hands the transformer and the
+estimate for them, and the point files it writes for the data builder.
+
+The measurement needs a CUDA or ROCm device and runs by hand (see the script's docstring). These cover what decides the
+points it writes: which forwards a run measures, that a measured forward is the one its features describe, that the real
+model's forwards load through the loader's conversion and price as the shipped 2-block points of their shape, and that a
+run's points replace the legacy `denoise.flux3` entry of their platform when the builder reads them. The plumbing it
+shares with the other calibration scripts is `scripts/working_memory/fresh_points.py`'s, tested in
+`tests/test_fresh_points_working_memory.py`.
+"""
+
+import dataclasses
+import json
+import shutil
+from importlib.util import module_from_spec, spec_from_file_location
+from pathlib import Path
+
+import pytest
+import torch
+from diffusers import Flux3Transformer2DModel
+from safetensors.torch import save_file
+
+from invokeai.backend.flux3.conversion import FLUX3_NATIVE_FLOW_MAP_KEY, flux3_transformer_config
+from invokeai.backend.flux3.denoise_working_memory import FLUX3_DENOISE_SPEC
+from invokeai.backend.working_memory.coefficients import load_data, shipped_coefficients
+from invokeai.backend.working_memory.counters import CounterReading
+from invokeai.backend.working_memory.measurement import fresh_window
+from invokeai.backend.working_memory.platform import Platform
+from scripts.working_memory import fresh_points
+from scripts.working_memory.build_shipped import DATA_DIR, main, write_data
+from tests.backend.flux3.flux3_fixture import forward as tiny_forward
+from tests.backend.flux3.flux3_fixture import tiny_flux3_model, to_native
+from tests.backend.model_manager.load.state_dicts.flux3_klein_keys import state_dict_keys as KLEIN_KEYS
+from tests.backend.model_manager.load.state_dicts.utils import write_header_only_safetensors
+
+SCRIPT = Path(__file__).parents[1] / "scripts" / "calibrate_flux3_denoise_working_memory.py"
+MIB = 2**20
+
+
+def _load_script():
+ spec = spec_from_file_location("calibrate_flux3_denoise_working_memory", SCRIPT)
+ assert spec is not None and spec.loader is not None
+ module = module_from_spec(spec)
+ spec.loader.exec_module(module)
+ return module
+
+
+script = _load_script()
+Point = script.Point
+CPU = torch.device("cpu")
+
+GRID = {
+ "sizes": [512, 1024, 2048],
+ "text_tokens": 560,
+ "short_text_tokens": 80,
+ "short_text_sizes": [1024],
+ "references": [1, 3, 10],
+ "batches": [1, 2],
+ "blocks": 2,
+ "extra_blocks": 0,
+}
+
+
+def _features(point) -> dict:
+ return dict(script._estimate(point, CPU, script._transformer(point)).features)
+
+
+def test_the_fit_grid_runs_every_size_and_at_1024px_the_short_caption_references_batch_and_klein_base_per_dtype():
+ """float32 stops at three references (`FLOAT32_MAX_REFERENCES`), which keeps its grid the same on every card."""
+ points = script.plan("fit", dtypes=["bfloat16", "float32"], **(GRID | {"extra_blocks": 4}))
+
+ def rows(dtype, references):
+ return [
+ (dtype, "fit", 512, 560, 0, 1, 2, True),
+ (dtype, "fit", 1024, 560, 0, 1, 2, True),
+ (dtype, "fit", 2048, 560, 0, 1, 2, True),
+ (dtype, "fit", 1024, 80, 0, 1, 2, True),
+ *[(dtype, "fit", 1024, 560, n, 1, 2, True) for n in references],
+ (dtype, "fit", 1024, 560, 0, 2, 2, True),
+ (dtype, "fit", 1024, 560, 0, 1, 2, False),
+ ]
+
+ assert [(p.dtype, p.kind, p.px, p.text_tokens, p.references, p.batch, p.blocks, p.flow_map) for p in points] == [
+ *rows("bfloat16", [1, 3, 10]),
+ *rows("float32", [1, 3]),
+ ("bfloat16", "blocks", 1024, 560, 0, 1, 4, True),
+ ]
+ assert [point.fit for point in points] == [point.kind == "fit" for point in points]
+ assert not any(point.force_math for point in points)
+
+
+def test_the_math_check_pairs_a_forced_math_forward_with_a_default_kernel_one_per_dtype_out_of_the_fit():
+ points = script.plan("math", dtypes=["bfloat16", "float16"], **GRID)
+
+ assert points == [
+ Point("baseline", "bfloat16", 1024, 560),
+ Point("math", "bfloat16", 1024, 560, force_math=True),
+ Point("baseline", "float16", 1024, 560),
+ Point("math", "float16", 1024, 560, force_math=True),
+ ]
+ assert not any(point.fit for point in points)
+
+
+def test_the_measured_transformer_has_the_geometry_the_loader_reads_off_the_released_checkpoint():
+ """`flux3_transformer_config` reads the loader's geometry off the checkpoint's shapes; a model measured at another
+ width or caption width would put its points on the wrong line."""
+
+ class _Shape:
+ def __init__(self, shape):
+ self.shape = tuple(shape)
+
+ released = flux3_transformer_config({key: _Shape(shape) for key, (shape, _) in KLEIN_KEYS.items()})
+
+ for key, value in script.GEOMETRY.items():
+ assert released[key] == value, key
+ assert set(released) - set(script.GEOMETRY) == {"num_layers", "num_single_layers", "flow_map"}
+
+
[email protected]("flow_map", [True, False], ids=["klein", "klein-base"])
+def test_a_point_builds_its_variant_in_its_dtype_with_the_qk_norms_in_float32(flow_map):
+ model = script._transformer(Point("fit", "float16", 1024, 560, blocks=2, flow_map=flow_map))
+
+ assert model.config.flow_map is flow_map
+ assert (model.config.num_layers, model.config.num_single_layers) == (2, 2)
+ dtypes = {name: param.dtype for name, param in model.named_parameters()}
+ assert {dtype for name, dtype in dtypes.items() if name.endswith((".norm_q.weight", ".norm_k.weight"))} == {
+ torch.float32
+ }
+ assert {dtype for name, dtype in dtypes.items() if not name.endswith((".norm_q.weight", ".norm_k.weight"))} == {
+ torch.float16
+ }
+
+
+def test_a_point_is_priced_on_its_dtypes_line_over_the_tokens_of_every_sample():
+ """Three 1024px references at a 1024px generation, two samples, Klein Base."""
+ features = _features(Point("fit", "float16", 1024, 560, references=3, batch=2, flow_map=False))
+ line = FLUX3_DENOISE_SPEC.line(features)
+
+ assert (features["image_tokens"], features["reference_tokens"], features["text_tokens"]) == (4096, 12288, 560)
+ assert (features["batch_size"], features["hidden_size"], features["flow_map"]) == (2, 3072, False)
+ assert (line.suffix, line.size, line.fits) == ("denoise_fp16_h3072", 2 * (4096 + 12288 + 560), True)
+
+
+ "references, reference_px, tokens",
+ [(1, 1024, 4096), (1, 2048, 16384), (1, 4096, 16384), (1, 1000, 62 * 62), (3, 1024, 3 * 4096), (10, 1024, 40960)],
+ ids=["one-1024", "one-2048", "one-4096-to-4mp", "odd-side-cropped", "three-1024", "ten-1024"],
+)
+def test_reference_tokens_are_what_the_node_encodes(references, reference_px, tokens):
+ """One reference keeps up to 4 MP, each of several up to 1 MP (`flux3/ref_images.py`), and a side is cropped to
+ whole 16 px cells."""
+ point = Point("fit", "bfloat16", 1024, 560, references=references, reference_px=reference_px)
+
+ assert script.reference_tokens(point) == tokens
+
+
+def test_the_large_grid_reaches_57904_tokens_and_fits_its_line():
+ points = script.plan("large", dtypes=["bfloat16"], **GRID)
+
+ assert [(p.px, p.references, p.reference_px) for p in points] == [
+ (2048, 1, 2048),
+ (1536, 1, 2048),
+ (2048, 3, 1024),
+ (2048, 10, 1024),
+ ]
+ lines = [FLUX3_DENOISE_SPEC.line(_features(point)) for point in points]
+ assert [line.size for line in lines] == [33328, 26160, 29232, 57904]
+ assert all(point.fit for point in points) and all(line.fits for line in lines)
+
+
[email protected]("flow_map", [True, False], ids=["klein", "klein-base"])
+def test_the_measured_forward_takes_the_tokens_its_features_name(flow_map: bool) -> None:
+ """The node's inputs, run through the transformer class the loader builds, at one head and in float32 so the CPU
+ runs it: the image's tokens, a reference on its own stream with its position ids, the caption, and for Klein the
+ timestep each step jumps to."""
+ point = Point("fit", "float32", 64, 80, references=1, reference_px=32, batch=2, flow_map=flow_map)
+ features = _features(point)
+ model = Flux3Transformer2DModel(
+ **(dict(script.GEOMETRY) | {"num_attention_heads": 1}), num_layers=1, num_single_layers=1, flow_map=flow_map
+ ).eval()
+
+ inputs = script._inputs(point, CPU)
+ with torch.inference_mode():
+ (output,) = model(**inputs)
+
+ # A reference below 64 px a side is scaled up to it: 4 x 4 tokens.
+ assert (features["image_tokens"], features["reference_tokens"], features["text_tokens"]) == (16, 16, 80)
+ assert inputs["image_cond_hidden_states"].shape[:2] == (2, 16) and inputs["image_cond_ids"].shape == (16, 4)
+ assert inputs["encoder_hidden_states"].shape[:2] == (2, 80)
+ assert output.shape == (2, 16, script.GEOMETRY["in_channels"])
+
+
[email protected]("flow_map", [True, False], ids=["klein", "klein-base"])
+def test_the_real_grid_measures_the_checkpoints_variant_out_of_the_fit(tmp_path: Path, flow_map: bool) -> None:
+ """The variant is read off the checkpoint's keys, without torch: only Klein has the flow-map embedder."""
+ keys = {key: value for key, value in KLEIN_KEYS.items() if flow_map or not key.startswith("ref_time_in.")}
+ path = write_header_only_safetensors(tmp_path / "flux3.safetensors", keys)
+
+ points = script.plan("real", dtypes=["float16"], **GRID, checkpoint=str(path))
+
+ assert [(p.kind, p.dtype, p.px, p.text_tokens, p.references, p.flow_map, p.fit) for p in points] == [
+ ("real", "bfloat16", 1024, 560, 0, flow_map, False),
+ ("real", "bfloat16", 2048, 560, 0, flow_map, False),
+ ("real", "bfloat16", 1024, 560, 1, flow_map, False),
+ ("real", "bfloat16", 1024, 560, 3, flow_map, False),
+ ]
+ assert script.FLOW_MAP_KEY == FLUX3_NATIVE_FLOW_MAP_KEY
+
+
+ "arguments, message",
+ [
+ (["--dtypes", "float16"], "takes no --dtypes"),
+ (["--sizes", "1024", "--batches", "3"], "takes no --sizes, --batches"),
+ (["--references", "3", "--no-base", "--extra-blocks", "4"], "takes no --references, --no-base, --extra-blocks"),
+ ],
+ ids=["dtypes", "sizes-batches", "references-base-blocks"],
+)
+def test_real_mode_refuses_the_options_it_would_ignore(tmp_path: Path, capsys, arguments, message) -> None:
+ path = write_header_only_safetensors(tmp_path / "klein.safetensors", KLEIN_KEYS)
+
+ with pytest.raises(SystemExit) as exit_:
+ script.main(["--mode", "real", "--checkpoint", str(path), "--dry-run", *arguments])
+
+ assert exit_.value.code == 2 and message in capsys.readouterr().err
+
+
+def test_real_mode_refuses_a_checkpoint_that_is_not_a_bf16_safetensors_file(tmp_path: Path, capsys) -> None:
+ gguf = tmp_path / "klein.gguf"
+ gguf.write_bytes(b"GGUF")
+ fp32 = write_header_only_safetensors(
+ tmp_path / "klein-fp32.safetensors", {key: (shape, "F32") for key, (shape, _) in KLEIN_KEYS.items()}
+ )
+
+ for path, message in ((gguf, "is no safetensors single file"), (fp32, "holds F32 tensors")):
+ with pytest.raises(SystemExit):
+ script.main(["--mode", "real", "--checkpoint", str(path), "--dry-run"])
+ assert message in capsys.readouterr().err
+
+
+def test_a_real_forward_prices_the_features_of_the_2_block_point_of_its_shape(tmp_path: Path) -> None:
+ """Real mode sets each forward against the shipped 2-block point of the same features: the geometry the loader
+ reads off the released checkpoint's header has to give exactly those."""
+ path = write_header_only_safetensors(tmp_path / "klein.safetensors", KLEIN_KEYS)
+ real = Point("real", "bfloat16", 1024, 560, references=1, checkpoint=str(path))
+
+ assert _features(real) == _features(Point("fit", "bfloat16", 1024, 560, references=1))
+
+
[email protected]("flow_map", [True, False], ids=["klein", "klein-base"])
+def test_a_real_checkpoint_loads_through_the_loaders_conversion(tmp_path: Path, flow_map: bool) -> None:
+ """A tiny model in BFL's layout comes back as the model it was written from, in float32 so the CPU runs it, with
+ the geometry the meta transformer read off its header.
+
+ The weights must match exactly; the forward only closely. The loaded weights are views into the file's buffer at
+ offsets its header length sets, and Linux CPU BLAS rounds misaligned operands differently in the last bits."""
+ reference = tiny_flux3_model(flow_map=flow_map)
+ path = tmp_path / "tiny.safetensors"
+ save_file(to_native(reference), str(path))
+ point = Point("real", "float32", 64, 80, flow_map=flow_map, checkpoint=str(path))
+
+ loaded = script._load_real(point, CPU)
+ meta = script._transformer(point)
+
+ assert {name: p.shape for name, p in meta.named_parameters()} == {
+ name: p.shape for name, p in loaded.named_parameters()
+ }
+ loaded_weights, reference_weights = loaded.state_dict(), reference.state_dict()
+ assert loaded_weights.keys() == reference_weights.keys()
+ assert [name for name, value in reference_weights.items() if not torch.equal(loaded_weights[name], value)] == []
+ # The forward catches a config the weights do not carry, such as the flow-map wiring or the rotary axes.
+ torch.testing.assert_close(tiny_forward(loaded, flow_map), tiny_forward(reference, flow_map))
+
+
+def _reading(**values) -> CounterReading:
+ fields = {
+ "reserved": 1000,
+ "allocated": 800,
+ "peak_reserved": 1000,
+ "peak_allocated": 800,
+ "num_ooms": 0,
+ "num_alloc_retries": 0,
+ "driver": 1200,
+ "peak_driver": None,
+ "paged": 0,
+ "device_used": None,
+ "method": "windows-d3dkmt",
+ }
+ return CounterReading(**(fields | values))
+
+
+SLOPES = {"bfloat16": 300_000, "float16": 300_000, "float32": 520_000}
+"""Bytes per attended token the synthetic points below lie on, per dtype, over a 300 MiB base."""
+LINES = {"bfloat16": "bf16", "float16": "fp16", "float32": "fp32"}
+
+
+def _record(point, demand: int | None = None, platform: Platform | None = None) -> dict:
+ """The file record of `point` as a measuring process on an RTX 4090 writes it, its demand on its dtype's synthetic
+ line unless `demand` is given; on `platform` if given, as an RX 9060 XT then."""
+ features = _features(point)
+ if demand is None:
+ demand = SLOPES[point.dtype] * features["tokens"] * features["batch_size"] + 300 * MIB
+ window = fresh_window(
+ _reading(), _reading(peak_reserved=1000 + demand, driver=1200 + demand), oom=False, spill=False
+ )
+ common = {
+ "estimator": FLUX3_DENOISE_SPEC.id,
+ "version": FLUX3_DENOISE_SPEC.version,
+ "platform": dataclasses.asdict(platform or Platform("cudnn", "native", "windows")),
+ "features": features,
+ "device": "AMD Radeon RX 9060 XT (gfx1200)" if platform else "NVIDIA GeForce RTX 4090",
+ }
+ line = fresh_points.point_line(point, common=common, provenance="test", windows=[window, window], raw={})
+ record = fresh_points.file_record(line)
+ assert record is not None
+ return record
+
+
+CUDNN_NATIVE = {"conv_backend": "cudnn", "allocator": "native"}
+LEGACY_VALUES = {
+ f"{part}_denoise_{line}_h3072": 346030 if part == "k" else 2**30 for line in LINES.values() for part in "kb"
+}
+"""The hand-set constants of a `legacy` FLUX.3 denoise entry."""
+
+
+def _legacy_data_copy(tmp_path: Path) -> Path:
+ """The shipped data as it was before the RTX 4090's native-allocator FLUX.3 points shipped: that entry hand-set and
+ `legacy` again, without its points."""
+ data_dir = tmp_path / "data"
+ shutil.copytree(DATA_DIR, data_dir)
+ data = load_data(data_dir)["denoise.json"]
+
+ def reverted(entry) -> bool:
+ return entry.estimator == FLUX3_DENOISE_SPEC.id and entry.platform == CUDNN_NATIVE
+
+ entries = [
+ entry.model_copy(update={"values": LEGACY_VALUES, "legacy": True}) if reverted(entry) else entry
+ for entry in data.coefficients
+ ]
+ points = [point for point in data.points if not reverted(point)]
+ write_data(data_dir / "denoise.json", data.model_copy(update={"coefficients": entries, "points": points}))
+ return data_dir
+
+
+def test_a_runs_points_replace_the_legacy_entry_of_their_platform(tmp_path: Path, capsys) -> None:
+ """The default grid's fit points span each dtype's line, reference images, the batch and Klein Base included, so
+ the builder fits all three lines and the RTX 4090's native-allocator entry is legacy no more. Its floors for the
+ platforms it prices unmeasured stay, and so does every other entry."""
+ points = script.plan(
+ "fit",
+ dtypes=list(script.DTYPES),
+ sizes=[512, 768, 1024, 1440, 2048],
+ text_tokens=560,
+ short_text_tokens=80,
+ short_text_sizes=[1024, 1440],
+ references=[1, 3, 10],
+ batches=[2],
+ blocks=2,
+ extra_blocks=4,
+ )
+ point_file = tmp_path / "flux3.jsonl"
+ point_file.write_text("".join(json.dumps(_record(point)) + "\n" for point in points), encoding="utf-8")
+ data_dir = _legacy_data_copy(tmp_path)
+
+ assert main(["--points", str(point_file), "--data-dir", str(data_dir), "--write"]) == 0
+
+ assert f"{len(points)} fresh-process points from 1 point files" in capsys.readouterr().out
+
+ def entries(directory: Path) -> dict:
+ return {
+ ",".join(entry.platform.values()): entry
+ for entry in load_data(directory)["denoise.json"].coefficients
+ if entry.estimator == FLUX3_DENOISE_SPEC.id
+ }
+
+ built, shipped = entries(data_dir), entries(DATA_DIR)
+ fitted, shipped_native = built.pop("cudnn,native"), shipped.pop("cudnn,native")
+ assert not fitted.legacy
+ # The synthetic lines plus the shipped fit's 5%, the base rounded up to a whole MiB.
+ assert fitted.values == {
+ name: value
+ for dtype, slope in SLOPES.items()
+ for name, value in (
+ (f"k_denoise_{LINES[dtype]}_h3072", slope * 21 // 20),
+ (f"b_denoise_{LINES[dtype]}_h3072", 315 * MIB),
+ )
+ }
+ assert fitted.unmeasured_floor == shipped_native.unmeasured_floor != {}
+ assert built == shipped
+
+
+ROCM_EXPANDABLE = Platform("miopen", "expandable", "windows")
+
+
[email protected]("margin, built", [(-MIB, True), (MIB, False)], ids=["covered", "under-reserved"])
+def test_a_real_forward_ships_as_a_lower_bound_every_refit_must_keep(tmp_path: Path, capsys, margin, built) -> None:
+ """Real mode's points are checks: the builder ships them out of the fit, where they bound their estimate from below
+ only. One the shipped line covers joins the data and moves no line; one that demands more than the line reserves
+ makes the builder refuse, naming it, and write nothing."""
+ path = write_header_only_safetensors(tmp_path / "klein.safetensors", KLEIN_KEYS)
+ point = Point("real", "bfloat16", 1024, 560, references=3, checkpoint=str(path))
+ estimate = FLUX3_DENOISE_SPEC.evaluate(
+ _features(point), shipped_coefficients(FLUX3_DENOISE_SPEC, ROCM_EXPANDABLE)
+ ).reservation_bytes
+ point_file = tmp_path / "real.jsonl"
+ point_file.write_text(json.dumps(_record(point, estimate + margin, ROCM_EXPANDABLE)) + "\n", encoding="utf-8")
+ data_dir = tmp_path / "data"
+ shutil.copytree(DATA_DIR, data_dir)
+
+ status = main(["--points", str(point_file), "--data-dir", str(data_dir), "--write"])
+
+ data = load_data(data_dir)["denoise.json"]
+ shipped = load_data(DATA_DIR)["denoise.json"]
+ assert data.coefficients == shipped.coefficients
+ if built:
+ assert status == 0
+ (added,) = [p for p in data.points if p.device == "AMD Radeon RX 9060 XT (gfx1200)"]
+ assert (added.in_fit, added.measured_bytes) == (False, estimate - MIB)
+ else:
+ assert status == 1
+ assert "reject the result" in capsys.readouterr().err
+ assert data.points == shipped.points