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 Krea-2 denoise working memory from measured lines (#10085)

Alexander Eichhorn9fd7008511cb
diff --git a/docs/src/content/docs/development/Architecture/model-manager.mdx b/docs/src/content/docs/development/Architecture/model-manager.mdx
index bb9ec0b11e..e99e2eadcc 100644
--- a/docs/src/content/docs/development/Architecture/model-manager.mdx
+++ b/docs/src/content/docs/development/Architecture/model-manager.mdx
@@ -1053,12 +1053,13 @@ 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`, `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):
+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`, `invokeai/backend/krea2/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, the Krea-2 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, 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.
+- 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, FLUX.3 and Krea-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 `legacy_formula=` where the terms are shaped unlike the hand-set formula they replace, so that a `legacy` entry's constants alone do not reproduce it (the Krea-2 denoise's CFG and style multipliers, its count-based LoRA term). Where the values are legacy-priced (`ResolvedCoefficients.legacy_priced`: a `legacy` entry, or an unmeasured platform raised to an entry's `unmeasured_floor`), the estimate adds what the formula gives beyond its terms, as a term `legacy_formula`; fitted values on a measured platform never read it.
- 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 +1068,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 and FLUX.3 denoise their forwards 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 and Krea-2 denoise their forwards 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.
@@ -1091,6 +1092,15 @@ To write such an estimator (`invokeai/backend/util/vae_working_memory.py` has fi
- 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`.
+- The Krea-2 denoise (`denoise.krea2`, `data/denoise.json`) prices the transformer's forward as `k_denoise_<dtype>` bytes per attended token plus a base of `b_denoise_<dtype>`, for the bf16, fp16 and fp32 the node may run. The estimate sizes the transformer's lock, which covers the whole denoise, so the line prices its longest pass: a target pass (the image's tokens, one per 16 × 16 pixels, every joint edit reference's and the longer caption of a CFG pair; the passes run one after the other, so CFG adds nothing), a style reference's pass (the image and its own caption), or in reference K/V-cache mode the references' precompute, whose cache's exact size goes on top.
+ - The lines are fitted on fresh-process points of `scripts/calibrate_krea2_working_memory.py` (a random-init transformer of the default geometry with 2 blocks and the node's attention processors; bf16, fp16 and fp32 from 512 to 2048 px with a 512-token caption, 1024 and 1536 px with a 77-token one, one to three 1024 px joint references at 1024 px, and in bf16 joint sequences up to 29184 tokens): an RTX 4090 with the native allocator (bf16 and fp16 0.30 MiB per token plus 219 MiB, fp32 0.50 MiB plus 319 MiB) and with `cudaMallocAsync` (0.23 MiB plus 105 MiB, 0.43 MiB plus 193 MiB). 4 blocks measured the same as 2. Under the native allocator joint references lie on the line of the plain forwards; under `cudaMallocAsync` a warm forward with one reference read 18% above its cold one and holds the line up. Points name the card as torch does (`NVIDIA GeForce RTX 4090`), as the script writes them. An RX 9060 XT under ROCm 10 with AOTriton's fused kernels measured the same grid on Windows with expandable segments and with the native allocator, each an entry for Windows alone, joint sequences up to 29184 tokens in bf16 and fp16 included; fp32 runs up to 22016 tokens with expandable segments and 16896 under the native allocator, as the shipped line plus the weights prices its longer sequences beyond the card's ~14.9 GiB free: the native allocator 0.30 MiB per token plus 494 MiB in bf16 and 522 MiB in fp16, 0.50 MiB plus 464 MiB in fp32; expandable segments 0.20 MiB plus 407 and 435 MiB, 0.40 MiB plus 240 MiB. With expandable segments 4 blocks measured the same as 2 there too; the native allocator ran no 4-block forward. The card did not drive the desktop: per-process demand is the same, but WDDM paging on a card that also carries the desktop is not measured.
+ - A caption token reserves more than an image token, with allocated memory growing alike (allocator reserve, consistent with the text fusion running each caption token as 12 tapped encoder layers before the blocks): under the native allocator 0.73 to 0.95 MiB against 0.30 in bf16 and fp16, 1.2 to 2.2 against 0.50 in fp32. One slope prices both up to the fit grid's 512 caption tokens, so the 77-token forwards sit up to 1.35x below the line, listed in `bounds.UPPER_BOUND_EXCEPTIONS`. Beyond 512, which regional prompting reaches by concatenating its captions, each caption token adds `caption_excess` on top of the line. The caption checks measure it (`--mode captions`: 1024- and 2048-token captions at 1024 and 1536 px, every dtype, on every measured platform, shipped out of the fit), as do the same checks on Linux on an RTX 6000 Ada (the RTX 4090's AD102 chip) under both CUDA allocators, shipped without its fit-grid points: under the native allocator it measured byte for byte what the RTX 4090 did, under `cudaMallocAsync` it scattered both ways. The line alone falls short at 2048 tokens by up to 23% (down to 0.77 times the demand). The term is the most a check demanded per caption token beyond 512 above the line's slope, over every shipped caption check, times the 1.3 that bounds a fitted term (`bounds.MAX_OVER_RESERVATION`), rounded up to the next 0.01 MiB: 0.34 MiB in bf16 and fp16 (from 0.26 MiB, CUDA's native allocator) and 0.74 MiB in fp32 (from 0.56 MiB, the RTX 6000 Ada under `cudaMallocAsync` at 1024 px with 2048 tokens; CUDA's native allocator demanded at most 0.39 MiB, the RX 9060 XT 0.37). The estimate covers every check, 1.05 to 1.54 times in bf16 and fp16 and 1.08 to 1.67 in fp32 under CUDA's native allocator, 1.21 to 1.50 and 1.14 to 1.34 under `cudaMallocAsync` on the RTX 4090 and 1.17 to 1.50 and 1.07 to 1.40 on the RTX 6000 Ada, 1.05 to 1.46 and 1.08 to 1.63 under ROCm's native allocator, 1.17 to 1.43 and 1.33 to 1.45 with expandable segments. On the RTX 4090 each group's largest ratio falls on a forward the line alone already covers 1.09 to 1.47 times.
+ - SageAttention (`attention_backend: sage`) is priced on the SDPA lines: it needs about what SDPA needs. The RTX 4090 ran the fit grid, the long joint sequences, the K/V-cache and the caption checks with it in bf16 and fp16 under both CUDA allocators on Windows, 40 forwards each (`--attention sage`, SageAttention 2.2.0 serving every block's attention; a point where it fell back to SDPA is refused). The 34 with an SDPA point of the same forward demanded 1.000 to 1.003 times it under the native allocator and 0.98 to 1.18 times under `cudaMallocAsync`, the top at 1024 px with a 512-token caption, where the cold forward, which includes SageAttention's check of its first result, read 1.20 times the warm one. The other 6, the long joint sequences and K/V-cache forwards in fp16 (SDPA ran those in bf16 only), read what their bf16 twins did under the native allocator and up to 2.1% less under `cudaMallocAsync`. The estimate covers all 80, 1.05 to 1.54 times under the native allocator and 1.05 to 1.52 under `cudaMallocAsync`. The 80 points carry the feature `attention_backend: sage`, which the line refuses (`ATTENTION_BACKEND_FEATURE`), so they ship as out-of-fit checks that bound the estimate from below, never fitted and never merged with an SDPA point. Not measured on Linux, on another GPU or with 4 blocks; masked attention (regional prompting) stays on SDPA under SageAttention.
+ - Cross-checks on the RTX 4090 (native allocator, ~84-token prompt), not shipped as points: in a running server the estimate reserved 1.22 to 1.66 times what the real 28-block model grew the reserved peak by over the transformer lock, GGUF Q4_K_M fully resident (1024 to 2048 px, with and without LoRAs, CFG, joint references and the reference K/V cache) and fp8-stored (partly resident in that run, 1.27 to 1.40 times). The top end falls at 1536 px, at 1536 × 2048 and at 1152 × 1536 with one joint reference, where the warm server's allocator reserved below the line. Loaded partially (the cache told the card has 11.76 GiB, GGUF Q4_K_M at 1152 × 1536 with two plain LoRAs, 6.3 to 6.9 GiB of its weights resident), the model grew the reserved peak by 2.37 GiB against an estimate of 3.30 GiB (1.39 times), with no out-of-memory; the device peaked at 10.85 to 10.86 of the 11.76 GiB, 0.3 GiB of simulated foreign use included.
+ - ROCm with the native allocator off Windows and every platform nothing measures price with the formula the node reserved by hand before the lines were measured, declared as the spec's `legacy_formula`: 0.5 MiB per attended token and a 1.5 GiB base for every dtype, times 1.1 with CFG and 1.35 with a style reference, plus the whole model's largest dequantization transient and half a GiB per LoRA, and the terms it lacked on top (the streamed layer, the fp8 cast, the sidecar residual). Those constants reserved 2.3 to 2.9 times what the real model demanded on the RTX 4090. ROCm's entry with the native allocator for every OS but Windows is `legacy`; the entries `priced_as` lends to unmeasured platforms, CUDA's and ROCm's with the native allocator (Windows' and the other OSes'), floor every value at the constants, which prices the formula there too. The reservation is the larger of the formula and the terms. `tests/app/invocations/test_krea2_denoise_working_memory.py` holds the legacy platforms byte for byte to the formula, frozen, and the unmeasured ones to at least it.
+ - A forward has two phases that never peak together. The block phase holds the line, a materialized score matrix (for the config's query heads), style reference's extra activations, and the largest block layer's streamed copy (charged on every forward, as for FLUX.2), dequantization or fp8 cast transient and sidecar residual. The layers outside the blocks never coincide with the block activations; the largest, the timestep modulation `time_mod_proj` (6144 × 36864), dequantizes to 1.23 GiB in Q4_K, yet GGUF Q4_K_M reserved only a near constant 0.35 GiB more than the fp8 build at every measured size. So the block layers' transients price the block phase, and `outer_layer_peak` adds what the largest single layer anywhere needs beyond the whole block phase; it is the one term that reads fitted values, and `bounds.line_bounds` reads it at 0.
+ - Resident through both phases: the caption excess, regional prompting's masks and bias, the reference K/V cache, a style reference's captured K/V, and the LoRA patches at their files' size: a 0.03 GiB and a 0.21 GiB bf16 file of plain `LoRALayer`s on the sidecar-patched GGUF Q4_K_M build measured +0.02 and +0.22 GiB, at 1152 × 1536 and 2048 px alike. Patch types that are no `LoRALayer` (LoKr, LoHa, DoRA, full layers) on a sidecar-patched layer (quantized, fp8-stored, or one partial loading may leave in RAM) rebuild a full residual weight per forward beside the base weight dequantized again (`_aggregate_patch_parameters`): the largest such layer's streamed copy, transient, and weight at float32 plus the compute dtype is priced once (`sidecar_patch_residual`), derived from the code path; a packed nvfp4 weight counts half its logical elements, so the residual reads low there, which its dequantization transient covers in practice. Known and not priced: on a dense bf16 or fp16 build a LoRA on a resident layer is patched directly, once, before the loop, at about 8 bytes per element of the largest patched layer (~1.7 GiB for `time_mod_proj`); it never coincides with the block activations, and the `device_working_mem_gb` floor of every reservation covers it. A style reference's extra activations are 0.35 × (0.5 MiB per step token + 1.5 GiB), because at 1024 px the styled run's peak rose ~1.6 GiB over the unstyled one, 0.5 GiB of it the captured K/V.
+ - Not measured: regional prompting, CFG with captions of unequal length, the patch types that are no `LoRALayer`, SageAttention anywhere but on the RTX 4090 under Windows, flash attention, ROCm off Windows, the real model on ROCm, int8 and bf16 builds of the real model. Known gap: on a backend that materializes score matrices, a styled block's queries also see the reference's keys, a larger matrix than priced. A family E2E calibration run would record real builds, LoRAs and CFG pairs as `probe_demand` points, which bound an estimate from below; none ship for Krea-2. The reference K/V-cache windows, the long-caption forwards, the 4-block forward and the SageAttention forwards ship as out-of-fit checks. `denoise.krea2` is not `user_calibrated`.
#### Measuring estimates: the probe
diff --git a/invokeai/app/invocations/krea2/krea2_denoise.py b/invokeai/app/invocations/krea2/krea2_denoise.py
index 11df13a668..3855318756 100644
--- a/invokeai/app/invocations/krea2/krea2_denoise.py
+++ b/invokeai/app/invocations/krea2/krea2_denoise.py
@@ -4,7 +4,7 @@ import statistics
import time
from contextlib import ExitStack, nullcontext
from pathlib import Path
-from typing import Any, Callable, Iterator, Optional
+from typing import Any, Callable, Optional
import torch
import torchvision.transforms as tv_transforms
@@ -25,7 +25,7 @@ from invokeai.app.invocations.fields import (
WithBoard,
WithMetadata,
)
-from invokeai.app.invocations.model import TransformerField
+from invokeai.app.invocations.model import LoRAField, TransformerField
from invokeai.app.invocations.primitives import LatentsOutput
from invokeai.app.services.shared.invocation_context import InvocationContext
from invokeai.backend.krea2.attention import (
@@ -33,11 +33,11 @@ from invokeai.backend.krea2.attention import (
build_krea2_attention_processors,
resolve_krea2_sdpa_backends,
)
+from invokeai.backend.krea2.denoise_working_memory import estimate_krea2_denoise_working_memory
from invokeai.backend.krea2.reference_edit import (
Krea2ReferenceKVCache,
forward_with_references,
precompute_reference_kv,
- reference_kv_cache_bytes,
)
from invokeai.backend.krea2.regional_prompting import (
Krea2RegionalPromptingExtension,
@@ -53,23 +53,18 @@ from invokeai.backend.krea2.sampling_utils import (
prepare_reference_position_ids,
unpack_latents,
)
-from invokeai.backend.krea2.style_reference import KREA2_NUM_BLOCKS
-from invokeai.backend.krea2.style_reference_extension import (
- KREA2_HEAD_DIM,
- KREA2_NUM_KV_HEADS,
- Krea2StyleReferenceExtension,
-)
+from invokeai.backend.krea2.style_reference_extension import Krea2StyleReferenceExtension
from invokeai.backend.krea2.text_encoding import KREA2_MAX_REFERENCE_IMAGES
+from invokeai.backend.model_manager.load.load_base import LoadedModel
from invokeai.backend.model_manager.taxonomy import BaseModelType
-from invokeai.backend.patches.layer_patcher import LayerPatcher, PatchSpec
+from invokeai.backend.patches.layer_patcher import LayerPatcher
from invokeai.backend.patches.lora_conversions.krea2_lora_constants import KREA2_LORA_TRANSFORMER_PREFIX
from invokeai.backend.patches.model_patch_raw import ModelPatchRaw
-from invokeai.backend.quantization.dequantizing_linear import peak_dequant_transient_bytes, requires_sidecar_patching
+from invokeai.backend.quantization.dequantizing_linear import requires_sidecar_patching
from invokeai.backend.rectified_flow.rectified_flow_inpaint_extension import RectifiedFlowInpaintExtension
from invokeai.backend.rectified_flow.schedule_shift import ShiftFit, load_scheduler
from invokeai.backend.stable_diffusion.diffusers_pipeline import PipelineIntermediateState
from invokeai.backend.stable_diffusion.diffusion.conditioning_data import Krea2ConditioningInfo
-from invokeai.backend.util.attention import sdpa_score_matrix_bytes
from invokeai.backend.util.devices import TorchDevice
from invokeai.backend.util.logging import InvokeAILogger
from invokeai.backend.util.sage_attention import sage_attention_scope
@@ -665,63 +660,32 @@ class Krea2DenoiseInvocation(BaseInvocation, WithMetadata, WithBoard):
transformer_config = context.models.get_config(self.transformer.transformer)
num_train_timesteps = scheduler.config.num_train_timesteps
- # Estimate the peak working memory (activations) the transformer forward needs and ask the model
- # cache to keep that much VRAM free. The cache offloads as much of the (resident) model to RAM as
- # required to honor this — only consequential at higher resolutions, where the activation footprint
- # over text+image tokens grows enough that a fully-resident ~12B model would otherwise leave no
- # headroom. Without this hint the cache reserves only the small default working memory and places
- # the model before LoRA patches are applied, so a model+LoRA combination that just fits the base
- # forward OOMs once the LoRA's extra activations are added.
- regional_attention_mask_bytes = self._regional_attention_mask_bytes(
- pos_extension, neg_extension, inference_dtype
- )
- # Joint references are image tokens to every block and count in full toward the activations. Cached ones
- # only run in the one reference-only pass, and their K/V stay resident for the whole loop.
- estimated_working_memory = self._estimate_working_memory(
- image_seq_len=image_seq_len + (0 if cache_references else reference_seq_len),
- positive_text_seq_len=pos_prompt_embeds.shape[1],
- negative_text_seq_len=neg_prompt_embeds.shape[1] if neg_prompt_embeds is not None else None,
- do_cfg=do_cfg,
- num_loras=len(self.transformer.loras),
- regional_attention_mask_bytes=regional_attention_mask_bytes,
- style_reference_kv_bytes=(
- style_extension.kv_cache_bytes(inference_dtype) if style_extension is not None else 0
- ),
- reference_precompute_seq_len=reference_seq_len if cache_references else 0,
- reference_kv_bytes=(
- self._reference_kv_cache_bytes(transformer_info.model, reference_seq_len, inference_dtype)
- if cache_references
- else 0
- ),
- )
- # The activation estimate assumes a fused kernel. Where the build has none for this attention -- ROCm on
- # Windows, MPS -- the score matrix is built as well (chunked on ROCm, see `install_rocm_sdpa_guard`).
- step_seq_len = image_seq_len + max(
- pos_prompt_embeds.shape[1], neg_prompt_embeds.shape[1] if neg_prompt_embeds is not None else 0
- )
- if cache_references:
- # Each pass's S queries see S + R keys, and the one reference-only pass is R x R. The helper prices a
- # square, so it gets the side of the larger area, rounded up.
- score_area = max(step_seq_len * (step_seq_len + reference_seq_len), reference_seq_len**2)
- score_seq_len = math.isqrt(score_area - 1) + 1
- else:
- score_seq_len = step_seq_len + reference_seq_len
- estimated_working_memory += self._attention_score_bytes(
+ # Loaded once: the estimate prices these patches and the patcher applies the same ones. Each load reports its
+ # progress, and the un-entered wrappers keep the LoRA records shielded from eviction until the patcher pins them.
+ loaded_loras = [(lora, self._load_lora(context, lora)) for lora in self.transformer.loras]
+
+ # The transformer's lock reserves what the whole denoise needs beside the weights: the forward, the cached
+ # reference or style K/V, regional masks and the LoRA patches applied under it.
+ working_memory = estimate_krea2_denoise_working_memory(
transformer_info.model,
- seq_len=score_seq_len,
- has_attn_mask=regional_attention_mask_bytes > 0,
+ image_seq_len=image_seq_len,
+ text_seq_len=max(
+ pos_prompt_embeds.shape[1], neg_prompt_embeds.shape[1] if neg_prompt_embeds is not None else 0
+ ),
+ style_text_seq_len=style_ref_prompt_embeds.shape[1] if style_ref_prompt_embeds is not None else 0,
+ reference_seq_len=reference_seq_len,
+ cache_references=cache_references,
+ cfg=do_cfg,
+ loras=[(lora_info.model, lora_info.config.file_size) for _, lora_info in loaded_loras],
+ regional_mask_bytes=self._regional_attention_mask_bytes(pos_extension, neg_extension, inference_dtype),
+ style_kv_bytes=style_extension.kv_cache_bytes(inference_dtype) if style_extension is not None else 0,
device=device,
dtype=inference_dtype,
)
- # An int8_tensorwise or GGUF build stores its linears quantized and materializes the dequantized
- # weight per forward call. That transient is alive alongside the activations above,
- # so it is added rather than compared -- and it is invisible to an activation estimate, which
- # is how a model that loaded comfortably OOMs in its first step. Zero for any other format.
- estimated_working_memory += peak_dequant_transient_bytes(transformer_info.model, inference_dtype)
with ExitStack() as exit_stack:
(cached_weights, transformer) = exit_stack.enter_context(
- transformer_info.model_on_device(working_mem_bytes=estimated_working_memory)
+ transformer_info.model_on_device(working_memory=working_memory)
)
# Whether LoRA has to go on as a sidecar. Asked of the loaded module tree rather than the
@@ -740,7 +704,9 @@ class Krea2DenoiseInvocation(BaseInvocation, WithMetadata, WithBoard):
exit_stack.enter_context(
LayerPatcher.apply_smart_model_patches(
model=transformer,
- patches=self._lora_iterator(context),
+ patches=(
+ (lora_info.model, lora.weight, lora_info.model_in_ram()) for lora, lora_info in loaded_loras
+ ),
prefix=KREA2_LORA_TRANSFORMER_PREFIX,
dtype=inference_dtype,
cached_weights=cached_weights,
@@ -954,19 +920,6 @@ class Krea2DenoiseInvocation(BaseInvocation, WithMetadata, WithBoard):
exit_stack.callback(cache.clear)
return cache
- @staticmethod
- def _reference_kv_cache_bytes(transformer: object, reference_seq_len: int, dtype: torch.dtype) -> int:
- """Size of the edit-reference K/V cache, from the loaded model's config (Krea-2 defaults where absent)."""
- config = getattr(transformer, "config", None)
- return reference_kv_cache_bytes(
- num_layers=getattr(config, "num_layers", KREA2_NUM_BLOCKS),
- num_heads=getattr(config, "num_attention_heads", 48),
- num_kv_heads=getattr(config, "num_key_value_heads", KREA2_NUM_KV_HEADS),
- head_dim=getattr(config, "attention_head_dim", KREA2_HEAD_DIM),
- reference_seq_len=reference_seq_len,
- element_size=torch.empty((), dtype=dtype).element_size(),
- )
-
@staticmethod
def _clear_attention_state(state: Krea2RegionalPromptingState) -> None:
"""Drop every tensor the shared attention state retains. Override alongside the state object."""
@@ -1003,102 +956,15 @@ class Krea2DenoiseInvocation(BaseInvocation, WithMetadata, WithBoard):
peak_attention_bias_bytes *= attention_dtype_bytes
return final_mask_bytes + peak_build_scratch_bytes + peak_attention_bias_bytes
- @staticmethod
- def _attention_score_bytes(
- transformer: object, seq_len: int, has_attn_mask: bool, device: torch.device, dtype: torch.dtype
- ) -> int:
- """The score matrix the main blocks' joint attention materializes, where it does (0 on a fused kernel).
-
- One call is alive at a time: the blocks run in sequence, and so do the conditional and unconditional passes.
- The K/V heads are expanded to the query heads before the call unless a fused kernel takes them grouped
- (`backend/krea2/attention.py`), so the query head count is the one that counts. Heads come from the loaded
- model's config. The probe answers for the process-wide policy the call runs under (`attention_backend: math`
- included), so forcing the math kernel through the `INVOKE_KREA2_SDPA_BACKEND` debugging switch is not priced.
- """
- config = getattr(transformer, "config", None)
- num_heads = getattr(config, "num_attention_heads", None)
- head_dim = getattr(config, "attention_head_dim", None)
- if not isinstance(num_heads, int) or not isinstance(head_dim, int):
- return 0
- return sdpa_score_matrix_bytes(
- device=device,
- dtype=dtype,
- num_heads=num_heads,
- head_dim=head_dim,
- seq_len=seq_len,
- has_attn_mask=has_attn_mask,
- )
-
- def _estimate_working_memory(
- self,
- image_seq_len: int,
- positive_text_seq_len: int,
- negative_text_seq_len: int | None,
- do_cfg: bool,
- num_loras: int,
- regional_attention_mask_bytes: int = 0,
- style_reference_kv_bytes: int = 0,
- reference_precompute_seq_len: int = 0,
- reference_kv_bytes: int = 0,
- ) -> int:
- """Estimate peak transformer activation memory (bytes) so the model cache reserves enough headroom.
-
- Without regional prompting, Krea-2's attention runs through SDPA / flash without materializing
- attention scores, so the baseline activation footprint scales ~linearly with the image token count
- with a *small* per-token constant. Regional bool masks and SDPA's dtype-sized additive bias are added
- separately through ``regional_attention_mask_bytes``. The previous ~2.6 MiB/token baseline assumed
- materialized O(seq^2) scores and massively over-estimated: at 2560x1440 (14400 tokens) it demanded
- ~36 GB, which exceeds a 24 GB card, so the cache offloaded the *transformer itself* to RAM and the
- forward pass ran from system memory over PCIe — no OOM, but effectively hung (no step in minutes).
-
- The per-token constant below is a safe upper bound on the measured SDPA activation footprint of the
- Krea-2-Turbo MMDiT in bf16 (residual stream + one block's attention/SwiGLU intermediates), leaving
- several GB of margin. Conditional and unconditional passes run sequentially, so peak memory depends
- on the longer text sequence rather than their sum. A fixed base covers resolution-independent overhead
- (transient fp8->bf16 layerwise weight casts and allocator/reserved-memory slack). LoRA sidecar
- patches add a small extra activation branch per patched layer, so we add a per-LoRA margin.
- """
- GB = 1024**3
- MB = 1024**2
- per_token_bytes = int(0.5 * MB)
- text_seq_len = max(positive_text_seq_len, negative_text_seq_len or 0)
- # The edit-reference K/V precompute runs the references alone, before the loop; its peak is the larger
- # one when the references outnumber the per-step tokens.
- estimated = max(image_seq_len + text_seq_len, reference_precompute_seq_len) * per_token_bytes
- estimated += int(1.5 * GB)
- if do_cfg:
- # Conditional/unconditional passes are sequential, but the larger combined sequence and extra
- # transient buffers warrant a modest bump.
- estimated = int(estimated * 1.1)
- estimated += regional_attention_mask_bytes
- if style_reference_kv_bytes > 0:
- # The captured reference K/V stay resident for the whole target pass: two tensors per styled
- # block, at the pre-expansion KV head count (12, not 48 — see style_reference.py). ~0.5 GiB at
- # 1024x1024, ~1.7 GiB at 2560x1440. On top of that the styled attention runs with a key
- # sequence of S + image_seq_len, and the reference forward briefly holds its own activations.
- # Measured at 1024x1024 (8 steps, cfg 1.0): peak VRAM rises ~1.6 GiB over the unstyled run, of
- # which ~0.5 GiB is the cache itself — so the activation term needs ~35%, not the 20% the
- # arithmetic alone suggested. The captured K/V are an exact, known size, so they are added
- # after the multiplier rather than scaled by it.
- estimated = int(estimated * 1.35)
- estimated += style_reference_kv_bytes
- # The cached reference K/V are an exact size and stay resident through the loop, like the style cache.
- estimated += reference_kv_bytes
- if num_loras > 0:
- estimated += int(0.5 * num_loras * GB)
- return estimated
-
def _build_step_callback(self, context: InvocationContext) -> Callable[[PipelineIntermediateState], None]:
def step_callback(state: PipelineIntermediateState) -> None:
context.util.sd_step_callback(state, BaseModelType.Krea2)
return step_callback
- def _lora_iterator(self, context: InvocationContext) -> Iterator[PatchSpec]:
- for lora in self.transformer.loras:
- lora_info = context.models.load(lora.lora)
- if not isinstance(lora_info.model, ModelPatchRaw):
- raise TypeError(
- f"Expected ModelPatchRaw for LoRA '{lora.lora.key}', got {type(lora_info.model).__name__}."
- )
- yield (lora_info.model, lora.weight, lora_info.model_in_ram())
+ @staticmethod
+ def _load_lora(context: InvocationContext, lora: LoRAField) -> LoadedModel:
+ lora_info = context.models.load(lora.lora)
+ if not isinstance(lora_info.model, ModelPatchRaw):
+ raise TypeError(f"Expected ModelPatchRaw for LoRA '{lora.lora.key}', got {type(lora_info.model).__name__}.")
+ return lora_info
diff --git a/invokeai/backend/krea2/denoise_working_memory.py b/invokeai/backend/krea2/denoise_working_memory.py
new file mode 100644
index 0000000000..2c272cea07
--- /dev/null
+++ b/invokeai/backend/krea2/denoise_working_memory.py
@@ -0,0 +1,414 @@
+"""The working memory of one Krea-2 denoise, as the denoise node reserves it for the transformer's lock.
+
+The transformer attends over one joint sequence: the caption's tokens, the image's (one per 16x16 pixels) and those of
+every joint edit reference, which `reference_edit.forward_with_references` appends to the image stream. On a fused SDPA
+kernel its activations scale linearly with that sequence: `k_denoise_<dtype>` bytes per attended token plus a base of
+`b_denoise_<dtype>` bytes, shipped per platform in `backend/working_memory/data/denoise.json`. Conditional and
+unconditional passes run one after the other, so only the longer caption counts and CFG adds nothing; a style
+reference's pass runs alone too, over the image and its own caption. In reference K/V-cache mode the references leave
+the per-step sequence: they run once, alone, before the loop (`reference_edit.precompute_reference_kv`). The line prices
+the longest of these passes. 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>` over the attended tokens (`_line`), and only the plain forward fits it, joint references
+included: every analytic term below comes to zero, and no attention mask is passed. `_line` reads that off the terms
+themselves, so a term added here takes the forwards it prices out of the fit. The lines are PyTorch SDPA's: a forward
+measured with SageAttention (`attention_backend: sage`) carries `ATTENTION_BACKEND_FEATURE`, which the estimate never
+emits, as it prices SageAttention as SDPA. `_line` refuses it, so such a point checks the estimate from below and never
+joins, or merges with, an SDPA point. 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_krea2_working_memory.py`
+(their provenance is in the data): an RTX 4090 with the native allocator and with `cudaMallocAsync`, bf16, fp16 and
+fp32 from 512 to 2048 px with a 512-token caption, at 1024 and 1536 px with a 77-token one, at 1024 px with one to three
+1024 px joint references, and in bf16 joint sequences up to 29184 tokens, on a random-init transformer of the default
+geometry with 2 blocks; 4 blocks measured the same as 2. bf16 and fp16 take the same per token; fp32's slope is 1.67
+times theirs under the native allocator and 1.89 times under `cudaMallocAsync`. Under the native allocator joint
+references lie on the line of the plain forwards; under `cudaMallocAsync` a warm forward with one reference read 18%
+above its cold one and holds the line up. CUDA on Linux reuses these lines, as the Z-Image and FLUX.2 entries do.
+An RX 9060 XT (ROCm 10 on Windows, AOTriton's fused SDPA) measured the same grid with expandable segments and with the
+native allocator, each an entry for Windows alone, joint sequences up to 29184 tokens in bf16 and fp16 too. fp32 runs
+up to 22016 tokens with expandable segments and 16896 under the native allocator: its longer sequences were skipped,
+as the shipped line plus the weights prices them beyond the card's ~14.9 GiB free. Its native allocator takes CUDA's
+slope in bf16 and fp16 over a larger base (0.30 MiB per token plus 494 and 522 MiB); expandable segments take 0.20 MiB
+plus 407 and 435 MiB, and with them 4 blocks measured the same as 2 too (the native allocator ran no 4-block forward).
+The card did not drive the desktop: per-process demand is the same, but WDDM paging on a card that also carries the
+desktop is not measured.
+
+SageAttention is priced on the SDPA lines: it needs about what SDPA needs. The RTX 4090 ran the fit grid, the large
+grid, the K/V-cache and the caption checks with it (`--attention sage`, SageAttention 2.2.0 serving every block's
+attention), in bf16 and fp16 under both CUDA allocators on Windows, 40 forwards each. 34 of them have an SDPA point of
+the same forward: under the native allocator they demanded 1.000 to 1.003 times it; under `cudaMallocAsync` 0.98 to
+1.18 times, the top at 1024 px with a 512-token caption, where the cold forward, which includes SageAttention's check of
+its first result, read 1.20 times the warm one. The other 6, the large and K/V-cache forwards in fp16 (SDPA ran those
+in bf16 only), read what their bf16 twins did under the native allocator and up to 2.1% less under `cudaMallocAsync`.
+The estimate covers all 80, 1.05 to 1.54 times under the native allocator and 1.05 to 1.52 times under
+`cudaMallocAsync`. They ship as out-of-fit checks: they bound the estimate from below and fit no line. SageAttention is
+not measured on Linux, on another GPU or with 4 blocks; masked attention (regional prompting) stays on SDPA under it.
+
+A caption token reserves more than an image token, while allocated memory grows alike for both: 0.73 to 0.95 against
+0.30 MiB per token in bf16 and fp16 under the native allocator, 1.2 to 2.2 against 0.50 in fp32 (the 77- against the
+512-token caption at 4096 and 9216 image tokens). One slope prices both up to the 512 tokens the fit grid runs, so a
+short caption reserves up to 1.35 times what it demands (`bounds.UPPER_BOUND_EXCEPTIONS`). Beyond 512, which regional
+prompting reaches by concatenating its captions, each caption token adds `_CAPTION_EXCESS_BYTES_PER_TOKEN` on top of
+the line. The caption checks measure it (`--mode captions`: 1024- and 2048-token captions at 4096 and 9216 image tokens,
+every dtype, on every measured platform, out of the fit), as do the same checks on Linux on an RTX 6000 Ada (the 4090's
+AD102 chip) under both CUDA allocators, shipped without its fit-grid points: the line alone falls short at 2048
+tokens, by up to 23% (down to 0.77 times the demand). The term is the most a check demanded per caption token beyond
+512 above the line's slope, over every shipped caption check, times the 1.3 that bounds a fitted term
+(`bounds.MAX_OVER_RESERVATION`), rounded up to the next 0.01 MiB. In bf16 and fp16 CUDA's native allocator sets it:
+0.26 MiB (1024 px, 2048 tokens) gives 0.34 MiB. In fp32 the RTX 6000 Ada under `cudaMallocAsync` does: 0.56 MiB
+(1024 px, 2048 tokens) gives 0.74 MiB; CUDA's native allocator demanded at most 0.39 MiB, the RTX 4090 under
+`cudaMallocAsync` 0.24 and the RX 9060 XT 0.37. The estimate covers every check, 1.05 to 1.54 times in bf16 and fp16
+and 1.08 to 1.67 times in fp32 under CUDA's native allocator (both cards measured the same), 1.21 to 1.50 and 1.14 to
+1.34 times under `cudaMallocAsync` on the RTX 4090 and 1.17 to 1.50 and 1.07 to 1.40 times on the RTX 6000 Ada, 1.05 to
+1.46 and 1.08 to 1.63 times under ROCm's native allocator, 1.17 to 1.43 and 1.33 to 1.45 times with expandable
+segments. On the RTX 4090 each group's largest ratio falls on a forward the line alone already covers 1.09 to 1.47
+times.
+
+Cross-checks in a running server on the RTX 4090 under the native allocator with an ~84-token prompt, not shipped as
+points: the estimate reserved 1.22 to 1.66 times what the real 28-block model grew the reserved peak by over the
+transformer lock, GGUF Q4_K_M fully resident (1024 to 2048 px, with and without LoRAs, CFG, joint references and the
+reference K/V cache) and fp8-stored (partly resident in that run, 1.27 to 1.40 times). The top end falls at 1536 px, at
+1536x2048 and at 1152x1536 with one joint reference, where the warm server's allocator reserved below the line. Loaded
+partially (the cache told the card has 11.76 GiB, GGUF Q4_K_M at 1152x1536 with two LoRAs, 6.3 to 6.9 of its weights'
+GiB resident), the model grew the reserved peak by 2.37 GiB against an estimate of 3.30 GiB (1.39 times), with no
+out-of-memory; the device peaked at 10.85 to 10.86 of the 11.76 GiB, 0.3 GiB of simulated foreign use included.
+
+ROCm with the native allocator off Windows is not measured, and neither is any platform but these four. They price with
+the formula the node reserved by hand before the lines were measured (`_legacy_formula`, declared as
+`EstimatorSpec.legacy_formula`): 0.5 MiB per attended token and a 1.5 GiB base for every dtype, times 1.1 with CFG and
+1.35 with a style reference, plus the whole model's largest dequantization transient and half a GiB per LoRA, with the
+terms it lacked on top. On the RTX 4090 those constants reserved 2.3 to 2.9 times what the real model demanded. ROCm's
+entry with the native allocator for every OS but Windows is `legacy`; every other platform nothing measures is priced as
+a measured one (`priced_as`), and the entries those borrow, CUDA's and ROCm's with the native allocator (Windows' and
+the other OSes'), floor their values at the legacy constants (`unmeasured_floor`), which prices that formula there too.
+Either way the reservation is the larger of the formula and the terms below.
+
+A forward has two phases that never peak together. The blocks run over the whole sequence, and every term of the
+block phase is alive at once: the line, the score matrix where SDPA materializes it, style reference's extra
+activations, and the largest block layer's streamed copy, dequantization or fp8 cast transient and LoRA residual. The
+layers outside the blocks run on far fewer live activations: the timestep modulation `time_mod_proj` (6144 x 36864, the
+model's largest linear) runs before the blocks, also for the references' modulation, and never coincides with the block
+activations. Its transient decides a quantized build's whole-model peak (1.23 GiB for Q4_K), yet GGUF Q4_K_M reserved a
+near constant 0.35 GiB more than the fp8 build at every measured size, about what dequantizing the largest block linears
+(the MLP's, 6144 x 16384) costs beyond the fp8 build's cast of them. So the block phase prices the block layers'
+transients, and `outer_layer_peak` adds only what the largest single layer anywhere needs beyond the whole block phase.
+It is the one term that reads fitted values; `bounds.line_bounds` prices a point with the line deciding, where it is 0.
+
+Resident through both phases, and priced on top of either: the caption excess, regional prompting's masks, the reference
+K/V cache, the style reference's captured K/V, and the LoRA patches.
+
+The analytic terms:
+
+- The largest block layer's stored weights, for a transformer the model cache may load partially: a RAM-held layer is
+ copied to the device for its forward, alive during its matmul. Whether the cache loads the transformer whole is
+ decided by the lock this estimate sizes, so the node charges it on every forward (as the FLUX.2 denoise does); a
+ fully resident model over-reserves one layer. The calibration script, whose models are resident, declares them so.
+- The dequantization copy an int8_tensorwise, nvfp4 or GGUF build materializes per quantized block linear
+ (`peak_dequant_transient_bytes`), and the compute-dtype copies of a block layer's float8-stored weights
+ (`peak_fp8_cast_transient_bytes`); zero for every other build.
+- `outer_layer_peak`: the largest single layer's streamed copy plus its transients, anywhere in the model, less the
+ whole block phase where it exceeds it.
+- Where SDPA has no fused kernel for these shapes it materializes the score matrices (`sdpa_score_matrix_bytes`), for
+ the query heads of the transformer's config: the K/V heads are expanded before the call unless a fused kernel takes
+ them grouped (`krea2/attention.py`). In K/V-cache mode each step's queries see the cached keys too, and the precompute
+ is a square of the references' tokens; the larger area is priced as the smallest square that holds it. The probe
+ answers for the process-wide policy, so a kernel forced through the `INVOKE_KREA2_SDPA_BACKEND` debugging switch is
+ not priced. Known gap: a styled block's queries also see the reference's keys, a larger score matrix than priced.
+- Regional prompting's masks, their construction scratch and SDPA's additive bias, as the node sizes them
+ (`Krea2DenoiseInvocation._regional_attention_mask_bytes`). Not measured.
+- The reference K/V cache, an exact size (`reference_edit.reference_kv_cache_bytes`): one key and one value per block at
+ the K/V heads, plus one block's references expanded to the query heads. On the RTX 4090 the real model's K/V-cache
+ denoises (1152x1536 with one and three references) followed that structure: the larger of the step's and the
+ references' tokens on the line, plus the cache.
+- Style reference's captured K/V, an exact size, and the extra activations of the styled attention and the reference
+ pass: 0.35 times 0.5 MiB per step token plus 0.35 times 1.5 GiB, because at 1024 px (8 steps, cfg 1) the styled run's
+ peak rose ~1.6 GiB over the unstyled one, 0.5 GiB of it the cache. Not measured against the line.
+- The LoRA patches, at their files' size: a 0.03 GiB and a 0.21 GiB bf16 file of plain LoRA layers (`LoRALayer`) on the
+ sidecar-patched GGUF Q4_K_M build added 0.02 and 0.22 GiB on the RTX 4090, at 1152x1536 and at 2048 px alike.
+- The sidecar residual of the other patch types (LoKr, LoHa, DoRA, full layers and the rest that are no `LoRALayer`),
+ wherever a layer is patched as a sidecar: a quantized or fp8-stored layer, or one partial loading leaves in RAM.
+ `autocast_linear_forward_sidecar_patches` hands them to `_aggregate_patch_parameters`, which per forward copies the
+ base weight to the device and dequantizes it again, and builds the full residual weight, cast to the input's dtype,
+ beside the base output. For the largest layer such a patch targets, the layer's streamed copy (unless resident), its
+ dequantization or fp8 cast transient, and its weight's elements at float32 plus the compute dtype. Derived from the
+ code path, not measured; once, since the layers run one after another. A packed nvfp4 weight counts half its logical
+ elements, so the residual reads low there; its dequantization transient covers that in practice.
+
+Known and not priced: on a dense bf16 or fp16 build a LoRA on a resident layer is patched directly, once, before the
+loop, which takes about 8 bytes per element of the largest patched layer (~1.7 GiB for `time_mod_proj`). It never
+coincides with the block activations, and the `device_working_mem_gb` floor of every reservation covers it.
+
+Not measured: SageAttention anywhere but on the RTX 4090 under Windows, flash attention (Linux), ROCm off Windows, the
+real model on ROCm, int8 and bf16 builds of the real model, regional prompting, CFG with captions of unequal length,
+and the patch types that are no `LoRALayer`.
+"""
+
+import math
+from collections.abc import Mapping, Sequence
+from typing import Final, Optional, cast
+
+import torch
+
+from invokeai.backend.krea2.reference_edit import reference_kv_cache_bytes
+from invokeai.backend.patches.layer_patcher import LayerPatcher
+from invokeai.backend.patches.layers.lora_layer import LoRALayer
+from invokeai.backend.patches.lora_conversions.krea2_lora_constants import KREA2_LORA_TRANSFORMER_PREFIX
+from invokeai.backend.patches.model_patch_raw import ModelPatchRaw
+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, 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
+
+_MIB: Final = 2**20
+_GIB: Final = 2**30
+FITTED_CAPTION_TOKENS: Final = 512
+"""The caption the fit grid runs; the line covers captions up to it."""
+_CAPTION_EXCESS_BYTES_PER_TOKEN: Final[Mapping[str, int]] = {
+ "bf16": int(0.34 * _MIB),
+ "fp16": int(0.34 * _MIB),
+ "fp32": int(0.74 * _MIB),
+}
+"""Per caption token beyond `FITTED_CAPTION_TOKENS`: the caption checks' largest demand above the line's slope, times
+`bounds.MAX_OVER_RESERVATION`, rounded up to the next 0.01 MiB (see the module docstring)."""
+_STYLE_ACTIVATION_SHARE: Final = 0.35
+_STYLE_ACTIVATION_BYTES_PER_TOKEN: Final = _MIB // 2
+_STYLE_ACTIVATION_BASE_BYTES: Final = 3 * _GIB // 2
+_RESIDUAL_BYTES_PER_ELEMENT: Final = torch.float32.itemsize
+"""A sidecar residual weight is built in at most float32, then cast to the input's dtype."""
+_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."""
+_COEFFICIENTS: Final = frozenset(f"{part}_denoise_{dtype}" for part in ("k", "b") for dtype in _DTYPE_NAMES.values())
+ATTENTION_BACKEND_FEATURE: Final = "attention_backend"
+"""The feature a measured point names the attention backend with where it is not PyTorch SDPA: `sage`. Absent from the
+estimate's own features and from every SDPA point (see the module docstring)."""
+
+
+def _line(features: Mapping[str, FeatureValue]) -> Optional[Line]:
+ """The forward's line, `denoise_<dtype>` over the attended tokens. Only the plain forward fits it, joint references
+ included: no attention mask, every analytic term of `_terms` zero and PyTorch SDPA's attention (see the module
+ docstring). The label names what puts a forward off the line: the mask, each analytic term that is not zero, in
+ bytes, and another attention backend. A dtype without a line names none."""
+ dtype, tokens = features.get("dtype"), features.get("tokens")
+ if not isinstance(dtype, str) or f"k_denoise_{dtype}" not in _COEFFICIENTS or not isinstance(tokens, int):
+ return None
+ off_line = off_line_reasons(_terms, features, _COEFFICIENTS)
+ if ATTENTION_BACKEND_FEATURE in features:
+ off_line.append(f"{ATTENTION_BACKEND_FEATURE}={features[ATTENTION_BACKEND_FEATURE]}")
+ references, cached = features.get("reference_tokens"), features.get("cached_reference_tokens")
+ shape = "+".join(
+ (
+ str(features.get("image_tokens")),
+ *([f"{references}ref"] if references else []),
+ *([f"{cached}kvref"] if cached else []),
+ f"{features.get('text_tokens')}tok",
+ )
+ )
+ return Line(f"denoise_{dtype}", tokens, not off_line, "-".join(("denoise", dtype, shape, *off_line)))
+
+
+def _step_tokens(features: Mapping[str, FeatureValue]) -> int:
+ """The tokens of one target pass: the image, the joint references and the longer caption of a CFG pair."""
+ return sum(cast(int, features[name]) for name in ("image_tokens", "reference_tokens", "text_tokens"))
+
+
+def _terms(features: Mapping[str, FeatureValue], values: Mapping[str, float]) -> tuple[WorkingMemoryTerm, ...]:
+ dtype = cast(str, features["dtype"])
+ style_kv_bytes = cast(int, features["style_kv_bytes"])
+ style_activation_bytes = 0
+ if style_kv_bytes:
+ # Whole bytes, so that a legacy-priced reservation sums to its formula exactly.
+ style_activation_bytes = int(
+ _STYLE_ACTIVATION_SHARE
+ * (_STYLE_ACTIVATION_BYTES_PER_TOKEN * _step_tokens(features) + _STYLE_ACTIVATION_BASE_BYTES)
+ )
+ caption = max(cast(int, features["text_tokens"]), cast(int, features["style_text_tokens"]))
+ caption_excess = max(0, caption - FITTED_CAPTION_TOKENS) * _CAPTION_EXCESS_BYTES_PER_TOKEN[dtype]
+ blocks = (
+ WorkingMemoryTerm.fitted("activations", f"k_denoise_{dtype}", cast(int, features["tokens"]), values),
+ WorkingMemoryTerm.fitted("base", f"b_denoise_{dtype}", 1, values),
+ WorkingMemoryTerm("attention_scores", cast(int, features["score_matrix_bytes"]), True),
+ WorkingMemoryTerm("style_reference_activations", style_activation_bytes, True),
+ WorkingMemoryTerm("streamed_layer", cast(int, features["streamed_layer_bytes"]), True),
+ WorkingMemoryTerm("dequant_transient", cast(int, features["dequant_transient_bytes"]), True),
+ WorkingMemoryTerm("fp8_cast_transient", cast(int, features["fp8_cast_transient_bytes"]), True),
+ WorkingMemoryTerm("sidecar_patch_residual", cast(int, features["sidecar_residual_bytes"]), True),
+ )
+ block_phase = sum(term.bytes for term in blocks)
+ return (
+ *blocks,
+ WorkingMemoryTerm("outer_layer_peak", max(0.0, cast(int, features["peak_layer_bytes"]) - block_phase), True),
+ WorkingMemoryTerm("caption_excess", caption_excess, True),
+ WorkingMemoryTerm("regional_attention_masks", cast(int, features["regional_mask_bytes"]), True),
+ WorkingMemoryTerm("reference_kv_cache", cast(int, features["reference_kv_bytes"]), True),
+ WorkingMemoryTerm("style_reference_kv_cache", style_kv_bytes, True),
+ WorkingMemoryTerm("lora_patches", cast(int, features["lora_bytes"]), True),
+ )
+
+
+def _legacy_formula(features: Mapping[str, FeatureValue], values: Mapping[str, float]) -> float:
+ """What the node reserved by hand before the lines were measured, with the legacy-priced values in place of its
+ 0.5 MiB per token and 1.5 GiB base, plus the terms it lacked: the streamed layer, the fp8 cast and the sidecar
+ residual. It priced neither the style reference's caption nor captions beyond the fit grid's apart."""
+ dtype = cast(str, features["dtype"])
+ tokens = max(_step_tokens(features), cast(int, features["cached_reference_tokens"]))
+ estimated = tokens * values[f"k_denoise_{dtype}"] + values[f"b_denoise_{dtype}"]
+ if features["cfg"]:
+ estimated = int(estimated * 1.1)
+ estimated += cast(int, features["regional_mask_bytes"])
+ if features["style_kv_bytes"]:
+ estimated = int(estimated * 1.35) + cast(int, features["style_kv_bytes"])
+ estimated += cast(int, features["reference_kv_bytes"])
+ estimated += int(0.5 * cast(int, features["lora_count"]) * _GIB)
+ estimated += cast(int, features["score_matrix_bytes"]) + cast(int, features["model_dequant_transient_bytes"])
+ lacked = ("streamed_layer_bytes", "fp8_cast_transient_bytes", "sidecar_residual_bytes")
+ return estimated + sum(cast(int, features[name]) for name in lacked)
+
+
+KREA2_DENOISE_SPEC = register(
+ EstimatorSpec(
+ id="denoise.krea2",
+ version=1,
+ coefficients=_COEFFICIENTS,
+ platform_keys=("conv_backend", "allocator"),
+ terms=_terms,
+ line=_line,
+ legacy_formula=_legacy_formula,
+ )
+)
+
+
+def _transient_bytes(module: torch.nn.Module, dtype: torch.dtype) -> int:
+ """The dequantization and fp8 cast transients of one leaf layer's forward."""
+ return peak_dequant_transient_bytes(module, dtype) + peak_fp8_cast_transient_bytes(module, dtype)
+
+
+def _peak_layer_bytes(transformer: torch.nn.Module, dtype: torch.dtype, weights_resident: bool) -> int:
+ """The most one layer of `transformer` needs while it runs: its streamed copy (none for resident weights) plus,
+ for a leaf layer, its dequantization and fp8 cast transients."""
+ peak = 0
+ for module in transformer.modules():
+ streamed = 0 if weights_resident else module_bytes(module)
+ transient = _transient_bytes(module, dtype) if next(module.children(), None) is None else 0
+ peak = max(peak, streamed + transient)
+ return peak
+
+
+def _sidecar_residual_bytes(
+ transformer: torch.nn.Module, patches: Sequence[ModelPatchRaw], dtype: torch.dtype, weights_resident: bool
+) -> int:
+ """The largest per-forward residual a patch that is no `LoRALayer` costs on a layer patched as a sidecar (see the
+ module docstring); 0 without such a patch. Layer keys are resolved as `LayerPatcher` resolves them."""
+ peak = 0
+ for patch in patches:
+ flattened = not any("." in key for key in patch.layers)
+ for key, layer in patch.layers.items():
+ if isinstance(layer, LoRALayer) or not key.startswith(KREA2_LORA_TRANSFORMER_PREFIX):
+ continue
+ try:
+ _, module = LayerPatcher._get_submodule(
+ transformer, key[len(KREA2_LORA_TRANSFORMER_PREFIX) :], layer_key_is_flattened=flattened
+ )
+ except AttributeError:
+ continue
+ weight = getattr(module, "weight", None)
+ if not isinstance(weight, torch.Tensor):
+ continue
+ transient = _transient_bytes(module, dtype)
+ if weights_resident and not transient:
+ # A resident dense layer is patched directly: its weight changes once, not per forward.
+ continue
+ streamed = 0 if weights_resident else module_bytes(module)
+ residual = math.prod(weight.shape) * (_RESIDUAL_BYTES_PER_ELEMENT + dtype.itemsize)
+ peak = max(peak, streamed + transient + residual)
+ return peak
+
+
+def estimate_krea2_denoise_working_memory(
+ transformer: torch.nn.Module,
+ *,
+ image_seq_len: int,
+ text_seq_len: int,
+ style_text_seq_len: int = 0,
+ reference_seq_len: int = 0,
+ cache_references: bool = False,
+ cfg: bool = False,
+ loras: Sequence[tuple[ModelPatchRaw, int]] = (),
+ regional_mask_bytes: int = 0,
+ style_kv_bytes: int = 0,
+ weights_resident: bool = False,
+ device: torch.device,
+ dtype: torch.dtype,
+) -> WorkingMemoryEstimate:
+ """The working memory the denoise needs on `device` in `dtype` while it holds `transformer`'s lock.
+
+ `transformer` is the Krea-2 transformer about to be locked, read unlocked for its geometry and its layers' streamed
+ copies and transients. `text_seq_len` is the longer caption of a CFG pair, `style_text_seq_len` the caption of a
+ style reference's pass (0 without one), `reference_seq_len` every edit reference's tokens, which run in the
+ per-step sequence or, with `cache_references`, once alone into a K/V cache. `cfg` is whether a negative pass runs.
+ `loras` are the patches applied under the lock, each with its file's size. `regional_mask_bytes` is regional
+ prompting's masks and bias (a mask is then passed to the attention), `style_kv_bytes` a style reference's captured
+ K/V (0 without one). `weights_resident` is True only where the caller knows every weight stays on the device;
+ otherwise the largest layer is reserved for streaming, and every patched layer may be a sidecar.
+ """
+ dtype_name = _DTYPE_NAMES.get(dtype)
+ if dtype_name is None:
+ raise ValueError(
+ f"Working-memory estimator '{KREA2_DENOISE_SPEC.id}' has no {dtype} line on {platform_for(device)}: the "
+ "transformer runs in a dtype it is not measured for."
+ )
+ config = transformer.config
+ joint_references = 0 if cache_references else reference_seq_len
+ cached_references = reference_seq_len if cache_references else 0
+ step_tokens = image_seq_len + text_seq_len + joint_references
+ style_tokens = image_seq_len + style_text_seq_len if style_text_seq_len else 0
+ score_side = max(step_tokens, style_tokens)
+ if cached_references:
+ area = max(step_tokens * (step_tokens + cached_references), cached_references**2)
+ score_side = math.isqrt(area - 1) + 1
+ has_attention_mask = regional_mask_bytes > 0
+ blocks = cast(torch.nn.ModuleList, transformer.transformer_blocks)
+ patches = [patch for patch, _ in loras]
+ features: dict[str, FeatureValue] = {
+ "image_tokens": image_seq_len,
+ "text_tokens": text_seq_len,
+ "style_text_tokens": style_text_seq_len,
+ "reference_tokens": joint_references,
+ "cached_reference_tokens": cached_references,
+ "tokens": max(step_tokens, style_tokens, cached_references),
+ "dtype": dtype_name,
+ "has_attention_mask": has_attention_mask,
+ "cfg": cfg,
+ "score_matrix_bytes": sdpa_score_matrix_bytes(
+ device=device,
+ dtype=dtype,
+ num_heads=config.num_attention_heads,
+ head_dim=config.attention_head_dim,
+ seq_len=score_side,
+ has_attn_mask=has_attention_mask,
+ ),
+ "streamed_layer_bytes": 0 if weights_resident else largest_module_bytes(blocks),
+ "dequant_transient_bytes": peak_dequant_transient_bytes(blocks, dtype),
+ "fp8_cast_transient_bytes": peak_fp8_cast_transient_bytes(blocks, dtype),
+ "peak_layer_bytes": _peak_layer_bytes(transformer, dtype, weights_resident),
+ "model_dequant_transient_bytes": peak_dequant_transient_bytes(transformer, dtype),
+ "sidecar_residual_bytes": _sidecar_residual_bytes(transformer, patches, dtype, weights_resident),
+ "regional_mask_bytes": regional_mask_bytes,
+ "reference_kv_bytes": reference_kv_cache_bytes(
+ num_layers=len(blocks),
+ num_heads=config.num_attention_heads,
+ num_kv_heads=config.num_key_value_heads,
+ head_dim=config.attention_head_dim,
+ reference_seq_len=cached_references,
+ element_size=dtype.itemsize,
+ ),
+ "style_kv_bytes": style_kv_bytes,
+ "lora_count": len(loras),
+ "lora_bytes": sum(size for _, size in loras),
+ }
+ return KREA2_DENOISE_SPEC.estimate(features, device)
diff --git a/invokeai/backend/util/calc_tensor_size.py b/invokeai/backend/util/calc_tensor_size.py
index 1a715e4b98..ca14e4b8e5 100644
--- a/invokeai/backend/util/calc_tensor_size.py
+++ b/invokeai/backend/util/calc_tensor_size.py
@@ -18,13 +18,12 @@ def calc_tensors_size(tensors: list[torch.Tensor | None]) -> int:
return sum(calc_tensor_size(t) for t in tensors if t is not None)
+def module_bytes(module: torch.nn.Module) -> int:
+ """A module's own parameters and buffers as stored: what partial loading copies to the device for its forward."""
+ return sum(calc_tensor_size(t) for t in (*module.parameters(recurse=False), *module.buffers(recurse=False)))
+
+
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,
- )
+ """The largest `module_bytes` of `model`'s modules: what partial loading copies to the device for one layer's
+ forward. 0 for a model without tensors."""
+ return max((module_bytes(module) for module in model.modules()), default=0)
diff --git a/invokeai/backend/util/sage_attention.py b/invokeai/backend/util/sage_attention.py
index 1d77825338..2c2df0aa3f 100644
--- a/invokeai/backend/util/sage_attention.py
+++ b/invokeai/backend/util/sage_attention.py
@@ -72,31 +72,35 @@ DOCS_URL = "https://invoke-ai.github.io/InvokeAI-7/configuration/optimization/sa
@dataclass
-class _Usage:
- """What one scope's attention calls ran on. Logged at DEBUG when the scope closes."""
+class SageAttentionUsage:
+ """What one scope's attention calls ran on. Logged at DEBUG when the scope closes; `sage_attention_scope` yields
+ it, so a caller that has to know whether SageAttention served its calls can read it."""
served: int = 0
fell_back: Counter[str] = field(default_factory=Counter)
+ """Calls PyTorch SDPA served instead, by `_ineligible`'s reason or the wrapper's (``memory``, ``device``, ``cache``,
+ ``error``)."""
# Set once SageAttention's quantized copies did not fit; the rest of the scope then stays on SDPA.
memory_short: bool = False
-_scope: ContextVar[_Usage | None] = ContextVar("invokeai_sage_attention_scope", default=None)
+_scope: ContextVar[SageAttentionUsage | None] = ContextVar("invokeai_sage_attention_scope", default=None)
# Keyed by CUDA index; validated variants by (index, dtype, head size), the inputs that pick a different kernel.
_health = TritonKernelHealth()
@contextmanager
-def sage_attention_scope() -> Iterator[None]:
- """Let SageAttention serve the eligible attention calls this thread makes inside the block.
+def sage_attention_scope() -> Iterator[SageAttentionUsage]:
+ """Let SageAttention serve the eligible attention calls this thread makes inside the block, and count them in the
+ usage it yields.
- A no-op unless ``install_sage_attention`` installed the wrapper. Denoise invocations enter it around the
- transformer forward passes of architectures whose output was validated against SDPA.
+ A no-op unless ``install_sage_attention`` installed the wrapper: the usage then stays empty. Denoise invocations
+ enter it around the transformer forward passes of architectures whose output was validated against SDPA.
"""
- usage = _Usage()
+ usage = SageAttentionUsage()
token = _scope.set(usage)
try:
- yield
+ yield usage
finally:
_scope.reset(token)
if usage.served or usage.fell_back:
@@ -273,30 +277,31 @@ def _announce(index: int, version: str, kernel: Callable[..., torch.Tensor]) ->
)
-def install_sage_attention() -> None:
- """Rebind ``F.scaled_dot_product_attention`` so ``sage_attention_scope`` can route calls to SageAttention.
+def install_sage_attention() -> bool:
+ """Rebind ``F.scaled_dot_product_attention`` so ``sage_attention_scope`` can route calls to SageAttention, and say
+ whether it is bound now.
- Idempotent and never raises: a machine that cannot run SageAttention logs why and keeps PyTorch's SDPA. Never
- installs on ROCm, which also keeps ``rocm_sdpa_chunks_math`` reading the ROCm guard's sentinel on the live binding.
- Installed once at startup via ``apply_monkeypatches`` when ``attention_backend`` is ``sage``.
+ Idempotent and never raises: a machine that cannot run SageAttention logs why, keeps PyTorch's SDPA and gets False.
+ Never installs on ROCm, which also keeps ``rocm_sdpa_chunks_math`` reading the ROCm guard's sentinel on the live
+ binding. Installed once at startup via ``apply_monkeypatches`` when ``attention_backend`` is ``sage``.
"""
from importlib.metadata import PackageNotFoundError
functional = torch.nn.functional
if getattr(functional.scaled_dot_product_attention, _SENTINEL, False):
- return
+ return True
unavailable = "attention_backend is 'sage', but SageAttention is unavailable here: "
see_docs = f"See {DOCS_URL}. Using PyTorch SDPA."
try:
if torch.version.hip is not None or torch.version.cuda is None or not torch.cuda.is_available():
logger.warning(unavailable + "it needs an NVIDIA GPU with CUDA. Using PyTorch SDPA.")
- return
+ return False
capabilities = {index: torch.cuda.get_device_capability(index) for index in range(torch.cuda.device_count())}
if not any(capability >= (8, 0) for capability in capabilities.values()):
logger.warning(
unavailable + "it needs an NVIDIA GPU with compute capability 8.0 or newer. Using PyTorch SDPA."
)
- return
+ return False
version, sageattention = _import_sageattention()
parsed = _parse_version(version)
if parsed is None or parsed < _MIN_VERSION:
@@ -304,7 +309,7 @@ def install_sage_attention() -> None:
unavailable + f"version {version} is installed, and {'.'.join(map(str, _MIN_VERSION))} or newer is "
f"required (the `sageattention` release on PyPI is SageAttention 1). {see_docs}"
)
- return
+ return False
cuda = _parse_version(torch.version.cuda) or (0, 0, 0)
kernels = {
index: kernel for index, cap in capabilities.items() if (kernel := _kernel(sageattention, cap, cuda[:2]))
@@ -315,22 +320,22 @@ def install_sage_attention() -> None:
unavailable + f"its {kernel.func.__name__} does not take {', '.join(unaccepted)}, so this "
f"SageAttention {version} differs from the version InvokeAI was validated with. {see_docs}"
)
- return
+ return False
except PackageNotFoundError:
logger.warning(
unavailable + f"`sageattention` imports, but has no package metadata to check its version. {see_docs}"
)
- return
+ return False
except ModuleNotFoundError as e:
if is_missing_triton(e):
hint = f"it needs {TRITON_REQUIREMENT}"
else:
hint = "the `sageattention` package is not installed"
logger.warning(unavailable + f"{hint}. {see_docs}")
- return
+ return False
except Exception as e:
logger.warning(unavailable + f"loading it failed ({e!r}). {see_docs}")
- return
+ return False
original = functional.scaled_dot_product_attention
@@ -405,3 +410,4 @@ def install_sage_attention() -> None:
"(attention_backend: sage). Text encoders, VAEs and masked attention keep PyTorch SDPA"
+ (f"; no SageAttention kernel for cuda:{', cuda:'.join(map(str, unserved))}." if unserved else ".")
)
+ return True
diff --git a/invokeai/backend/working_memory/bounds.py b/invokeai/backend/working_memory/bounds.py
index 93bc6e2e50..e1811dec5f 100644
--- a/invokeai/backend/working_memory/bounds.py
+++ b/invokeai/backend/working_memory/bounds.py
@@ -51,10 +51,14 @@ UPPER_BOUND_EXCEPTIONS: Final[Mapping[str, float]] = MappingProxyType(
"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,
+ "denoise.krea2-cudnn,native-denoise-bf16-4096+77tok-NVIDIAGeForceRTX4090-demand_peak": 1.35,
+ "denoise.krea2-cudnn,native-denoise-fp16-4096+77tok-NVIDIAGeForceRTX4090-demand_peak": 1.35,
+ "denoise.krea2-cudnn,cudaMallocAsync-denoise-bf16-9216+77tok-NVIDIAGeForceRTX4090-demand_peak": 1.33,
+ "denoise.krea2-cudnn,cudaMallocAsync-denoise-fp16-9216+77tok-NVIDIAGeForceRTX4090-demand_peak": 1.33,
}
)
"""In-fit points, by `point_id`, whose envelope sits more than 1.3x above them, with the ratio they are held to
-instead. All but the FLUX.3 ones are the native allocator, never expandable segments or `cudaMallocAsync`:
+instead. All but the FLUX.3 and Krea-2 `cudaMallocAsync` points are the native allocator, none expandable segments:
- 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
@@ -69,7 +73,18 @@ instead. All but the FLUX.3 ones are the native allocator, never expandable segm
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."""
+ and the 1440px one with an 80-token caption.
+- The Krea-2 denoise points are a 77-token caption on the RTX 4090, bf16 and fp16 alike. A caption token reserves more
+ than an image token. Allocated memory grows 0.14 to 0.15 MiB per token for caption and image tokens alike, reserved
+ memory 0.30 MiB per image token and 0.73 to 0.95 MiB per caption token under the native allocator (1404 against
+ 1086 MiB at 4096 image tokens with 512 and 77 caption tokens, 2916 against 2502 MiB at 9216): the excess is
+ allocator reserve, not live tensors, consistent with the text fusion, which runs each caption token as 12 tapped
+ encoder layers of 2560 before the blocks, leaving segments the blocks' larger tensors do not reuse. One slope prices
+ both, and the line has to cover the 512-token captions, so the
+ 77-token forward at 4096 image tokens sits 1.35x below it. Under `cudaMallocAsync` a caption token reserves about
+ twice an image token (1856 against 1680 MiB at 9216 image tokens), and the line is held up by a forward whose warm
+ run read 18% above its cold one (one 1024px joint reference at 1024px: 1984 against 1680 MiB), which puts the
+ 77-token forward at 9216 image tokens 1.32x below it."""
def point_id(point: MeasuredPoint, spec: "EstimatorSpec") -> str:
diff --git a/invokeai/backend/working_memory/coefficients.py b/invokeai/backend/working_memory/coefficients.py
index 5f325198a0..4e480e9c4c 100644
--- a/invokeai/backend/working_memory/coefficients.py
+++ b/invokeai/backend/working_memory/coefficients.py
@@ -145,6 +145,10 @@ class ResolvedCoefficients:
values: Mapping[str, float]
source: str
+ legacy_priced: bool = False
+ """Whether the values are a `legacy` entry's hand-set constants, or were raised to an entry's `unmeasured_floor` on a
+ platform nothing measures: where an estimator that replaced a hand-set formula reserves that formula at least
+ (`EstimatorSpec.legacy_formula`)."""
def _parse(entry: Traversable) -> WorkingMemoryData:
@@ -260,7 +264,10 @@ def resolve_coefficients(
notes.insert(0, f"priced as {_where({key: full[key] for key in shown})}{', floored' if floors else ''}")
note = f" ({', '.join(notes)})" if notes else ""
source = f"{origin}:{_where({key: str(getattr(platform, key)) for key in shown})}{note}"
- return ResolvedCoefficients(values=MappingProxyType(read), source=source)
+ legacy_priced = carrier.legacy or (
+ bool(spec.platform_keys) and measured != platform and bool(carrier.unmeasured_floor)
+ )
+ return ResolvedCoefficients(values=MappingProxyType(read), source=source, legacy_priced=legacy_priced)
@functools.cache
diff --git a/invokeai/backend/working_memory/data/denoise.json b/invokeai/backend/working_memory/data/denoise.json
index 222517e89a..d847b8a0bc 100644
--- a/invokeai/backend/working_memory/data/denoise.json
+++ b/invokeai/backend/working_memory/data/denoise.json
@@ -319,6 +319,118 @@
"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."
+ },
+ {
+ "estimator": "denoise.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "values": {
+ "k_denoise_bf16": 312423,
+ "b_denoise_bf16": 229638144,
+ "k_denoise_fp16": 312423,
+ "b_denoise_fp16": 229638144,
+ "k_denoise_fp32": 522454,
+ "b_denoise_fp32": 334495744
+ },
+ "unmeasured_floor": {
+ "k_denoise_bf16": 524288,
+ "b_denoise_bf16": 1610612736,
+ "k_denoise_fp16": 524288,
+ "b_denoise_fp16": 1610612736,
+ "k_denoise_fp32": 524288,
+ "b_denoise_fp32": 1610612736
+ },
+ "provenance": "The Krea-2 denoise forward's lines, bytes per attended token plus a base, per dtype. RTX 4090, torch 2.13.0+cu130, Windows, no allocator configuration (the native allocator), fused SDPA. Measured by scripts/calibrate_krea2_working_memory.py on 2026-10-31 in bf16, fp16 and fp32: 512, 768, 1024, 1536 and 2048px with a 512-token caption, 1024 and 1536px with a 77-token one, and at 1024px one, two and three 1024px joint references; in bf16 also long joint sequences (2048px with one and three references, 1536px with three, up to 29184 tokens). Plain forwards on a random-init Krea-2 transformer of the default geometry (memory does not depend on weight values) with 2 blocks and the denoise node's attention processors, 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%. Under the native allocator joint references lie on the line of the plain forwards. bf16 and fp16 measured the same. A caption token reserves more than an image token, so the 77-token forwards sit lowest under the line (bounds.UPPER_BOUND_EXCEPTIONS). Out of the fit, as checks: three reference K/V-cache windows (precompute and one cached step), which the larger pass on the line plus the cache covers; 4 blocks at 1024px in bf16, which measured the same as 2 (1404 MiB); and 1024- and 2048-token captions at 1024 and 1536px in every dtype (scripts/calibrate_krea2_working_memory.py --mode captions, 2026-10-31), which the line alone covers only 0.84 to 0.95 times at 2048 tokens and the estimate with its caption excess 1.05 to 1.54 times in bf16 and fp16, 1.08 to 1.67 times in fp32. The same 12 caption checks on Linux (an RTX 6000 Ada, the same AD102 chip, torch 2.13.0+cu130, 2026-10-31) measured byte for byte the same; they ship as out-of-fit checks, its fit-grid points do not. The caption excess per token beyond 512 is the most a caption check demanded above the line's slope, over every shipped caption check, times 1.3 (bounds.MAX_OVER_RESERVATION), rounded up to the next 0.01 MiB: 0.34 MiB in bf16 and fp16 (from 0.26 MiB, this entry's 2048-token caption at 1024px), 0.74 MiB in fp32 (from 0.56 MiB, the RTX 6000 Ada's 2048-token caption at 1024px under cudaMallocAsync; see that entry). In-fit points sit 1.05 to 1.17 times below the bf16 and fp16 line with a 512-token caption, 1.05 to 1.29 below the fp32 one. Cross-check, not shipped: the real 28-block model in a running server (growth of the reserved peak over the transformer lock, prompt ~84 tokens) demanded 2.14 GiB at 1152x1536 and 4.20 GiB at 2048px as GGUF Q4_K_M, fully resident, 3.82 GiB at 2048px fp8-stored, partly resident in that run, 5.54 GiB at 1152x1536 with three joint references and 5.73 GiB at 2048px with one, against estimates of 3.06, 5.81, 5.29, 6.74 and 7.04 GiB (1.43, 1.38, 1.38, 1.22 and 1.23 times). Over every case measured, with and without LoRAs, CFG, joint references and the reference K/V cache, the estimate reserved 1.22 to 1.66 times the demand; the top end falls at 1536px, at 1536x2048 and at 1152x1536 with one joint reference, where the warm server's allocator reserved below the line. Loaded partially (the cache told the card has 11.76 GiB, GGUF Q4_K_M at 1152x1536 with two plain LoRAs, 6.3 to 6.9 GiB of its weights resident), it grew the reserved peak by 2.37 GiB against an estimate of 3.30 GiB (1.39 times), with no out-of-memory; the device peaked at 10.85 to 10.86 of the 11.76 GiB, 0.3 GiB of simulated foreign use included. The platforms nothing measures borrow this entry (`priced_as`); its unmeasured_floor raises them to the legacy constants, and with them to the formula the node reserved by hand (the spec's legacy_formula)."
+ },
+ {
+ "estimator": "denoise.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "values": {
+ "k_denoise_bf16": 238388,
+ "b_denoise_bf16": 110100480,
+ "k_denoise_fp16": 238388,
+ "b_denoise_fp16": 110100480,
+ "k_denoise_fp32": 449434,
+ "b_denoise_fp32": 202375168
+ },
+ "provenance": "The Krea-2 denoise forward's lines, bytes per attended token plus a base, per dtype. RTX 4090, torch 2.13.0+cu130, Windows, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync, fused SDPA. Measured by scripts/calibrate_krea2_working_memory.py on 2026-10-31 in bf16, fp16 and fp32: 512, 768, 1024, 1536 and 2048px with a 512-token caption, 1024 and 1536px with a 77-token one, and at 1024px one, two and three 1024px joint references; in bf16 also long joint sequences (2048px with one and three references, 1536px with three, up to 29184 tokens). Plain forwards on a random-init Krea-2 transformer of the default geometry (memory does not depend on weight values) with 2 blocks and the denoise node's attention processors, 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%. Under the native allocator joint references lie on the line of the plain forwards. bf16 and fp16 measured the same. A caption token reserves more than an image token, so the 77-token forwards sit lowest under the line (bounds.UPPER_BOUND_EXCEPTIONS). Out of the fit, as checks: three reference K/V-cache windows (precompute and one cached step), which the larger pass on the line plus the cache covers, and 1024- and 2048-token captions at 1024 and 1536px in every dtype (scripts/calibrate_krea2_working_memory.py --mode captions, 2026-10-31), which the line alone covers only 0.88 to 0.89 times at 2048 tokens and 1024px, and the estimate with its caption excess 1.21 to 1.50 times in bf16 and fp16, 1.14 to 1.34 times in fp32. The same 12 caption checks on Linux (an RTX 6000 Ada, the same AD102 chip, torch 2.13.0+cu130, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync, 2026-10-31) ship as out-of-fit checks, its fit-grid points do not: cudaMallocAsync scattered both ways between the cards. There the line alone covers the 2048-token captions 0.77 to 1.14 times and the estimate the checks 1.17 to 1.50 times in bf16 and fp16, 1.07 to 1.40 times in fp32. The caption excess comes from every shipped caption check (see the native allocator's entry); this allocator's demanded at most 0.12 MiB per caption token above the line's slope in bf16 and fp16 on either card, 0.24 MiB in fp32 on the RTX 4090 and 0.56 MiB on the RTX 6000 Ada (2048 tokens at 1024px), which sets fp32's. cudaMallocAsync's warm forward read up to 18% above the cold one (1984 against 1680 MiB with one 1024px joint reference at 1024px), which holds the line up: in-fit points sit 1.05 to 1.32 times below the bf16 and fp16 line, 1.05 to 1.24 below the fp32 one."
+ },
+ {
+ "estimator": "denoise.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native"
+ },
+ "values": {
+ "k_denoise_bf16": 524288,
+ "b_denoise_bf16": 1610612736,
+ "k_denoise_fp16": 524288,
+ "b_denoise_fp16": 1610612736,
+ "k_denoise_fp32": 524288,
+ "b_denoise_fp32": 1610612736
+ },
+ "unmeasured_floor": {
+ "k_denoise_bf16": 524288,
+ "b_denoise_bf16": 1610612736,
+ "k_denoise_fp16": 524288,
+ "b_denoise_fp16": 1610612736,
+ "k_denoise_fp32": 524288,
+ "b_denoise_fp32": 1610612736
+ },
+ "legacy": true,
+ "provenance": "Legacy, not a fit, for every OS but Windows, which has its own entry: no fresh-process point measures the Krea-2 denoise on ROCm with the native allocator there yet. The constants of the formula the Krea-2 denoise node reserved by hand: 0.5 MiB per attended token and a 1.5 GiB base, the same for every dtype, an upper bound from peak VRAM of the Krea-2-Turbo transformer in bf16 with fused SDPA. A legacy entry prices that whole formula (denoise_working_memory._legacy_formula, the spec's legacy_formula): times 1.1 with CFG and 1.35 with a style reference, plus the whole model's largest dequantization transient and half a GiB per LoRA, and the terms it lacked. On an RTX 4090 (torch 2.13.0+cu130, Windows, the native allocator) the constants reserved 2.3 to 2.9 times the reserved growth of the real 28-block model at 1024 to 2048 px, GGUF Q4_K_M fully resident and fp8-stored partly resident. scripts/calibrate_krea2_working_memory.py measures the points that replace them (scripts/working_memory/build_shipped.py). The entry prices the platforms nothing measures as well (`priced_as`); its unmeasured_floor raises them to the legacy constants, and with them to the formula they replaced."
+ },
+ {
+ "estimator": "denoise.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "values": {
+ "k_denoise_bf16": 312423,
+ "b_denoise_bf16": 517996544,
+ "k_denoise_fp16": 312423,
+ "b_denoise_fp16": 547356672,
+ "k_denoise_fp32": 522828,
+ "b_denoise_fp32": 486539264
+ },
+ "unmeasured_floor": {
+ "k_denoise_bf16": 524288,
+ "b_denoise_bf16": 1610612736,
+ "k_denoise_fp16": 524288,
+ "b_denoise_fp16": 1610612736,
+ "k_denoise_fp32": 524288,
+ "b_denoise_fp32": 1610612736
+ },
+ "provenance": "Windows only; every other OS keeps its own entry. The Krea-2 denoise forward's lines, bytes per attended token plus a base, per dtype. 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_krea2_working_memory.py on 2026-10-31 in bf16, fp16 and fp32: 512, 768, 1024, 1536 and 2048px with a 512-token caption, 1024 and 1536px with a 77-token one, and at 1024px one, two and three 1024px joint references; in bf16 and fp16 also long joint sequences (2048px with one and three references, 1536px with three, up to 29184 tokens), so fp32 is measured up to 16896 tokens. fp32's long sequences were skipped: the shipped line plus the weights prices them at 16.4 to 20.4 GiB, beyond the card's ~14.9 GiB free. Plain forwards on a random-init Krea-2 transformer of the default geometry (memory does not depend on weight values) with 2 blocks and the denoise node's attention processors, 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%. bf16 and fp16 take the same per token, fp16 27 MiB more at every point; fp32's slope is 1.67 times theirs. One 1024px joint reference and the 512px forward (768px in fp32) decide every line; the other forwards sit up to 1.16 times below it, the 77-token ones lowest (up to 1.29 times). Out of the fit, as checks: three reference K/V-cache windows (precompute and one cached step), which the line alone covers 1.01 to 1.24 times and the estimate with the cache 1.07 to 1.36 times, and 1024- and 2048-token captions at 1024 and 1536px in every dtype (scripts/calibrate_krea2_working_memory.py --mode captions), which the line alone covers only 0.86 to 0.96 times at 2048 tokens and the estimate with its caption excess 1.05 to 1.46 times in bf16 and fp16, 1.08 to 1.63 times in fp32. Above the line's slope they demanded at most 0.25 MiB per caption token beyond 512 in bf16 and fp16, 0.37 MiB in fp32, within the caption excess (see the CUDA native allocator's entry). Where this entry prices a platform nothing is measured on (MIOpen under hipMallocAsync on Windows), its unmeasured_floor raises each value to the legacy constants the node reserved by hand, 0.5 MiB per token and a 1.5 GiB base, and with them to that formula (the spec's legacy_formula): the fit describes the card its points were measured on, not the platforms it stands in for. Measured on a card that does not drive the desktop: per-process demand is the same, but WDDM paging on a card that also carries the desktop is not measured."
+ },
+ {
+ "estimator": "denoise.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "values": {
+ "k_denoise_bf16": 212777,
+ "b_denoise_bf16": 426770432,
+ "k_denoise_fp16": 212777,
+ "b_denoise_fp16": 456130560,
+ "k_denoise_fp32": 421479,
+ "b_denoise_fp32": 251658240
+ },
+ "provenance": "Windows only, where expandable segments are Invoke's ROCm default. The Krea-2 denoise forward's lines, bytes per attended token plus a base, per dtype. 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_krea2_working_memory.py on 2026-10-31 in bf16, fp16 and fp32: 512, 768, 1024, 1536 and 2048px with a 512-token caption, 1024 and 1536px with a 77-token one, and at 1024px one, two and three 1024px joint references; also long joint sequences (2048px with one and three references, 1536px with three, up to 29184 tokens), in fp32 all but 2048px with three references (up to 22016 tokens), which the shipped line plus the weights prices at ~17.4 GiB, beyond the card's ~14.9 GiB free. Plain forwards on a random-init Krea-2 transformer of the default geometry (memory does not depend on weight values) with 2 blocks and the denoise node's attention processors, 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%. bf16 and fp16 take the same per token, fp16 27 MiB more at every point; fp32's slope is 1.98 times theirs. Joint references sit above the plain forwards and decide the lines with the 512px forward; the plain forwards from 768px up sit 1.19 to 1.26 times below the bf16 and fp16 lines, 1.21 to 1.24 below the fp32 one, and the long sequences 1.05 to 1.13 times. Out of the fit, as checks: three reference K/V-cache windows (precompute and one cached step), which the line alone covers 1.06 to 1.13 times and the estimate with the cache 1.17 to 1.26 times; 4 blocks at 1024px in bf16, which measured the same as 2 (1104 MiB); and 1024- and 2048-token captions at 1024 and 1536px in every dtype (scripts/calibrate_krea2_working_memory.py --mode captions), which the line alone covers 0.89 to 1.20 times at 2048 tokens and the estimate with its caption excess 1.17 to 1.43 times in bf16 and fp16, 1.33 to 1.45 times in fp32. Above the line's slope they demanded at most 0.14 MiB per caption token beyond 512 in bf16 and fp16, 0.07 MiB in fp32, within the caption excess (see the CUDA native allocator's entry). Refitted on its points by scripts/working_memory/build_shipped.py. Measured on a card that does not drive the desktop: per-process demand is the same, but WDDM paging on a card that also carries the desktop is not measured."
}
],
"points": [
@@ -11759,6 +11871,11067 @@
"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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 675282944,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1023410176,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1472200704,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3057647616,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4819255296,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1138753536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2623537152,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2808086528,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3814719488,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4821352448,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 675282944,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1023410176,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1472200704,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3057647616,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4819255296,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1138753536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2623537152,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2808086528,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3814719488,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4821352448,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1027604480,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1719664640,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2503999488,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5075107840,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8092909568,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1954545664,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4070572032,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4649385984,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6559891456,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8392802304,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1472200704,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 4 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5827985408,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8556380160,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6077546496,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1553989632,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 12288,
+ "tokens": 12288,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 452984832,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3235905536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5247074304,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 452984832,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 620756992,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 956301312,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1946157056,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3489660928,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 872415232,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1761607680,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2080374784,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2868903936,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3707764736,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 452984832,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 620756992,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 956301312,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1946157056,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3489660928,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 872415232,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1761607680,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2080374784,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2868903936,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3707764736,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 849346560,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1218445312,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1956642816,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3701473280,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 7079985152,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1711276032,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3869245440,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3869245440,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5670699008,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 7358906368,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4496293888,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6073352192,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4848615424,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1124073472,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 12288,
+ "tokens": 12288,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 452984832,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2717908992,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3539992576,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1308622848,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2569011200,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3066036224,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3951034368,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1308622848,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2569011200,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3066036224,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3951034368,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2044723200,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4066377728,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5309988864,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6851395584,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1056964608,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1761607680,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2214592512,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2231369728,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1056964608,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1761607680,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2214592512,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2231369728,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2359296000,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3355443200,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4573888512,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4808769536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 717094912,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 821952512,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1157496832,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2101215232,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3233677312,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1073610752,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1912471552,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2122186752,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2898132992,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3757965312,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 745340928,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 850198528,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1185742848,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2129461248,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3261923328,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1101856768,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1940717568,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2150432768,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2926379008,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3786211328,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 855900160,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1170472960,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1820590080,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3540254720,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1616642048,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3378249728,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3519283200,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5301862400,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1157496832,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 4 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4659740672,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1241382912,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 12288,
+ "tokens": 12288,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 452984832,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2856189952,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3569221632,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1262354432,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1954414592,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2206072832,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2352873472,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1290600448,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1982660608,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2234318848,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2381119488,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2026635264,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2949382144,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3746299904,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4270587904,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 949878784,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1295908864,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1742602240,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3334340608,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5095948288,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1409155072,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2896035840,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3082682368,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4089315328,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5095948288,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 978124800,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1324154880,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1770848256,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3362586624,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5124194304,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1437401088,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2924281856,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3110928384,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4117561344,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5124194304,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1172570112,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1864630272,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2644770816,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5224267776,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2078015488,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4445700096,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4796448768,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6709051392,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6102581248,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1937637376,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 12288,
+ "tokens": 12288,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 452984832,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3527278592,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5538447360,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors, reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1579024384,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2843607040,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3340632064,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4227727360,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1607270400,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2871853056,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3368878080,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4255973376,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2181824512,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4207673344,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5453381632,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6975913984,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6064832512,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4533911552,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4687986688,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6093078528,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4562157568,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8049131520,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8908963840,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6014894080,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "expandable",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 7021527040,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8833073152,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6354239488,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6130827264,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8861319168,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6382485504,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8219000832,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "miopen",
+ "allocator": "native",
+ "os": "windows"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 8520990720,
+ "method": "demand_peak",
+ "device": "AMD Radeon RX 9060 XT (gfx1200)",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1308622848,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2569011200,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3066036224,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3951034368,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1308622848,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2569011200,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3066036224,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3951034368,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2044723200,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4066377728,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 5309988864,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 6851395584,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, no allocator configuration (torch reports the native allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1291845632,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1744830464,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2214592512,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2231369728,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1291845632,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 1744830464,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2214592512,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2264924160,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 2292187136,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3869245440,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 3835691008,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp32",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0
+ },
+ "measured_bytes": 4607442944,
+ "method": "demand_peak",
+ "device": "NVIDIA RTX 6000 Ada Generation",
+ "provenance": "scripts/calibrate_krea2_working_memory.py (2026-10-31): NVIDIA RTX 6000 Ada Generation, torch 2.13.0+cu130, Linux, PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocAsync (torch reports the cudaMallocAsync allocator). Random-init Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 677380096,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1023410176,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1472200704,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3059744768,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 4821352448,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1138753536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2623537152,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2810183680,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3814719488,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 4821352448,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 677380096,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1023410176,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1472200704,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3059744768,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 4821352448,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1138753536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2623537152,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2810183680,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3814719488,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 4821352448,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 5827985408,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 8558477312,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 6079643648,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 5827985408,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 8558477312,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 6079643648,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1553989632,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 12288,
+ "tokens": 12288,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 452984832,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3235905536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 5247074304,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 4608,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1553989632,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 12288,
+ "tokens": 12288,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 452984832,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3235905536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 5247074304,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1308622848,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2569011200,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3066036224,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3951034368,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1308622848,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2569011200,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3066036224,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "native"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3951034368,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 452984832,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 687865856,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1124073472,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2164260864,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3640655872,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 956301312,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1795162112,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2080374784,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2801795072,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3674210304,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 1024,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 1536,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 452984832,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 2304,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 2816,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 687865856,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4608,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1124073472,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9728,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2164260864,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3640655872,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 4173,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 956301312,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 77,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 9293,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1795162112,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 8704,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2080374784,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 8192,
+ "cached_reference_tokens": 0,
+ "tokens": 12800,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2801795072,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3674210304,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 4580179968,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 6257901568,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 4747952128,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 4096,
+ "cached_reference_tokens": 0,
+ "tokens": 20992,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 4546625536,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 29184,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 6123683840,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 12288,
+ "cached_reference_tokens": 0,
+ "tokens": 22016,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 4747952128,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 4608,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1258291200,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 12288,
+ "tokens": 12288,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 452984832,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2717908992,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 16896,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3909091328,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 4608,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1258291200,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 12288,
+ "tokens": 12288,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 452984832,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2717908992,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 16384,
+ "text_tokens": 512,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 4096,
+ "tokens": 16896,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 150994944,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 3909091328,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage), reference K/V-cache mode: the references' precompute and one cached step in one window; 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1191182336,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1761607680,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2264924160,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "bf16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2197815296,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 5120,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1191182336,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 4096,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 6144,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 1761607680,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 1024,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 10240,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2264924160,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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.krea2",
+ "version": 1,
+ "platform": {
+ "conv_backend": "cudnn",
+ "allocator": "cudaMallocAsync"
+ },
+ "features": {
+ "image_tokens": 9216,
+ "text_tokens": 2048,
+ "style_text_tokens": 0,
+ "reference_tokens": 0,
+ "cached_reference_tokens": 0,
+ "tokens": 11264,
+ "dtype": "fp16",
+ "has_attention_mask": false,
+ "cfg": false,
+ "score_matrix_bytes": 0,
+ "streamed_layer_bytes": 0,
+ "dequant_transient_bytes": 0,
+ "fp8_cast_transient_bytes": 0,
+ "peak_layer_bytes": 0,
+ "model_dequant_transient_bytes": 0,
+ "sidecar_residual_bytes": 0,
+ "regional_mask_bytes": 0,
+ "reference_kv_bytes": 0,
+ "style_kv_bytes": 0,
+ "lora_count": 0,
+ "lora_bytes": 0,
+ "attention_backend": "sage"
+ },
+ "measured_bytes": 2197815296,
+ "method": "demand_peak",
+ "device": "NVIDIA GeForce RTX 4090",
+ "provenance": "scripts/calibrate_krea2_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 Krea-2 transformer with the default geometry, 2 blocks, the denoise node's attention processors with SageAttention 2.2.0+cu130torch2.10.0andhigher.post6 serving the steps (attention_backend: sage); 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
}
]
}
diff --git a/invokeai/backend/working_memory/spec.py b/invokeai/backend/working_memory/spec.py
index 19b9be7a7e..6814831121 100644
--- a/invokeai/backend/working_memory/spec.py
+++ b/invokeai/backend/working_memory/spec.py
@@ -2,7 +2,7 @@ import importlib
from collections.abc import Callable, Mapping
from dataclasses import dataclass, field
from types import MappingProxyType
-from typing import Final
+from typing import Final, Optional
import torch
@@ -14,6 +14,8 @@ from invokeai.backend.working_memory.platform import platform_for
TermsFunction = Callable[[Mapping[str, FeatureValue], Mapping[str, float]], tuple[WorkingMemoryTerm, ...]]
"""An estimator's pure part: its features and its coefficient values in, its terms out."""
+LegacyFormula = Callable[[Mapping[str, FeatureValue], Mapping[str, float]], float]
+"""A hand-set formula an estimator replaced, in bytes, priced with the same features and coefficient values."""
ESTIMATOR_MODULES: Final = (
"invokeai.backend.moss_image.working_memory",
@@ -21,6 +23,7 @@ ESTIMATOR_MODULES: Final = (
"invokeai.backend.z_image.denoise_working_memory",
"invokeai.backend.flux2.denoise_working_memory",
"invokeai.backend.flux3.denoise_working_memory",
+ "invokeai.backend.krea2.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
@@ -50,6 +53,12 @@ class EstimatorSpec:
AutoencoderKL convolution line in output pixels for every VAE estimator (`fit.convolution_line`), one in attended
tokens for each denoise estimator. Declared by every estimator, so a new one cannot inherit another's line, and with it
which of its measurements join a fit."""
+ legacy_formula: Optional[LegacyFormula] = field(default=None, compare=False, repr=False)
+ """For an estimator whose terms are shaped unlike the hand-set formula they replaced, so that a `legacy` entry's
+ constants alone do not reproduce it: that formula. Where the values are legacy-priced
+ (`ResolvedCoefficients.legacy_priced`: a `legacy` entry, or an unmeasured platform raised to its floors), the estimate
+ reserves at least what it gives, as a term `legacy_formula` on top of the others. Fitted values on a measured
+ platform never read it. An estimator whose terms reproduce the formula from the legacy constants declares none."""
user_calibrated: bool = False
"""Whether a user's calibration moves this estimator: its windows fit user lines, its estimates read them, the
calibration summary shows its lines, and what its windows found held outside torch sizes the calibration plan
@@ -75,11 +84,16 @@ class EstimatorSpec:
self, features: Mapping[str, FeatureValue], coefficients: ResolvedCoefficients
) -> WorkingMemoryEstimate:
"""The estimate for `features` with the given coefficients."""
+ terms = self.terms(features, coefficients.values)
+ if coefficients.legacy_priced and self.legacy_formula is not None:
+ priced = sum(term.bytes for term in terms if term.included)
+ formula = self.legacy_formula(features, coefficients.values)
+ terms = (*terms, WorkingMemoryTerm("legacy_formula", max(0.0, formula - priced), True))
return WorkingMemoryEstimate(
estimator=self.id,
version=self.version,
features=features,
- terms=self.terms(features, coefficients.values),
+ terms=terms,
source=coefficients.source,
)
diff --git a/scripts/calibrate_krea2_working_memory.py b/scripts/calibrate_krea2_working_memory.py
new file mode 100644
index 0000000000..5ed2c354a7
--- /dev/null
+++ b/scripts/calibrate_krea2_working_memory.py
@@ -0,0 +1,787 @@
+"""Measure the working memory of the Krea-2 transformer's forward, as shipped-data points for `denoise.krea2`.
+
+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`), with the settings 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). The forward then runs
+twice, cold and warm, and the point takes the larger demand (`measure_cold_and_warm` and `measured_bytes_and_method`):
+a `demand_peak` where both forwards read the driver's figure, else a `reserved_peak` of torch's counters alone.
+
+The transformer is `Krea2Transformer2DModel` at its default geometry, the one the loaders build (hidden 6144: 48 query
+and 12 K/V heads of 128, MLP 16384; text fusion over 12 tapped layers of 2560), with random weights in the measured
+dtype, because memory depends on shapes, not on weight values. It has 2 blocks: a no-grad forward frees each block's
+intermediates, which `--extra-blocks 4` re-checks at 1024px. It runs with the denoise node's attention processors
+(`build_krea2_attention_processors`), whose memory-efficient SDPA call replaces the stock grouped-query one. The inputs
+are what the node hands it: the packed image tokens (64 channels, one token per 16x16 pixels), a caption of tapped
+encoder states, the timestep and the position ids; joint references go through `forward_with_references` as the node
+runs them. A point carries the features of `estimate_krea2_denoise_working_memory` for a resident model, taken in the
+measuring process after the runtime setup, 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 in its dtype. 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.
+
+Modes
+-----
+- `fit` (default): the fit grid, in each of `--dtypes` (bfloat16, float16, float32). The `--sizes` (512, 768, 1024,
+ 1536, 2048 px) run with a `--text-tokens` caption (512). Those among `--short-text-sizes` (1024, 1536) also run with a
+ `--short-text-tokens` caption (77), for the text slope. At 1024px, `--references` (1, 2 and 3) run with that many
+ joint references of `--reference-px` (1024) square. `--extra-blocks N` adds one forward with N blocks at 1024px in
+ the first dtype.
+- `large`: long joint sequences in each of `--dtypes` (bfloat16): 2048px with one and with three 1024px references
+ (20992 and 29184 tokens with a 512-token caption) and 1536px with three (22016). The node caps neither the image's
+ side nor a reference's; longer sequences price on the line extrapolated.
+- `kv`: reference K/V-cache mode in each of `--dtypes` (bfloat16): 1024px with one and with three 1024px references
+ and 2048px with one. One window covers what the node's lock covers: the references' precompute, alone, into the
+ cache, then one step's forward over the caption and the image, attending to the cached keys; the cache is cleared
+ after it. These check the cache term and the larger-pass rule, not the line.
+- `captions`: captions beyond the fit grid's 512 tokens, as regional prompting concatenates them, in each of `--dtypes`
+ (bfloat16, float16, float32): `--long-captions` (1024 and 2048 tokens) at `--long-caption-sizes` (1024 and 1536 px).
+ These check the caption excess the estimate adds beyond 512 tokens (`_CAPTION_EXCESS_BYTES_PER_TOKEN`), not the line.
+
+The fit grid's and the large grid's points are fit points (`"fit": true`): the plain forwards, joint references
+included, which the estimator's line admits (`denoise_working_memory._line`). The checks' points, the extra-blocks
+forward, the K/V-cache windows and the long captions, 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.
+
+SageAttention
+-------------
+`--attention sage` measures every point with SageAttention serving the transformer blocks' attention, as a server with
+`attention_backend: sage` runs the denoise: the measuring process installs it after the server's runtime, as that
+setting does at the server's start (`apply_monkeypatches`), and each measured transformer step runs inside
+`sage_attention_scope`, which the node enters once its reference K/V precompute is done, so the precompute stays on
+PyTorch SDPA here too. The cold forward then includes SageAttention's check of its first result against SDPA, as the
+first SageAttention generation after a server start does. It needs the `sageattention` package (2.2.0 or newer) and
+Triton, refused before anything runs where either is missing, an NVIDIA GPU of compute capability 8.0 or newer, and
+half precision: the dtypes default to bfloat16 and float16, and float32, which SageAttention never serves, is refused.
+So is a Krea-2 SDPA override (`INVOKE_KREA2_SDPA_BACKEND`), under which the node enters no SageAttention scope, and
+`--extra-blocks`: out of the fit, that forward would have the features of the fit grid's at 1024px, and the builder
+keeps only the larger of two points with the same features.
+
+A SageAttention point proves that SageAttention served it, from the scopes' usage counters (`SageAttentionUsage`):
+at least one measured step, every transformer block's attention in each step on SageAttention, and no call on PyTorch
+SDPA but those too short for SageAttention by design (the text fusion's, over the text layers and the caption), which
+fall back in the server alike. A point where it fell back for any other reason (its out-of-memory fallback, an
+ineligible shape, a failed kernel) is `invalid`, with the reasons, and stays out of the file. The counts are in
+`raw.sage_usage`.
+
+A SageAttention point carries the feature `attention_backend: sage` (`ATTENTION_BACKEND_FEATURE` in
+`invokeai/backend/krea2/denoise_working_memory.py`), which no estimate and no SDPA point carries. The estimator's line
+refuses it, so the point is never `in_fit` and the builder fits no SDPA line on it; and its features differ from those
+of the SDPA point of the same forward, so the builder never takes one for the other. It ships as an out-of-fit point
+the estimate has to cover, which is what such a run asks: whether the SDPA lines cover a SageAttention denoise. The
+RTX 4090's points under both CUDA allocators ship so (see `denoise_working_memory`'s docstring for what they found).
+The summary prints what the shipped estimate reserves against each point.
+
+What this does not measure: GGUF, fp8-stored and int8 builds, LoRAs and CFG pairs run the same forward, plus analytic
+terms the estimate adds (the dequantization and fp8 cast transients, the LoRA patches); CFG runs its passes one after
+the other. A family E2E calibration run on real models
+(`docs/src/content/docs/development/Guides/family-e2e.mdx`) records them as `probe_demand` points, which would bound the
+estimate from below; none ship yet.
+
+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`, `features`, `platform` (OS included; the
+builder names the OS only where the data needs it), `measured_bytes`, `method`, `device`, `in_fit` and `provenance`.
+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.
+
+The CUDA entries are fitted on an RTX 4090's points, the ROCm entries on Windows (expandable segments and the native
+allocator) on an RX 9060 XT's. ROCm with the native allocator off Windows is `legacy` until points replace it. The
+builder fits an entry once its points fit every dtype's line, so a run that is to replace one measures all three
+dtypes. A point names the card as torch does (`NVIDIA GeForce RTX 4090`, `AMD Radeon RX 9060 XT (gfx1200)`), and so do
+the shipped Krea-2 points.
+
+Usage
+-----
+RTX 4090 (CUDA): the native allocator, then `cudaMallocAsync`; each in the fit, large and kv modes.
+
+ python scripts/calibrate_krea2_working_memory.py --out 4090-native.jsonl --extra-blocks 4
+ python scripts/calibrate_krea2_working_memory.py --out 4090-native.jsonl --mode large
+ python scripts/calibrate_krea2_working_memory.py --out 4090-native.jsonl --mode kv
+ python scripts/calibrate_krea2_working_memory.py --out 4090-native.jsonl --mode captions
+ python scripts/calibrate_krea2_working_memory.py --out 4090-async.jsonl --alloc-conf backend:cudaMallocAsync
+ python scripts/calibrate_krea2_working_memory.py --out 4090-async.jsonl --mode large \
+ --alloc-conf backend:cudaMallocAsync
+ python scripts/calibrate_krea2_working_memory.py --out 4090-async.jsonl --mode kv \
+ --alloc-conf backend:cudaMallocAsync
+ python scripts/calibrate_krea2_working_memory.py --out 4090-async.jsonl --mode captions \
+ --alloc-conf backend:cudaMallocAsync
+
+RX 9060 XT (ROCm on Windows): the server's default expandable segments, then the native allocator; each in the fit,
+large (in every dtype), kv and captions modes, priced with the shipped Windows lines. On 16 GB the pricing skips the
+long fp32 sequences that need more than the card has free: 2048px with three references with expandable segments,
+all three under the native allocator. The card did not drive the desktop.
+
+ python scripts/calibrate_krea2_working_memory.py --out 9060xt-expandable.jsonl --extra-blocks 4
+ python scripts/calibrate_krea2_working_memory.py --out 9060xt-expandable.jsonl --mode large \
+ --dtypes bfloat16,float16,float32
+ python scripts/calibrate_krea2_working_memory.py --out 9060xt-expandable.jsonl --mode kv
+ python scripts/calibrate_krea2_working_memory.py --out 9060xt-expandable.jsonl --mode captions
+ python scripts/calibrate_krea2_working_memory.py --out 9060xt-native.jsonl --alloc-conf expandable_segments:False
+ python scripts/calibrate_krea2_working_memory.py --out 9060xt-native.jsonl --mode large \
+ --dtypes bfloat16,float16,float32 --alloc-conf expandable_segments:False
+ python scripts/calibrate_krea2_working_memory.py --out 9060xt-native.jsonl --mode kv \
+ --alloc-conf expandable_segments:False
+ python scripts/calibrate_krea2_working_memory.py --out 9060xt-native.jsonl --mode captions \
+ --alloc-conf expandable_segments:False
+
+RTX 4090 with SageAttention: the native allocator, then `cudaMallocAsync`; each in the fit, large, kv and captions
+modes, all in bfloat16 and float16.
+
+ python scripts/calibrate_krea2_working_memory.py --out 4090-sage-native.jsonl --attention sage
+ python scripts/calibrate_krea2_working_memory.py --out 4090-sage-native.jsonl --attention sage --mode large \
+ --dtypes bfloat16,float16
+ python scripts/calibrate_krea2_working_memory.py --out 4090-sage-native.jsonl --attention sage --mode kv \
+ --dtypes bfloat16,float16
+ python scripts/calibrate_krea2_working_memory.py --out 4090-sage-native.jsonl --attention sage --mode captions
+ python scripts/calibrate_krea2_working_memory.py --out 4090-sage-async.jsonl --attention sage \
+ --alloc-conf backend:cudaMallocAsync
+ python scripts/calibrate_krea2_working_memory.py --out 4090-sage-async.jsonl --attention sage --mode large \
+ --dtypes bfloat16,float16 --alloc-conf backend:cudaMallocAsync
+ python scripts/calibrate_krea2_working_memory.py --out 4090-sage-async.jsonl --attention sage --mode kv \
+ --dtypes bfloat16,float16 --alloc-conf backend:cudaMallocAsync
+ python scripts/calibrate_krea2_working_memory.py --out 4090-sage-async.jsonl --attention sage --mode captions \
+ --alloc-conf backend:cudaMallocAsync
+
+`--dry-run` prints the planned points without touching a device, each priced as a CPU prices it.
+"""
+
+import argparse
+import dataclasses
+import datetime
+import os
+import sys
+from collections import Counter
+from collections.abc import Callable, Iterator, Mapping, Sequence
+from contextlib import AbstractContextManager, contextmanager, nullcontext
+from dataclasses import dataclass
+from importlib.util import find_spec
+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.krea2.reference_edit import Krea2ReferenceKVCache
+ from invokeai.backend.util.sage_attention import SageAttentionUsage
+ from invokeai.backend.working_memory.estimate import WorkingMemoryEstimate
+ from invokeai.backend.working_memory.measurement import FreshWindow
+
+GIB = 2**30
+MIB = 2**20
+
+PIXELS_PER_TOKEN_SIDE = 16
+"""The VAE's 8x downsampling times the transformer's 2x2 patches."""
+IN_CHANNELS = 64
+"""A packed token's channels: the Qwen-Image VAE's 16 latent channels times the 2x2 patch."""
+CHECK_PX = 1024
+"""The size the reference forwards, the extra-blocks forward and the K/V-cache checks run at."""
+REFERENCE_PX = 1024
+LARGE_GRID = ((2048, 1), (2048, 3), (1536, 3))
+"""The large grid's forwards: image side and the number of `--reference-px` references."""
+KV_GRID = ((1024, 1), (1024, 3), (2048, 1))
+"""The K/V-cache checks: image side and the number of `--reference-px` references."""
+DTYPES = ("bfloat16", "float16", "float32")
+SAGE_DTYPES = ("bfloat16", "float16")
+"""The dtypes SageAttention serves; it leaves float32 attention to PyTorch SDPA."""
+SAGE_PACKAGES = ("sageattention", "triton")
+KREA2_SDPA_BACKEND_ENV_VAR = "INVOKE_KREA2_SDPA_BACKEND"
+"""`krea2.attention.KREA2_SDPA_BACKEND_ENV_VAR`, under which the node enters no SageAttention scope. Not imported from
+there: that imports torch, which the driving process must not before the run's runtime setup."""
+TIMESTEP = 0.5
+LOGGER_NAME = "calibrate_krea2_working_memory"
+
+Kind = Literal["fit", "blocks", "kv", "caption"]
+Mode = Literal["fit", "large", "kv", "captions"]
+Attention = Literal["sdpa", "sage"]
+
+
+@dataclass(frozen=True)
+class Point:
+ """One transformer forward (or, in K/V-cache mode, the precompute and one step) to measure, in its own process."""
+
+ kind: Kind
+ """`fit` for a point of the fit or large grid; otherwise the check it serves: another block count (`blocks`), the
+ reference K/V cache (`kv`) or a caption beyond the fit grid's (`caption`)."""
+ px: int
+ text_tokens: int
+ dtype: str
+ """A torch dtype name, one of `DTYPES`."""
+ blocks: int = 2
+ references: int = 0
+ """How many square references of `reference_px` the denoise conditions on."""
+ reference_px: int = REFERENCE_PX
+ attention: Attention = "sdpa"
+ """`sage` to run the transformer steps with SageAttention, as `attention_backend: sage` does."""
+
+ @property
+ def fit(self) -> bool:
+ return self.kind == "fit"
+
+ @property
+ def cache_references(self) -> bool:
+ return self.kind == "kv"
+
+
+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],
+ reference_px: int,
+ blocks: int,
+ extra_blocks: int,
+ long_captions: Sequence[int] = (),
+ long_caption_sizes: Sequence[int] = (),
+ attention: Attention = "sdpa",
+) -> list[Point]:
+ """The forwards a run measures, in order: per dtype, the fit grid, the large grid, the K/V-cache or the
+ long-caption checks, each with `attention`."""
+ points: list[Point] = []
+ for dtype in dtypes:
+ if mode == "captions":
+ points += [
+ Point("caption", px, caption, dtype, blocks) for px in long_caption_sizes for caption in long_captions
+ ]
+ continue
+ if mode == "large":
+ points += [Point("fit", px, text_tokens, dtype, blocks, n, reference_px) for px, n in LARGE_GRID]
+ continue
+ if mode == "kv":
+ points += [Point("kv", px, text_tokens, dtype, blocks, n, reference_px) for px, n in KV_GRID]
+ continue
+ points += [Point("fit", px, text_tokens, dtype, blocks) for px in sizes]
+ points += [Point("fit", px, short_text_tokens, dtype, blocks) for px in sizes if px in short_text_sizes]
+ points += [Point("fit", CHECK_PX, text_tokens, dtype, blocks, n, reference_px) for n in references if n]
+ if mode == "fit" and extra_blocks:
+ points.append(Point("blocks", CHECK_PX, text_tokens, dtypes[0], extra_blocks))
+ return [dataclasses.replace(point, attention=attention) for point in points]
+
+
+def grid_side(px: int) -> int:
+ """A square image's tokens per side."""
+ return px // PIXELS_PER_TOKEN_SIDE
+
+
+def image_tokens(px: int) -> int:
+ return grid_side(px) ** 2
+
+
+def reference_tokens(point: Point) -> int:
+ return point.references * image_tokens(point.reference_px)
+
+
+def provenance(point: Point, facts: Mapping[str, Any], date: str) -> str:
+ """A measured point's `provenance`: where and how it was measured."""
+ blocks = f"{point.blocks} block{'' if point.blocks == 1 else 's'}"
+ regime = (
+ ", reference K/V-cache mode: the references' precompute and one cached step in one window"
+ if point.cache_references
+ else ""
+ )
+ sage = (
+ f" with SageAttention {facts['sageattention']} serving the steps (attention_backend: sage)"
+ if point.attention == "sage"
+ else ""
+ )
+ return (
+ f"scripts/calibrate_krea2_working_memory.py ({date}): {fresh_points.runtime_provenance(facts)}. Random-init "
+ f"Krea-2 transformer with the default geometry, {blocks}, the denoise node's attention processors"
+ f"{sage}{regime}; "
+ "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."
+ )
+
+
+# Everything below imports torch. In a measuring process it runs only after `fresh_points.apply_server_runtime`.
+
+
+def _transformer(blocks: int) -> "torch.nn.Module":
+ """The Krea-2 transformer at its default geometry with `blocks` blocks, on the meta device."""
+ import torch
+ from diffusers.models.transformers.transformer_krea2 import Krea2Transformer2DModel
+
+ with torch.device("meta"):
+ return Krea2Transformer2DModel(num_layers=blocks)
+
+
+def _estimate(point: Point, transformer: "torch.nn.Module", device: "torch.device") -> "WorkingMemoryEstimate":
+ """The estimate for the point's denoise on `device`, priced in the kernel regime the caller holds."""
+ import torch
+
+ from invokeai.backend.krea2.denoise_working_memory import estimate_krea2_denoise_working_memory
+
+ return estimate_krea2_denoise_working_memory(
+ transformer,
+ image_seq_len=image_tokens(point.px),
+ text_seq_len=point.text_tokens,
+ reference_seq_len=reference_tokens(point),
+ cache_references=point.cache_references,
+ # Measured whole on the device: nothing is streamed per forward.
+ weights_resident=True,
+ device=device,
+ dtype=getattr(torch, point.dtype),
+ )
+
+
+def recorded_features(point: Point, estimate: "WorkingMemoryEstimate") -> dict[str, Any]:
+ """The features a point records: the estimate's, plus the attention backend where it is not PyTorch SDPA, which
+ keeps a SageAttention point off the SDPA line and apart from the SDPA point of the same forward."""
+ from invokeai.backend.krea2.denoise_working_memory import ATTENTION_BACKEND_FEATURE
+
+ sage = {ATTENTION_BACKEND_FEATURE: point.attention} if point.attention == "sage" else {}
+ return dict(estimate.features) | sage
+
+
+class SageRecorder:
+ """The SageAttention scopes of a point's measured transformer steps, one per step, and whether they prove that
+ SageAttention served the point. The node enters one scope around its whole loop; one per step tells the same, as a
+ fallback in any of them voids the point."""
+
+ def __init__(self) -> None:
+ self.usages: list[SageAttentionUsage] = []
+
+ @contextmanager
+ def scope(self) -> Iterator[None]:
+ from invokeai.backend.util.sage_attention import sage_attention_scope
+
+ with sage_attention_scope() as usage:
+ self.usages.append(usage)
+ yield
+
+ def reasons(self, blocks: int) -> list[str]:
+ """Why the steps measured no SageAttention denoise of `blocks` blocks: no step ran in a scope, calls fell back
+ to PyTorch SDPA, by reason, or a step had fewer calls served than its blocks make. Only `short` calls fall back
+ by design: the text fusion's, over the text layers and the caption. Within a step, a block's call is never
+ `short` while a caption long enough for SageAttention makes up the count, since the block attends over that
+ caption and the image."""
+ if not self.usages:
+ return ["sage scoped no transformer step"]
+ fell_back: Counter[str] = Counter()
+ for usage in self.usages:
+ fell_back.update(usage.fell_back)
+ reasons = [
+ f"sage fell back: {reason}={count}" for reason, count in fell_back.most_common() if reason != "short"
+ ]
+ unserved = sum(usage.served < blocks for usage in self.usages)
+ if unserved:
+ reasons.append(
+ f"sage served fewer than {blocks} block attentions in {unserved} of {len(self.usages)} steps"
+ )
+ return reasons
+
+
+def _install_sage() -> str:
+ """Install SageAttention as `attention_backend: sage` does after the rest of the server's runtime; its version.
+ Leaves where it does not install."""
+ from importlib.metadata import version
+
+ from invokeai.backend.util.sage_attention import install_sage_attention
+
+ if not install_sage_attention():
+ raise SystemExit(
+ "--attention sage: SageAttention did not install (it needs CUDA, a GPU of compute capability 8.0 or newer "
+ "and sageattention 2.2.0 or newer with Triton; its warning on stderr names what is missing)"
+ )
+ return version("sageattention")
+
+
+def _weight_bytes(transformer: "torch.nn.Module", dtype: "torch.dtype") -> int:
+ return sum(param.numel() for param in transformer.parameters()) * dtype.itemsize
+
+
+def install_processors(transformer: "torch.nn.Module", point: Point) -> "Krea2ReferenceKVCache | None":
+ """The denoise node's attention processors, with the reference K/V cache in K/V-cache mode, which they return."""
+ from invokeai.backend.krea2.attention import Krea2RegionalPromptingState, build_krea2_attention_processors
+ from invokeai.backend.krea2.reference_edit import Krea2ReferenceKVCache
+
+ cache = Krea2ReferenceKVCache() if point.cache_references else None
+ transformer.set_attn_processor(
+ build_krea2_attention_processors(transformer, Krea2RegionalPromptingState(), reference_kv_cache=cache)
+ )
+ return cache
+
+
+def forward(
+ point: Point,
+ transformer: "torch.nn.Module",
+ cache: "Krea2ReferenceKVCache | None",
+ device: "torch.device",
+ step_scope: Callable[[], AbstractContextManager[None]] = nullcontext,
+) -> Callable[[], object]:
+ """The operation a point measures, with the inputs the node hands the transformer, allocated now. Each transformer
+ step runs inside `step_scope`, as the node runs its loop; the references' K/V precompute runs before it."""
+ import torch
+
+ from invokeai.backend.krea2.reference_edit import forward_with_references, precompute_reference_kv
+ from invokeai.backend.krea2.sampling_utils import (
+ prepare_position_ids,
+ prepare_position_ids_with_references,
+ prepare_reference_position_ids,
+ )
+
+ dtype = getattr(torch, point.dtype)
+ side = grid_side(point.px)
+ config = transformer.config
+ hidden_states = torch.randn(1, image_tokens(point.px), IN_CHANNELS, device=device, dtype=dtype)
+ caption = torch.randn(
+ 1, point.text_tokens, config.num_text_layers, config.text_hidden_dim, device=device, dtype=dtype
+ )
+ timestep = torch.full((1,), TIMESTEP, device=device, dtype=dtype)
+ grids = [(grid_side(point.reference_px),) * 2] * point.references
+ references = torch.randn(1, reference_tokens(point), IN_CHANNELS, device=device, dtype=dtype)
+
+ def step(position_ids: "torch.Tensor") -> object:
+ with step_scope():
+ return transformer(
+ hidden_states=hidden_states,
+ encoder_hidden_states=caption,
+ encoder_attention_mask=None,
+ timestep=timestep,
+ position_ids=position_ids,
+ return_dict=False,
+ )
+
+ position_ids = prepare_position_ids(point.text_tokens, side, side, device)
+ if not point.references:
+ return lambda: step(position_ids)
+ if cache is None:
+ joint_ids = prepare_position_ids_with_references(point.text_tokens, side, side, grids, device)
+
+ def joint_step() -> object:
+ with step_scope():
+ return forward_with_references(transformer, hidden_states, caption, timestep, joint_ids, references)
+
+ return joint_step
+
+ reference_ids = prepare_reference_position_ids(grids, device)
+
+ def cached_step() -> object:
+ precompute_reference_kv(transformer, references, reference_ids, cache)
+ try:
+ return step(position_ids)
+ finally:
+ cache.clear()
+
+ return cached_step
+
+
+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 invokeai.backend.krea2 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}.")
+ dtype = getattr(torch, point.dtype)
+ recorder = SageRecorder() if point.attention == "sage" else None
+ sage_version = _install_sage() if recorder is not None else None
+
+ with torch.inference_mode():
+ transformer = _transformer(point.blocks)
+ estimate = _estimate(point, transformer, device)
+ platform = platform_for(device)
+ facts = fresh_points.runtime_facts(device, platform.os, denoise_working_memory.__file__)
+ if sage_version is not None:
+ facts["sageattention"] = sage_version
+ common = {
+ "estimator": estimate.estimator,
+ "version": estimate.version,
+ "platform": dataclasses.asdict(platform),
+ "features": recorded_features(point, estimate),
+ "device": facts["device"],
+ }
+ weights = _weight_bytes(transformer, dtype)
+ 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 raw["predicted_bytes"] > free and not force:
+ return fresh_points.skipped_line(point, common, raw)
+
+ # Allocated directly in the measured dtype on the device, randomly initialized.
+ transformer = transformer.to(dtype).to_empty(device=device)
+ for param in transformer.parameters():
+ torch.nn.init.normal_(param, std=0.02)
+ transformer.eval()
+ cache = install_processors(transformer, point)
+ step_scope = recorder.scope if recorder is not None else nullcontext
+ windows = measure_cold_and_warm(device, forward(point, transformer, cache, device, step_scope))
+ date = datetime.date.today().isoformat()
+ return measured_line(
+ point, recorder, common=common, provenance=provenance(point, facts, date), windows=windows, raw=raw
+ )
+
+
+def measured_line(
+ point: Point,
+ recorder: SageRecorder | None,
+ *,
+ common: Mapping[str, Any],
+ provenance: str,
+ windows: Sequence["FreshWindow"],
+ raw: Mapping[str, Any],
+) -> dict[str, Any]:
+ """The output line of a measured point (`fresh_points.point_line`). With SageAttention it is `invalid` where the
+ steps `recorder` scoped prove no SageAttention denoise, and `raw.sage_usage` holds each step's counts."""
+ reasons: Sequence[str] = ()
+ if recorder is not None:
+ usage = [
+ {"served": step.served, "fell_back": dict(step.fell_back), "memory_short": step.memory_short}
+ for step in recorder.usages
+ ]
+ raw = {**raw, "sage_usage": usage}
+ reasons = recorder.reasons(point.blocks)
+ return fresh_points.point_line(
+ point, common=common, provenance=provenance, windows=windows, raw=raw, reasons=reasons
+ )
+
+
+_COLUMNS = (
+ f"{'kind':>7} {'attn':>4} {'dtype':>8} {'blocks':>6} {'px':>5} {'text':>5} {'refs':>4} {'ref px':>6} {'tokens':>7}"
+)
+
+
+def _grid(point: Mapping[str, Any]) -> str:
+ refs = point["references"]
+ return (
+ f"{point['kind']:>7} {point['attention']:>4} {point['dtype']:>8} {point['blocks']:>6} {point['px']:>5} "
+ f"{point['text_tokens']:>5} {refs:>4} {point['reference_px'] if refs else '':>6}"
+ )
+
+
+def _head(line: Mapping[str, Any]) -> str:
+ """A line's grid columns in the table, with its size on the line."""
+ return f"{_grid(line['point'])} {line['features']['tokens'] if 'features' in line else '':>7}"
+
+
+def _summarize(lines: Sequence[Mapping[str, Any]], text_tokens: int) -> None:
+ """Per dtype, the slope of the plain forwards with the long caption from the smallest to the largest, and where
+ every other point lies against it; per point out of the fit (a check, a SageAttention forward), what the estimate
+ reserves for it."""
+ measured = [line for line in lines if line["status"] == "point"]
+ fit = [line for line in measured 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]
+ main = sorted(
+ (
+ line
+ for line in of_dtype
+ if not line["point"]["references"] and line["point"]["text_tokens"] == text_tokens
+ ),
+ key=lambda line: line["features"]["tokens"],
+ )
+ if len(main) < 2:
+ continue
+ lo, hi = main[0], main[-1]
+ slope = (hi["measured_bytes"] - lo["measured_bytes"]) / (hi["features"]["tokens"] - lo["features"]["tokens"])
+ base = lo["measured_bytes"] - slope * lo["features"]["tokens"]
+ print(f"{dtype}: {slope / MIB:.4f} MiB per token, intercept {base / GIB:.3f} GiB")
+ for line in of_dtype:
+ tokens = line["features"]["tokens"]
+ print(
+ f"{dtype}, {line['point']['px']}px, {line['point']['text_tokens']} text, {line['point']['references']} "
+ f"references: {line['measured_bytes'] / GIB:.3f} GiB at {tokens} tokens, "
+ f"{line['measured_bytes'] / (base + slope * tokens):.3f}x the line"
+ )
+ for line in (line for line in measured if not line["in_fit"]):
+ point = line["point"]
+ reserved = line["raw"]["reservation_bytes"]
+ print(
+ f"{point['kind']} {point['attention']} {point['dtype']}, {point['px']}px, {point['text_tokens']} text, "
+ f"{point['references']} references, {point['blocks']} blocks: "
+ f"{line['measured_bytes'] / GIB:.3f} GiB; the shipped "
+ f"estimate reserves {reserved / GIB:.3f} GiB ({reserved / line['measured_bytes']:.3f}x)"
+ )
+
+
+def _print_plan(points: Sequence[Point]) -> None:
+ """The planned points, each priced as a CPU prices it, plus the weights."""
+ import torch
+
+ print(f"{_COLUMNS} {'estimate GiB':>12} {'weights GiB':>11} {'total GiB':>9}")
+ cpu = torch.device("cpu")
+ transformers: dict[int, torch.nn.Module] = {}
+ for point in points:
+ transformer = transformers.setdefault(point.blocks, _transformer(point.blocks))
+ estimate = _estimate(point, transformer, cpu)
+ weights = _weight_bytes(transformer, getattr(torch, point.dtype))
+ print(
+ f"{_grid(dataclasses.asdict(point))} {estimate.features['tokens']:>7} "
+ f"{estimate.reservation_bytes / GIB:>12.2f} {weights / GIB:>11.2f} "
+ f"{(estimate.reservation_bytes + weights) / GIB:>9.2f}"
+ )
+ 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 % PIXELS_PER_TOKEN_SIDE for px in sizes):
+ raise argparse.ArgumentTypeError(
+ f"sizes must be positive multiples of {PIXELS_PER_TOKEN_SIDE} px, got {text!r}"
+ )
+ return sizes
+
+
+def _side(text: str) -> int:
+ sizes = _sizes(text)
+ if len(sizes) != 1:
+ raise argparse.ArgumentTypeError(f"not one side length in px: {text!r}")
+ return sizes[0]
+
+
+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 _dtypes(text: str) -> list[str]:
+ dtypes = [part.strip() for part in text.split(",") if part.strip()]
+ if not dtypes or not set(dtypes) <= set(DTYPES):
+ raise argparse.ArgumentTypeError(f"dtypes must be among {', '.join(DTYPES)}, got {text!r}")
+ return dtypes
+
+
+def main() -> None:
+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
+ parser.add_argument("--mode", choices=("fit", "large", "kv", "captions"), default="fit", help="Default: fit.")
+ 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="Default: every dtype in the fit and captions modes, bfloat16 otherwise. SageAttention: no float32.",
+ )
+ parser.add_argument("--sizes", type=_sizes, default="512,768,1024,1536,2048", help="The fit grid's sizes, px.")
+ parser.add_argument("--text-tokens", type=int, default=512, help="The caption at every size. Default 512.")
+ parser.add_argument("--short-text-tokens", type=int, default=77, help="The text-slope caption. Default 77.")
+ parser.add_argument(
+ "--short-text-sizes", type=_sizes, default="1024,1536", help="Fit sizes that also run the text-slope caption."
+ )
+ parser.add_argument(
+ "--references", type=_counts, default="1,2,3", help="Fit mode: joint references at 1024px. Default 1,2,3."
+ )
+ parser.add_argument(
+ "--reference-px", type=_side, default=REFERENCE_PX, help="A reference's side, px. Default 1024."
+ )
+ parser.add_argument(
+ "--long-captions", type=_counts, default="1024,2048", help="Captions mode: caption tokens. Default 1024,2048."
+ )
+ parser.add_argument(
+ "--long-caption-sizes", type=_sizes, default="1024,1536", help="Captions mode: sizes, px. Default 1024,1536."
+ )
+ parser.add_argument("--blocks", type=int, default=2, help="Transformer blocks. 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(
+ "--attention",
+ choices=("sdpa", "sage"),
+ default="sdpa",
+ help="sage: SageAttention serves the transformer steps, as attention_backend: sage does. Default: sdpa.",
+ )
+ 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()
+
+ if args.single is not None:
+ fresh_points.measure_in_this_process(args.single, point_type=Point, measure=_measure, logger_name=LOGGER_NAME)
+ every_dtype = SAGE_DTYPES if args.attention == "sage" else DTYPES
+ if args.dtypes and not set(args.dtypes) <= set(every_dtype):
+ parser.error(f"--attention sage measures half precision only: {', '.join(SAGE_DTYPES)}")
+ if args.attention == "sage" and args.extra_blocks:
+ parser.error(
+ "--attention sage takes no --extra-blocks: out of the fit, that forward has the features of the fit grid's "
+ "at 1024px, and the builder would keep only the larger of the two"
+ )
+ points = plan(
+ args.mode,
+ dtypes=args.dtypes or (list(every_dtype) if args.mode in ("fit", "captions") 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,
+ reference_px=args.reference_px,
+ blocks=args.blocks,
+ extra_blocks=args.extra_blocks,
+ long_captions=args.long_captions,
+ long_caption_sizes=args.long_caption_sizes,
+ attention=args.attention,
+ )
+ 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)
+ if args.attention == "sage":
+ missing = [name for name in SAGE_PACKAGES if find_spec(name) is None]
+ if missing:
+ parser.error(f"--attention sage needs {' and '.join(missing)}, which this environment does not have")
+ if os.environ.get(KREA2_SDPA_BACKEND_ENV_VAR, "").strip():
+ parser.error(f"--attention sage: the denoise node runs no SageAttention under {KREA2_SDPA_BACKEND_ENV_VAR}")
+ 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()
+ _summarize(lines, args.text_tokens)
+ fresh_points.print_counts(lines, args.out)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/working_memory/fresh_points.py b/scripts/working_memory/fresh_points.py
index 104d243855..09a5aeaf08 100644
--- a/scripts/working_memory/fresh_points.py
+++ b/scripts/working_memory/fresh_points.py
@@ -57,16 +57,18 @@ def point_line(
provenance: str,
windows: Sequence["FreshWindow"],
raw: Mapping[str, Any],
+ reasons: Sequence[str] = (),
) -> dict[str, Any]:
- """The output line of a measured point: a `point`, or `invalid` with the reasons of its windows.
+ """The output line of a measured point: a `point`, or `invalid` with the reasons of its windows and `reasons`.
`common` holds the `MeasuredPoint` fields the measurement does not decide: estimator, version, platform, features
- and device. `windows` are the point's fresh windows, cold first; `raw` the point's other facts.
+ and device. `windows` are the point's fresh windows, cold first; `raw` the point's other facts; `reasons` why the
+ script's own checks void the point where its windows' readings do not.
"""
from invokeai.backend.working_memory.measurement import measured_bytes_and_method, point_reasons
from invokeai.backend.working_memory.spec import import_estimator_modules
- reasons = point_reasons(windows)
+ reasons = [*point_reasons(windows), *reasons]
line = {"status": "invalid" if reasons else "point", "fit": point.fit, "point": dataclasses.asdict(point), **common}
raw = {**raw, **dict(zip(("cold", "warm"), map(dataclasses.asdict, windows), strict=False))}
if reasons:
diff --git a/tests/app/invocations/test_krea2_denoise.py b/tests/app/invocations/test_krea2_denoise.py
index 4ed40e4cc7..f1209ab9d3 100644
--- a/tests/app/invocations/test_krea2_denoise.py
+++ b/tests/app/invocations/test_krea2_denoise.py
@@ -21,10 +21,12 @@ from invokeai.app.invocations.krea2.krea2_denoise import (
Krea2DenoiseInvocation,
requires_sidecar_patching,
)
-from invokeai.app.invocations.model import ModelIdentifierField, TransformerField
+from invokeai.app.invocations.model import LoRAField, ModelIdentifierField, TransformerField
+from invokeai.backend.krea2 import denoise_working_memory as _ESTIMATOR_MODULE
from invokeai.backend.krea2.sampling_utils import build_sigmas, pack_latents, unpack_latents
from invokeai.backend.krea2.style_reference import Krea2StyleReferenceMode, capture_style_reference
from invokeai.backend.model_manager.taxonomy import BaseModelType, Krea2VariantType, ModelFormat, ModelType
+from invokeai.backend.patches.model_patch_raw import ModelPatchRaw
from invokeai.backend.quantization.dequantizing_linear import peak_dequant_transient_bytes
from invokeai.backend.quantization.int8_convrot import Int8ConvrotLinear
from invokeai.backend.rectified_flow.rectified_flow_inpaint_extension import RectifiedFlowInpaintExtension
@@ -334,6 +336,10 @@ class _Transformer:
"transformer_blocks.1.attn.processor": object(),
}
self.installed_processors = None
+ # The working-memory estimate reads the block layers' streamed copies and transients here, and the
+ # attention geometry from the config.
+ self.transformer_blocks = torch.nn.ModuleList()
+ self.config = KREA2_CONFIG
def set_attn_processor(self, processor) -> None:
# The real Krea2Transformer2DModel exposes this; denoise swaps in a memory-efficient attention processor.
@@ -366,6 +372,10 @@ class _Transformer:
return (torch.zeros_like(hidden_states),)
+KREA2_CONFIG = SimpleNamespace(num_attention_heads=48, num_key_value_heads=12, attention_head_dim=128)
+"""The attention geometry of the Krea-2 transformer's config."""
+
+
class _TransformerInfo:
def __init__(self, transformer: _Transformer) -> None:
self.transformer = transformer
@@ -381,7 +391,7 @@ class _TransformerInfo:
@contextmanager
def model_on_device(self, **kwargs):
- self.working_mem_bytes = kwargs.get("working_mem_bytes")
+ self.working_memory = kwargs["working_memory"]
yield ({}, self.transformer)
@@ -694,6 +704,8 @@ def test_run_diffusion_uses_per_prompt_position_ids_when_lengths_differ(monkeypa
class _PositionIdChecker:
attn_processors = {"transformer_blocks.0.attn.processor": object()}
+ transformer_blocks = torch.nn.ModuleList()
+ config = KREA2_CONFIG
def set_attn_processor(self, processor) -> None:
pass
@@ -903,66 +915,132 @@ def test_run_diffusion_still_honors_an_explicit_positive_shift(monkeypatch, tmp_
assert captured == [pytest.approx(1.8)]
-def test_estimate_working_memory_stays_within_a_24gb_card_at_high_res() -> None:
- # Regression: with SDPA attention the footprint is ~linear with a small per-token constant. The previous
- # ~2.6 MiB/token figure demanded ~36 GB at 2560x1440 (14400 tokens), exceeding a 24 GB card, so the cache
- # offloaded the transformer itself to RAM and the forward pass hung. The estimate plus a fully-resident
- # ~12.2 GB fp8 transformer must comfortably fit a 24 GB card so the encoder (not the transformer) is what
- # gets evicted.
- inv = Krea2DenoiseInvocation.model_construct(transformer=SimpleNamespace(loras=[]))
- GB = 1024**3
- transformer_bytes = int(12.3 * GB) # Krea-2-Turbo fp8
+def _working_memory(monkeypatch, tmp_path, invocation, transformer=None, context=None, models=None):
+ """The estimate the node hands the transformer's lock. `models` are what loading another model's key gives."""
+ transformer = transformer if transformer is not None else _Transformer()
+ info = _TransformerInfo(transformer)
+ context = context if context is not None else _runtime_context(tmp_path, transformer)
+ context.models.load = lambda identifier: (models or {}).get(identifier.key, info)
+ _patch_runtime(monkeypatch)
+ invocation._run_diffusion(context)
+ return info.working_memory
- # 2560x1440 -> (2560/16) x (1440/16) = 160 x 90 = 14400 image tokens.
- est_hi = inv._estimate_working_memory(
- image_seq_len=14400, positive_text_seq_len=512, negative_text_seq_len=None, do_cfg=False, num_loras=0
- )
- assert est_hi + transformer_bytes < 24 * GB
- # 1280x720 -> 80 x 45 = 3600 image tokens.
- est_lo = inv._estimate_working_memory(
- image_seq_len=3600, positive_text_seq_len=512, negative_text_seq_len=None, do_cfg=False, num_loras=0
[email protected](("negative_text_seq_len", "text_tokens"), [(1, 2), (2, 2), (5, 5)])
+def test_the_lock_prices_the_longer_cfg_caption(monkeypatch, tmp_path, negative_text_seq_len, text_tokens) -> None:
+ """The conditional and unconditional passes run one after the other: the longer of the two captions counts, the
+ 2-token positive one or the negative one. Without CFG the negative caption is never loaded."""
+ context = _runtime_context(tmp_path, _Transformer(), negative_text_seq_len=negative_text_seq_len)
+ with_cfg = _working_memory(monkeypatch, tmp_path, _runtime_invocation(cfg_scale=4.0), context=context)
+ context = _runtime_context(tmp_path, _Transformer(), negative_text_seq_len=negative_text_seq_len)
+ without_cfg = _working_memory(monkeypatch, tmp_path, _runtime_invocation(cfg_scale=1.0), context=context)
+
+ assert with_cfg.estimator == "denoise.krea2"
+ assert (with_cfg.features["text_tokens"], with_cfg.features["cfg"]) == (text_tokens, True)
+ assert (without_cfg.features["text_tokens"], without_cfg.features["cfg"]) == (2, False)
+
+
+def test_the_lock_prices_the_loras_at_their_file_size(monkeypatch, tmp_path) -> None:
+ """A patched LoRA adds about its own size: 0.03 GiB measured +0.02 GiB, 0.21 GiB +0.22 GiB on an RTX 4090."""
+ sizes = {"lora-a": 30 * 2**20, "lora-b": 210 * 2**20}
+ invocation = _runtime_invocation(cfg_scale=1.0)
+ invocation.transformer = TransformerField(
+ transformer=_model_identifier(),
+ loras=[
+ LoRAField(
+ lora=ModelIdentifierField(key=key, hash=key, name=key, base=BaseModelType.Krea2, type=ModelType.LoRA),
+ weight=1.0,
+ )
+ for key in sizes
+ ],
)
- assert est_lo + transformer_bytes < 24 * GB
+ patches = {
+ key: SimpleNamespace(model=ModelPatchRaw(layers={}), config=SimpleNamespace(file_size=size))
+ for key, size in sizes.items()
+ }
- # Monotonic in tokens, and a non-trivial (multi-GB) reservation so eviction is actually triggered.
- assert est_hi > est_lo
- assert est_lo > 1 * GB
+ estimate = _working_memory(monkeypatch, tmp_path, invocation, models=patches)
+ assert (estimate.features["lora_count"], estimate.features["lora_bytes"]) == (2, sum(sizes.values()))
+ assert {term.name: term.bytes for term in estimate.terms}["lora_patches"] == sum(sizes.values())
-def test_estimate_working_memory_accounts_for_the_longest_text_conditioning() -> None:
- inv = Krea2DenoiseInvocation.model_construct(transformer=SimpleNamespace(loras=[]))
- short_text = inv._estimate_working_memory(
- image_seq_len=3600, positive_text_seq_len=64, negative_text_seq_len=32, do_cfg=True, num_loras=0
- )
- long_positive = inv._estimate_working_memory(
- image_seq_len=3600, positive_text_seq_len=256, negative_text_seq_len=32, do_cfg=True, num_loras=0
- )
- long_negative = inv._estimate_working_memory(
- image_seq_len=3600, positive_text_seq_len=64, negative_text_seq_len=256, do_cfg=True, num_loras=0
- )
+class _LoRAInfo:
+ """`LoadedModel` of a LoRA: its patch, its config and the RAM pin the patcher enters."""
- assert long_positive > short_text
- assert long_negative == long_positive
+ def __init__(self) -> None:
+ self.model = ModelPatchRaw(layers={})
+ self.config = SimpleNamespace(file_size=2**20)
+ self.pinned = 0
+ @contextmanager
+ def model_in_ram(self):
+ self.pinned += 1
+ yield self.model
-def test_estimate_working_memory_accounts_for_regional_attention_masks() -> None:
- inv = Krea2DenoiseInvocation.model_construct(transformer=SimpleNamespace(loras=[]))
- without_regional_masks = inv._estimate_working_memory(
- image_seq_len=3600, positive_text_seq_len=64, negative_text_seq_len=32, do_cfg=True, num_loras=0
+def test_each_lora_is_loaded_once_for_the_estimate_and_the_patcher(monkeypatch, tmp_path) -> None:
+ """Every load signals progress and emits load events, so a LoRA loaded for the estimate and again for the patcher
+ shows twice. Both read the one load, and the patcher pins exactly the patches the lock was sized for."""
+ weights = {"lora-a": 0.5, "lora-b": 1.25}
+ invocation = _runtime_invocation(cfg_scale=1.0)
+ invocation.transformer = TransformerField(
+ transformer=_model_identifier(),
+ loras=[
+ LoRAField(
+ lora=ModelIdentifierField(key=key, hash=key, name=key, base=BaseModelType.Krea2, type=ModelType.LoRA),
+ weight=weight,
+ )
+ for key, weight in weights.items()
+ ],
)
- with_regional_masks = inv._estimate_working_memory(
- image_seq_len=3600,
- positive_text_seq_len=64,
- negative_text_seq_len=32,
- do_cfg=True,
- num_loras=0,
- regional_attention_mask_bytes=1234,
+ lora_infos = {key: _LoRAInfo() for key in weights}
+ transformer_info = _TransformerInfo(_Transformer())
+ loads: list[str] = []
+
+ def load(identifier):
+ loads.append(identifier.key)
+ return lora_infos.get(identifier.key, transformer_info)
+
+ applied: list[tuple[object, float]] = []
+
+ @contextmanager
+ def patcher(*, patches, **_kwargs):
+ for patch, weight, in_ram in patches:
+ with in_ram as pinned:
+ assert pinned is patch
+ applied.append((patch, weight))
+ yield
+
+ context = _runtime_context(tmp_path, transformer_info.transformer)
+ context.models.load = load
+ # Records answer with a file size too, so the count, not the size's source, decides the outcome.
+ context.models.get_config(None).file_size = 2**20
+ _patch_runtime(monkeypatch)
+ monkeypatch.setattr("invokeai.app.invocations.krea2.krea2_denoise.LayerPatcher.apply_smart_model_patches", patcher)
+
+ invocation._run_diffusion(context)
+
+ assert sorted(key for key in loads if key in weights) == sorted(weights)
+ assert applied == [(lora_infos[key].model, weight) for key, weight in weights.items()]
+ assert [info.pinned for info in lora_infos.values()] == [1, 1]
+ assert transformer_info.working_memory.features["lora_count"] == 2
+
+
+def test_a_loaded_lora_that_is_no_patch_is_refused_before_the_lock(monkeypatch, tmp_path) -> None:
+ invocation = _runtime_invocation(cfg_scale=1.0)
+ invocation.transformer = TransformerField(
+ transformer=_model_identifier(),
+ loras=[
+ LoRAField(
+ lora=ModelIdentifierField(key="x", hash="x", name="x", base=BaseModelType.Krea2, type=ModelType.LoRA),
+ weight=1.0,
+ )
+ ],
)
- assert with_regional_masks == without_regional_masks + 1234
+ with pytest.raises(TypeError, match="Expected ModelPatchRaw for LoRA 'x'"):
+ _working_memory(monkeypatch, tmp_path, invocation, models={"x": SimpleNamespace(model=object())})
def _style_reference_field(
@@ -1157,83 +1235,16 @@ def test_run_diffusion_still_runs_a_style_reference_at_a_small_strength(monkeypa
assert Krea2StyleReferenceMode.CAPTURE in transformer.style_modes
-def test_estimate_working_memory_accounts_for_the_style_reference_kv_cache() -> None:
- inv = Krea2DenoiseInvocation.model_construct()
- kwargs = {
- "image_seq_len": 3600,
- "positive_text_seq_len": 64,
- "negative_text_seq_len": None,
- "do_cfg": False,
- "num_loras": 0,
- }
- baseline = inv._estimate_working_memory(**kwargs)
- with_style = inv._estimate_working_memory(**kwargs, style_reference_kv_bytes=1_000_000)
-
- # The cache is an exact, known size, so it is added after the activation multiplier, not scaled by it.
- assert with_style == int(baseline * 1.35) + 1_000_000
-
-
-def test_estimate_working_memory_covers_the_measured_style_reference_overhead() -> None:
- # Measured at 1024x1024 / 8 steps / cfg 1.0: peak VRAM rose ~1.6 GiB over the unstyled run. The
- # estimate has to stay above that, or the model cache offloads the transformer to RAM and the forward
- # crawls over PCIe instead of failing outright.
- inv = Krea2DenoiseInvocation.model_construct()
- kwargs = {
- "image_seq_len": 4096,
- "positive_text_seq_len": 512,
- "negative_text_seq_len": None,
- "do_cfg": False,
- "num_loras": 0,
- }
- style_bytes = 21 * 2 * 12 * 4096 * 128 * 2
- delta = inv._estimate_working_memory(**kwargs, style_reference_kv_bytes=style_bytes) - inv._estimate_working_memory(
- **kwargs
- )
-
- assert delta > int(1.6 * 1024**3)
-
-
-def test_estimate_working_memory_with_style_reference_stays_within_a_24gb_card_at_1024() -> None:
- # 1024x1024 with the default 7-27 band: 4096 image tokens and ~0.5 GiB of retained reference K/V on
- # top of a ~12B bf16 model. This is the resolution style reference is expected to be used at.
- inv = Krea2DenoiseInvocation.model_construct()
- style_bytes = 21 * 2 * 12 * 4096 * 128 * 2
- assert style_bytes < int(0.55 * 1024**3)
-
- estimated = inv._estimate_working_memory(
- image_seq_len=4096,
- positive_text_seq_len=512,
- negative_text_seq_len=None,
- do_cfg=False,
- num_loras=0,
- style_reference_kv_bytes=style_bytes,
- )
-
- model_bytes = 12 * 1024**3
- assert estimated + model_bytes < 24 * 1024**3
-
-
-def test_estimate_working_memory_reports_that_style_reference_does_not_fit_24gb_at_1440p() -> None:
- """Documents a real limit rather than papering over it.
+def test_the_lock_prices_the_style_references_captured_kv(monkeypatch, tmp_path) -> None:
+ invocation = _runtime_invocation(cfg_scale=1.0)
+ invocation.style_reference = _style_reference_field()
- At 2560x1440 the baseline activation estimate is already ~10 GiB; the reference pass and its ~1.7 GiB
- of retained K/V push the total past what a 24 GB card can hold alongside a ~12B bf16 model. The
- estimate must say so honestly -- under-reporting would make the model cache offload the transformer to
- RAM and run the forward over PCIe, which looks like a hang rather than an error.
- """
- inv = Krea2DenoiseInvocation.model_construct()
- style_bytes = 21 * 2 * 12 * 14400 * 128 * 2
-
- estimated = inv._estimate_working_memory(
- image_seq_len=14400,
- positive_text_seq_len=512,
- negative_text_seq_len=512,
- do_cfg=True,
- num_loras=0,
- style_reference_kv_bytes=style_bytes,
- )
+ estimate = _working_memory(monkeypatch, tmp_path, invocation)
- assert estimated + 12 * 1024**3 > 24 * 1024**3
+ # Two styled blocks, one key and one value each, 12 K/V heads of 128 over the one target token, in fp32.
+ assert estimate.features["style_kv_bytes"] == 2 * 2 * 12 * 1 * 128 * 4
+ # The reference pass reuses the 2-token positive caption.
+ assert estimate.features["style_text_tokens"] == 2
def test_regional_attention_memory_includes_masks_build_scratch_and_dtype_sized_attention_bias() -> None:
@@ -1279,31 +1290,26 @@ class TestTheInt8DequantTransientReachesTheReservation:
which is the regression worth catching here rather than in the helper's own unit test.
"""
- def _reservation_for(self, monkeypatch, tmp_path, transformer: _Transformer) -> int:
- info = _TransformerInfo(transformer)
- context = _runtime_context(tmp_path, transformer)
- context.models.load = lambda _identifier: info
- _patch_runtime(monkeypatch)
- _runtime_invocation(cfg_scale=1.0)._run_diffusion(context)
- return info.working_mem_bytes
-
- def test_an_int8_model_reserves_the_transient_on_top_of_the_activations(self, monkeypatch, tmp_path) -> None:
- dense = _Transformer()
+ def test_an_int8_model_reserves_the_transient_of_its_block_layer(self, monkeypatch, tmp_path) -> None:
quantized = _Transformer()
layer = Int8ConvrotLinear(
weight=torch.zeros(1024, 512, dtype=torch.int8),
weight_scale=torch.ones(1024, 1),
convrot=False,
)
- quantized.modules = lambda: iter((quantized, layer))
+ quantized.transformer_blocks = torch.nn.ModuleList([layer])
+ quantized.modules = lambda: quantized.transformer_blocks.modules()
- dense_bytes = self._reservation_for(monkeypatch, tmp_path, dense)
- quantized_bytes = self._reservation_for(monkeypatch, tmp_path, quantized)
+ estimate = _working_memory(monkeypatch, tmp_path, _runtime_invocation(cfg_scale=1.0), transformer=quantized)
# `_patch_runtime` pins the compute dtype to float32, which is what the node passes on.
- transient = peak_dequant_transient_bytes(quantized, torch.float32)
+ transient = peak_dequant_transient_bytes(layer, torch.float32)
+ terms = {term.name: term.bytes for term in estimate.terms}
assert transient > 0
- assert quantized_bytes == dense_bytes + transient
+ assert terms["dequant_transient"] == transient
+ # The node cannot know the cache will load the transformer whole: the layer's int8 weight and float32 scale
+ # are reserved for streaming.
+ assert terms["streamed_layer"] == 1024 * 512 + 1024 * 4
class TestTheAttentionScoreMatrixReachesTheReservation:
@@ -1314,10 +1320,7 @@ class TestTheAttentionScoreMatrixReachesTheReservation:
def _reservation_for(
self, monkeypatch, tmp_path, score_bytes: int, invocation=None, **context_kwargs
) -> tuple[int, list[dict], _Transformer]:
- import invokeai.app.invocations.krea2.krea2_denoise as denoise_module
-
transformer = _Transformer()
- transformer.config = SimpleNamespace(num_attention_heads=48, attention_head_dim=128)
info = _TransformerInfo(transformer)
context = _runtime_context(tmp_path, transformer, **context_kwargs)
context.models.load = lambda _identifier: info
@@ -1328,9 +1331,9 @@ class TestTheAttentionScoreMatrixReachesTheReservation:
asked.append(kwargs)
return score_bytes
- monkeypatch.setattr(denoise_module, "sdpa_score_matrix_bytes", score_matrix_bytes)
+ monkeypatch.setattr(_ESTIMATOR_MODULE, "sdpa_score_matrix_bytes", score_matrix_bytes)
(invocation or _runtime_invocation(cfg_scale=1.0))._run_diffusion(context)
- return info.working_mem_bytes, asked, transformer
+ return info.working_memory.reservation_bytes, asked, transformer
def test_the_score_matrix_is_reserved_for_the_attended_sequence(self, monkeypatch, tmp_path) -> None:
fused_bytes, _, _ = self._reservation_for(monkeypatch, tmp_path, score_bytes=0)
@@ -1574,16 +1577,12 @@ def test_run_diffusion_reserves_memory_for_the_reference_tokens(monkeypatch, tmp
asked_seq_lens: list[int] = []
- def reservation(reference_latents) -> int:
+ def working_memory(reference_latents):
transformer = _Transformer()
- transformer.config = SimpleNamespace(num_attention_heads=48, attention_head_dim=128)
- info = _TransformerInfo(transformer)
context = _reference_context(tmp_path, transformer, positive_references=len(reference_latents or []))
- context.models.load = lambda _identifier: info
invocation = _runtime_invocation(cfg_scale=1.0)
invocation.reference_latents = reference_latents
- invocation._run_diffusion(context)
- return info.working_mem_bytes
+ return _working_memory(monkeypatch, tmp_path, invocation, transformer=transformer, context=context)
def score_matrix_bytes(**kwargs) -> int:
asked_seq_lens.append(kwargs["seq_len"])
@@ -1593,13 +1592,21 @@ def test_run_diffusion_reserves_memory_for_the_reference_tokens(monkeypatch, tmp
monkeypatch.setattr(
denoise_module, "forward_with_references", lambda _model, hidden_states, *_args: torch.zeros_like(hidden_states)
)
- monkeypatch.setattr(denoise_module, "sdpa_score_matrix_bytes", score_matrix_bytes)
+ monkeypatch.setattr(_ESTIMATOR_MODULE, "sdpa_score_matrix_bytes", score_matrix_bytes)
- without_references = reservation(None)
- with_references = reservation(_references("ref-a", "ref-b"))
+ without_references = working_memory(None)
+ with_references = working_memory(_references("ref-a", "ref-b"))
- # Every reference token is an image token to every block; 0.5 MiB per token is the estimate's own rate.
- assert with_references - without_references == _REFERENCE_TOKENS * int(0.5 * 1024**2)
+ # Every reference token is an image token to every block: on the line, beside 2 text tokens and 1 target token.
+ assert (without_references.features["reference_tokens"], without_references.features["tokens"]) == (0, 3)
+ assert (with_references.features["reference_tokens"], with_references.features["tokens"]) == (
+ _REFERENCE_TOKENS,
+ 3 + _REFERENCE_TOKENS,
+ )
+ assert (with_references.features["cached_reference_tokens"], with_references.features["reference_kv_bytes"]) == (
+ 0,
+ 0,
+ )
# The attention the score matrix is priced for spans text + target + references.
assert asked_seq_lens == [2 + 1, 2 + 1 + _REFERENCE_TOKENS]
@@ -1890,17 +1897,14 @@ def test_references_refuse_a_subclass_with_its_own_processors(reference_kv_cache
def test_the_reference_kv_cache_reserves_its_cache_instead_of_per_step_tokens(monkeypatch, tmp_path) -> None:
import invokeai.app.invocations.krea2.krea2_denoise as denoise_module
- def reservation(reference_latents, kv_cache: bool) -> int:
+ def working_memory(reference_latents, kv_cache: bool):
transformer = _Transformer()
- transformer.config = SimpleNamespace(num_attention_heads=48, attention_head_dim=128)
- info = _TransformerInfo(transformer)
+ transformer.transformer_blocks = torch.nn.ModuleList(torch.nn.Identity() for _ in range(28))
context = _reference_context(tmp_path, transformer, positive_references=len(reference_latents or []))
- context.models.load = lambda _identifier: info
invocation = _runtime_invocation(cfg_scale=1.0)
invocation.reference_latents = reference_latents
invocation.reference_kv_cache = kv_cache
- invocation._run_diffusion(context)
- return info.working_mem_bytes
+ return _working_memory(monkeypatch, tmp_path, invocation, transformer=transformer, context=context)
asked_seq_lens: list[int] = []
@@ -1911,15 +1915,19 @@ def test_the_reference_kv_cache_reserves_its_cache_instead_of_per_step_tokens(mo
_patch_runtime(monkeypatch)
# The stub transformer has no blocks to cache; the precompute itself is covered with a real model above.
monkeypatch.setattr(denoise_module, "precompute_reference_kv", lambda *_args: None)
- monkeypatch.setattr(denoise_module, "sdpa_score_matrix_bytes", score_matrix_bytes)
+ monkeypatch.setattr(_ESTIMATOR_MODULE, "sdpa_score_matrix_bytes", score_matrix_bytes)
- without_references = reservation(None, kv_cache=True)
- cached = reservation(_references("ref-a", "ref-b"), kv_cache=True)
+ without_references = working_memory(None, kv_cache=True)
+ cached = working_memory(_references("ref-a", "ref-b"), kv_cache=True)
- # Krea-2 defaults where the stub config is silent: 28 blocks, 12 K/V heads; fp32 under the patched runtime.
+ # The references leave the step's sequence of 2 text tokens and 1 target token, which is no shorter than theirs.
+ assert (cached.features["reference_tokens"], cached.features["cached_reference_tokens"]) == (0, _REFERENCE_TOKENS)
+ assert cached.features["tokens"] == without_references.features["tokens"] == 3
+ # 28 blocks of 12 K/V heads retained, one block's references expanded to 48 heads; fp32 under the patched runtime.
retained = 28 * 2 * 12 * 128 * _REFERENCE_TOKENS * 4
widest_append = 2 * 48 * 128 * _REFERENCE_TOKENS * 4
- assert cached - without_references == retained + widest_append
+ assert cached.features["reference_kv_bytes"] == retained + widest_append
+ assert without_references.features["reference_kv_bytes"] == 0
# Scores: S = 2 text + 1 target queries over S + 3 reference keys is the larger area (18 > 3 * 3), priced as
# the smallest square that holds it.
step, references = 2 + 1, _REFERENCE_TOKENS
diff --git a/tests/app/invocations/test_krea2_denoise_working_memory.py b/tests/app/invocations/test_krea2_denoise_working_memory.py
new file mode 100644
index 0000000000..030bd40d9f
--- /dev/null
+++ b/tests/app/invocations/test_krea2_denoise_working_memory.py
@@ -0,0 +1,506 @@
+"""Krea-2 denoise working memory: the estimate as `denoise.krea2` declares it, against the formula it replaced.
+
+The terms are evaluated with coefficients of the tests' own where they test the estimator's structure, so those hold
+whatever `backend/working_memory/data/denoise.json` ships; `tests/backend/working_memory/` holds the shipped values to
+their points. ROCm with the native allocator off Windows is not measured and prices with the hand-set formula the node
+reserved before the lines were measured, which `TestLegacyReservation` holds byte for byte to that formula, frozen
+below; every other platform nothing measures reserves that formula at least (`TestUnmeasuredPlatforms`). What the
+node hands the estimate and `model_on_device()` is pinned in `tests/app/invocations/test_krea2_denoise.py`.
+"""
+
+import itertools
+import math
+from types import SimpleNamespace
+from typing import get_args
+from unittest.mock import patch
+
+import pytest
+import torch
+
+from invokeai.backend.krea2 import denoise_working_memory
+from invokeai.backend.krea2.denoise_working_memory import KREA2_DENOISE_SPEC, estimate_krea2_denoise_working_memory
+from invokeai.backend.krea2.reference_edit import reference_kv_cache_bytes
+from invokeai.backend.model_manager.load.load_default import ModelLoader
+from invokeai.backend.patches.layers.full_layer import FullLayer
+from invokeai.backend.patches.layers.lora_layer import LoRALayer
+from invokeai.backend.patches.model_patch_raw import ModelPatchRaw
+from invokeai.backend.quantization.dequantizing_linear import peak_dequant_transient_bytes
+from invokeai.backend.quantization.int8_convrot import CONVROT_GROUP_SIZE, Int8ConvrotLinear
+from invokeai.backend.util.attention import sdpa_score_matrix_bytes
+from invokeai.backend.util.fp8 import peak_fp8_cast_transient_bytes
+from invokeai.backend.working_memory import spec as spec_module
+from invokeai.backend.working_memory.coefficients import ResolvedCoefficients
+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
+
+MB = 1024**2
+GB = 1024**3
+K = 100_000
+"""The tests' bytes per attended token."""
+B = 64 * MB
+"""The tests' base."""
+CONFIG = SimpleNamespace(num_attention_heads=48, num_key_value_heads=12, attention_head_dim=128)
+"""The Krea-2 transformer's attention geometry."""
+
+
+def _coefficients(k: float = K, b: float = B) -> ResolvedCoefficients:
+ return ResolvedCoefficients(
+ values={
+ f"{part}_denoise_{dtype}": k if part == "k" else b for dtype in ("bf16", "fp16", "fp32") for part in "kb"
+ },
+ source="test",
+ )
+
+
+def _transformer(*blocks: torch.nn.Module, **outer: torch.nn.Module) -> torch.nn.Module:
+ """A stand-in with the transformer's layout: its config, the `transformer_blocks` and the layers outside them."""
+ model = torch.nn.Module()
+ model.config = CONFIG
+ model.transformer_blocks = torch.nn.ModuleList(blocks)
+ for name, layer in outer.items():
+ setattr(model, name, layer)
+ return model
+
+
+def _int8(out_features: int) -> Int8ConvrotLinear:
+ """An int8_tensorwise linear on the meta device: it materializes two weight-sized compute-dtype copies per forward."""
+ return Int8ConvrotLinear(
+ torch.zeros(out_features, CONVROT_GROUP_SIZE, dtype=torch.int8, device="meta"),
+ torch.ones(out_features, 1, device="meta"),
+ convrot=False,
+ )
+
+
+def _fp8(out_features: int) -> torch.nn.Module:
+ """A linear under FP8 Storage: float8 weights widened to bf16 for its forward."""
+ model = torch.nn.Module()
+ model.proj = torch.nn.Linear(CONVROT_GROUP_SIZE, out_features)
+ ModelLoader._apply_fp8_to_nn_module(model, storage_dtype=torch.float8_e4m3fn, compute_dtype=torch.bfloat16)
+ return model.proj
+
+
+def _estimate(
+ transformer=None, *, image=4096, text=512, refs=0, cached=False, resident=True, dtype=torch.bfloat16, **kw
+):
+ with ATTENTION["cuda"].answers():
+ return estimate_krea2_denoise_working_memory(
+ transformer if transformer is not None else _transformer(),
+ image_seq_len=image,
+ text_seq_len=text,
+ reference_seq_len=refs,
+ cache_references=cached,
+ weights_resident=resident,
+ device=ATTENTION["cuda"].device,
+ dtype=dtype,
+ **kw,
+ )
+
+
+def _features(transformer=None, **kw):
+ return _estimate(transformer, **kw).features
+
+
+def _terms(features, k: float = K, b: float = B) -> dict[str, float]:
+ return {term.name: term.bytes for term in KREA2_DENOISE_SPEC.evaluate(features, _coefficients(k, b)).terms}
+
+
+def _reservation(features, k: float = K, b: float = B) -> int:
+ return KREA2_DENOISE_SPEC.evaluate(features, _coefficients(k, b)).reservation_bytes
+
+
+def _patch(*layers: tuple[str, object]) -> tuple[ModelPatchRaw, int]:
+ """A loaded LoRA of `layers` by module path, with a nominal file size."""
+ return ModelPatchRaw(layers={f"lora_transformer-{path}": layer for path, layer in layers}), MB
+
+
+class TestEstimate:
+ def test_the_plain_forward_prices_image_caption_and_joint_reference_tokens_on_the_line(self) -> None:
+ """Joint references are image tokens to every block, so their forward fits the line as the plain one does."""
+ for refs in (0, 4096, 3 * 4096):
+ features = _features(refs=refs)
+ line = KREA2_DENOISE_SPEC.line(features)
+
+ assert (line.suffix, line.size, line.fits) == ("denoise_bf16", 4096 + 512 + refs, True)
+ assert _reservation(features) == K * (4096 + 512 + refs) + B
+
+ @pytest.mark.parametrize(
+ ("image", "text", "tokens"),
+ [(1024, 77, 3 * 4096), (16384, 512, 16384 + 512)],
+ ids=["precompute-longer", "step-longer"],
+ )
+ def test_cached_references_price_the_longer_pass_on_the_line_plus_their_cache(self, image, text, tokens) -> None:
+ """In K/V-cache mode the references run once, alone, and every step attends to their cached keys: the line
+ prices the larger of the two passes, and the cache is an exact size on top, for the transformer's own block
+ count and heads."""
+ transformer = _transformer(*(torch.nn.Identity() for _ in range(5)))
+ features = _features(transformer, image=image, text=text, refs=3 * 4096, cached=True)
+ cache = reference_kv_cache_bytes(
+ num_layers=5, num_heads=48, num_kv_heads=12, head_dim=128, reference_seq_len=3 * 4096, element_size=2
+ )
+
+ assert features["tokens"] == tokens
+ assert _reservation(features) == K * tokens + B + cache
+ assert not KREA2_DENOISE_SPEC.line(features).fits
+
+ def test_a_style_pass_with_a_longer_caption_is_the_longest_pass(self) -> None:
+ """A style reference's pass runs alone over the image and its own caption."""
+ features = _features(image=4096, text=77, style_text_seq_len=300, style_kv_bytes=MB)
+
+ assert features["tokens"] == 4096 + 300
+
+ def test_a_materialized_score_matrix_is_priced_for_the_cached_precompute_square(self, monkeypatch) -> None:
+ """Five cached 1024px references outnumber a 1024px step's 4608 tokens even with their keys: the precompute's
+ R x R is the larger area. The node tests pin the joint and the step-area cases."""
+ asked: list[dict] = []
+
+ def score_matrix_bytes(**kwargs) -> int:
+ asked.append(kwargs)
+ return 7 * MB
+
+ monkeypatch.setattr(denoise_working_memory, "sdpa_score_matrix_bytes", score_matrix_bytes)
+ features = _features(refs=5 * 4096, cached=True)
+
+ assert [call["seq_len"] for call in asked] == [5 * 4096]
+ assert _terms(features)["attention_scores"] == 7 * MB
+
+ @pytest.mark.parametrize("lora_bytes", [30 * MB, 210 * MB, 2 * GB])
+ def test_plain_loras_add_their_file_size(self, lora_bytes) -> None:
+ plain = _features()
+ patched = _features(loras=[(ModelPatchRaw(layers={}), lora_bytes)])
+
+ assert _reservation(patched) - _reservation(plain) == lora_bytes
+ assert not KREA2_DENOISE_SPEC.line(patched).fits
+
+ @pytest.mark.parametrize(
+ ("quantized", "transient"),
+ [
+ (_int8, lambda layer: peak_dequant_transient_bytes(layer, torch.bfloat16)),
+ (_fp8, lambda layer: peak_fp8_cast_transient_bytes(layer, torch.bfloat16)),
+ ],
+ ids=["int8-dequant", "fp8-cast"],
+ )
+ def test_the_block_phase_prices_the_block_layers_transient_and_the_outer_layer_only_its_excess(
+ self, quantized, transient
+ ) -> None:
+ """The timestep modulation never meets the block activations: its transient (here 3x a block layer's) adds
+ nothing where the block phase is larger; where it is smaller, the reservation is that one layer's need."""
+ block_layer, outer_layer = quantized(256), quantized(768)
+ block_transient, outer_transient = transient(block_layer), transient(outer_layer)
+ assert outer_transient == 3 * block_transient > 0
+ features = _features(_transformer(block_layer, time_mod_proj=outer_layer))
+ term = "dequant_transient" if quantized is _int8 else "fp8_cast_transient"
+
+ large_line = _terms(features)
+ assert (large_line[term], large_line["outer_layer_peak"]) == (block_transient, 0)
+ assert _reservation(features) == K * (4096 + 512) + B + block_transient
+
+ assert _reservation(features, k=0, b=0) == outer_transient
+ assert not KREA2_DENOISE_SPEC.line(features).fits
+
+ def test_a_transformer_that_may_load_partially_reserves_its_largest_block_layer(self) -> None:
+ """A streamed layer is copied to the device for its forward; a resident model streams nothing. A larger layer
+ outside the blocks counts only where it exceeds the block phase."""
+ block_layer = torch.nn.Linear(64, 32, dtype=torch.bfloat16, device="meta")
+ outer_layer = torch.nn.Linear(64, 256, dtype=torch.bfloat16, device="meta")
+ transformer = _transformer(torch.nn.Sequential(block_layer), time_mod_proj=outer_layer)
+
+ streaming = _features(transformer, resident=False)
+ resident = _features(transformer, resident=True)
+
+ assert _terms(streaming)["streamed_layer"] == (64 * 32 + 32) * 2
+ assert _terms(resident)["streamed_layer"] == 0
+ assert _reservation(resident) == K * (4096 + 512) + B
+ assert _reservation(streaming, k=0, b=0) == (64 * 256 + 256) * 2
+
+ def test_regional_masks_add_their_bytes_and_the_scores_a_masked_call_materializes(self) -> None:
+ """A mask narrows the kernels SDPA can pick: on CUDA a masked call materializes the score matrix."""
+ features = _features(regional_mask_bytes=5 * MB)
+ terms = _terms(features)
+ line = KREA2_DENOISE_SPEC.line(features)
+
+ assert features["has_attention_mask"] is True and terms["attention_scores"] > 0
+ assert _reservation(features) - _reservation(_features()) == 5 * MB + terms["attention_scores"]
+ assert not line.fits and "attention_mask" in line.label
+
+ def test_a_style_reference_covers_its_measured_overhead_at_1024px_and_not_much_more(self) -> None:
+ """Peak VRAM rose ~1.6 GiB over the unstyled run at 1024x1024 (8 steps, cfg 1), 0.5 GiB of it the captured
+ K/V of the default 21 styled blocks. The style terms are analytic, so this holds whatever the line; they stay
+ within 1.25x of the measurement."""
+ style_kv_bytes = 21 * 2 * 12 * 4096 * 128 * 2
+ plain = _features(image=4096, text=512)
+ styled = _features(image=4096, text=512, style_kv_bytes=style_kv_bytes)
+
+ for k, b in ((0, 0), (K, B)):
+ assert 1.6 * GB < _reservation(styled, k, b) - _reservation(plain, k, b) < 1.25 * 1.6 * GB
+ assert _terms(plain)["style_reference_activations"] == 0
+ assert not KREA2_DENOISE_SPEC.line(styled).fits
+
+ @pytest.mark.parametrize(
+ ("dtype", "per_token"), [(torch.bfloat16, 0.34), (torch.float16, 0.34), (torch.float32, 0.74)]
+ )
+ def test_caption_tokens_beyond_the_fit_grids_512_reserve_their_measured_excess(self, dtype, per_token) -> None:
+ """Up to 512 caption tokens the line covers a caption's excess over an image token; beyond, each adds the
+ caption checks' largest excess with the fitted terms' 1.3 margin, whichever pass carries the caption."""
+ excess = int(per_token * MB)
+ within = _features(text=512, dtype=dtype)
+ regional = _features(text=1500, dtype=dtype)
+ styled = _features(text=77, style_text_seq_len=1000, style_kv_bytes=MB, dtype=dtype)
+
+ assert _terms(within)["caption_excess"] == 0
+ assert _terms(regional)["caption_excess"] == (1500 - 512) * excess
+ assert _terms(styled)["caption_excess"] == (1000 - 512) * excess
+ assert not KREA2_DENOISE_SPEC.line(regional).fits
+
+ def test_a_dtype_without_a_line_is_refused(self) -> None:
+ with pytest.raises(ValueError, match="'denoise.krea2' has no torch.float64 line"):
+ estimate_krea2_denoise_working_memory(
+ _transformer(), image_seq_len=4096, text_seq_len=512, device=torch.device("cpu"), dtype=torch.float64
+ )
+
+
+class TestSidecarResidual:
+ """A patch that is no `LoRALayer` costs a full residual weight per forward on a sidecar-patched layer, beside the
+ re-dequantized base weight; a plain LoRA layer runs as two thin matmuls and adds only its file."""
+
+ def test_a_quantized_layer_patched_by_a_full_layer_reserves_its_transient_and_residual_once(self) -> None:
+ small, large = _int8(256), _int8(768)
+ features = _features(
+ _transformer(small, large),
+ loras=[
+ _patch(("transformer_blocks.0", FullLayer(torch.zeros(1, 1), None))),
+ _patch(("transformer_blocks.1", FullLayer(torch.zeros(1, 1), None))),
+ ],
+ )
+ residual = peak_dequant_transient_bytes(large, torch.bfloat16) + 768 * CONVROT_GROUP_SIZE * (4 + 2)
+
+ assert _terms(features)["sidecar_patch_residual"] == residual
+ assert not KREA2_DENOISE_SPEC.line(features).fits
+
+ def test_a_plain_lora_layer_adds_no_residual(self) -> None:
+ lora = LoRALayer(
+ up=torch.zeros(768, 1), mid=None, down=torch.zeros(1, CONVROT_GROUP_SIZE), alpha=None, bias=None
+ )
+ features = _features(_transformer(_int8(768)), loras=[_patch(("transformer_blocks.0", lora))])
+
+ assert _terms(features)["sidecar_patch_residual"] == 0
+
+ def test_a_dense_layer_is_a_sidecar_only_where_it_may_be_streamed(self) -> None:
+ """A resident dense layer is patched directly; one partial loading may leave in RAM is a sidecar, copied to
+ the device again for the residual."""
+ layer = torch.nn.Linear(64, 32, dtype=torch.bfloat16, device="meta")
+ loras = [_patch(("transformer_blocks.0", FullLayer(torch.zeros(1, 1), None)))]
+
+ resident = _features(_transformer(layer), loras=loras, resident=True)
+ streaming = _features(_transformer(layer), loras=loras, resident=False)
+
+ assert _terms(resident)["sidecar_patch_residual"] == 0
+ assert _terms(streaming)["sidecar_patch_residual"] == (64 * 32 + 32) * 2 + 64 * 32 * (4 + 2)
+
+ def test_a_key_the_transformer_does_not_have_is_skipped_as_the_patcher_skips_it(self) -> None:
+ loras = [_patch(("no_such.layer", FullLayer(torch.zeros(1), None)))]
+ features = _features(_transformer(_int8(768)), loras=loras)
+
+ assert _terms(features)["sidecar_patch_residual"] == 0
+
+
+class TestMeasuredPlatforms:
+ """Fitted values on a measured platform price the measured terms alone, never the formula they replaced."""
+
+ def test_cfg_and_the_lora_count_add_nothing_beyond_the_measured_terms(self) -> None:
+ plain = _features()
+ guided = _features(cfg=True, loras=[(ModelPatchRaw(layers={}), MB)] * 2)
+
+ assert _reservation(guided) - _reservation(plain) == 2 * MB
+
+
+def _legacy_estimate_working_memory(
+ image_seq_len: int,
+ positive_text_seq_len: int,
+ negative_text_seq_len: int | None,
+ do_cfg: bool,
+ num_loras: int,
+ regional_attention_mask_bytes: int = 0,
+ style_reference_kv_bytes: int = 0,
+ reference_precompute_seq_len: int = 0,
+ reference_kv_bytes: int = 0,
+) -> int:
+ """`Krea2DenoiseInvocation._estimate_working_memory` as the node priced with it by hand, frozen."""
+ GB = 1024**3
+ MB = 1024**2
+ per_token_bytes = int(0.5 * MB)
+ text_seq_len = max(positive_text_seq_len, negative_text_seq_len or 0)
+ estimated = max(image_seq_len + text_seq_len, reference_precompute_seq_len) * per_token_bytes
+ estimated += int(1.5 * GB)
+ if do_cfg:
+ estimated = int(estimated * 1.1)
+ estimated += regional_attention_mask_bytes
+ if style_reference_kv_bytes > 0:
+ estimated = int(estimated * 1.35)
+ estimated += style_reference_kv_bytes
+ estimated += reference_kv_bytes
+ if num_loras > 0:
+ estimated += int(0.5 * num_loras * GB)
+ return estimated
+
+
+LEGACY_PLATFORMS = [Platform("miopen", "native", os) for os in get_args(OperatingSystem) if os != "windows"]
+TRANSFORMERS = [
+ _transformer(torch.nn.Identity(), torch.nn.Identity()),
+ _transformer(_int8(256), _int8(256), time_mod_proj=_int8(768)),
+]
+# Image tokens, caption, references, cached: no reference beside a regional mask or a style reference, as the node
+# refuses those.
+SHAPES = [
+ (4096, 77, 0, False),
+ (6912, 512, 0, False),
+ (16384, 512, 0, False),
+ (6912, 84, 3888, False),
+ (4096, 512, 12288, True),
+]
+
+
+def _cases():
+ grid = itertools.product(
+ SHAPES, (False, True), (0, 2), (0, 123 * MB), (0, 500 * MB), TRANSFORMERS, (torch.bfloat16, torch.float32)
+ )
+ for shape, cfg, loras, regional, style, transformer, dtype in grid:
+ if shape[2] and (regional or style):
+ continue
+ yield shape, cfg, loras, regional, style, transformer, dtype
+
+
+def _reserved(platform, attention, shape, cfg, loras, regional, style, transformer, dtype) -> int:
+ image, text, refs, cached = shape
+ with attention.answers(), patch.object(spec_module, "platform_for", return_value=platform):
+ return estimate_krea2_denoise_working_memory(
+ transformer,
+ image_seq_len=image,
+ text_seq_len=text,
+ reference_seq_len=refs,
+ cache_references=cached,
+ cfg=cfg,
+ loras=[(ModelPatchRaw(layers={}), 200 * MB)] * loras,
+ regional_mask_bytes=regional,
+ style_kv_bytes=style,
+ weights_resident=True,
+ device=attention.device,
+ dtype=dtype,
+ ).reservation_bytes
+
+
+def _legacy(attention, shape, cfg, loras, regional, style, transformer, dtype) -> int:
+ """The frozen formula plus what the node added to it: the score matrix, for the configured heads and the attended
+ sequence (for cached references the side of the larger area), and the whole model's largest dequantization."""
+ image, text, refs, cached = shape
+ step = image + text
+ side = math.isqrt(max(step * (step + refs), refs**2) - 1) + 1 if cached else step + refs
+ kv = 0
+ if cached:
+ kv = reference_kv_cache_bytes(
+ num_layers=len(transformer.transformer_blocks),
+ num_heads=48,
+ num_kv_heads=12,
+ head_dim=128,
+ reference_seq_len=refs,
+ element_size=dtype.itemsize,
+ )
+ formula = _legacy_estimate_working_memory(
+ image_seq_len=image + (0 if cached else refs),
+ positive_text_seq_len=text,
+ negative_text_seq_len=None,
+ do_cfg=cfg,
+ num_loras=loras,
+ regional_attention_mask_bytes=regional,
+ style_reference_kv_bytes=style,
+ reference_precompute_seq_len=refs if cached else 0,
+ reference_kv_bytes=kv,
+ )
+ with attention.answers():
+ score = sdpa_score_matrix_bytes(
+ device=attention.device, dtype=dtype, num_heads=48, head_dim=128, seq_len=side, has_attn_mask=regional > 0
+ )
+ return formula + score + peak_dequant_transient_bytes(transformer, dtype)
+
+
+class TestLegacyReservation:
+ @pytest.mark.parametrize("attention", [ATTENTION["cuda"], ATTENTION["hip"]], ids=["fused", "materializing"])
+ def test_the_reservation_is_the_legacy_formula_byte_for_byte(self, attention) -> None:
+ """On the platforms still `legacy`, for resident transformers that hold no float8 weight and LoRAs below half a
+ GiB each: the cases where the reservation adds none of the terms the formula lacked."""
+ mismatches = []
+ for case in _cases():
+ expected = _legacy(attention, *case)
+ reserved = [_reserved(platform, attention, *case) for platform in LEGACY_PLATFORMS]
+ if any(value != expected for value in reserved):
+ mismatches.append((case[:5], expected, reserved))
+ assert not mismatches, f"{len(mismatches)} cases differ, e.g. (case, legacy, reserved): {mismatches[:3]}"
+
+ def test_the_terms_the_formula_lacked_go_on_top(self) -> None:
+ """A transformer the cache may load partially reserves its largest block layer for streaming as well."""
+ transformer = _transformer(torch.nn.Linear(64, 32, dtype=torch.bfloat16, device="meta"))
+ with patch.object(spec_module, "platform_for", return_value=LEGACY_PLATFORMS[0]):
+ resident = _estimate(transformer, resident=True).reservation_bytes
+ streaming = _estimate(transformer, resident=False).reservation_bytes
+
+ assert streaming - resident == (64 * 32 + 32) * 2
+
+ @pytest.mark.parametrize(
+ ("text", "lora_bytes", "terms", "formula"),
+ [
+ # A regional prompt's concatenated 1500-token caption: the line at 0.5 MiB per token and the 1.5 GiB base,
+ # plus 0.34 MiB per caption token beyond 512, against the formula's line alone (4.56 against 4.23 GiB).
+ (
+ 1500,
+ 0,
+ (4096 + 1500) * 2**19 + 3 * 2**29 + (1500 - 512) * int(0.34 * MB),
+ (4096 + 1500) * 2**19 + 3 * 2**29,
+ ),
+ # One 1.2 GiB plain LoRA at its file's size, against the formula's half a GiB (4.95 against 4.25 GiB).
+ (
+ 512,
+ int(1.2 * GB),
+ (4096 + 512) * 2**19 + 3 * 2**29 + int(1.2 * GB),
+ (4096 + 512) * 2**19 + 3 * 2**29 + GB // 2,
+ ),
+ ],
+ ids=["long-caption", "large-lora"],
+ )
+ def test_terms_beyond_the_legacy_formula_are_reserved_in_full(self, text, lora_bytes, terms, formula) -> None:
+ """The formula is a floor, not a cap: where the terms price more than it, at 4096 image tokens without CFG, the
+ reservation is theirs."""
+ loras = [(ModelPatchRaw(layers={}), lora_bytes)] if lora_bytes else []
+ with patch.object(spec_module, "platform_for", return_value=Platform("miopen", "native", "linux")):
+ estimate = _estimate(image=4096, text=text, loras=loras)
+
+ assert formula == _legacy_estimate_working_memory(
+ image_seq_len=4096,
+ positive_text_seq_len=text,
+ negative_text_seq_len=None,
+ do_cfg=False,
+ num_loras=len(loras),
+ )
+ assert estimate.reservation_bytes == terms > formula
+
+
+EVERY_PLATFORM = [
+ Platform(*keys) for keys in itertools.product(get_args(ConvBackend), get_args(Allocator), get_args(OperatingSystem))
+]
+
+
+class TestUnmeasuredPlatforms:
+ """`priced_as` prices a platform nothing is measured on with a measured platform's lines, whose entries floor
+ their values at the legacy constants there, and with them the formula they replaced."""
+
+ @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) -> None:
+ attention = ATTENTION["cuda"]
+ short = []
+ for case in itertools.islice(_cases(), 0, None, 7):
+ expected, reserved = _legacy(attention, *case), _reserved(platform, attention, *case)
+ if reserved < expected:
+ short.append((case[:5], expected, reserved))
+ assert not short, f"{len(short)} cases short, e.g. (case, legacy, reserved): {short[:3]}"
diff --git a/tests/backend/working_memory/test_shipped_coefficients.py b/tests/backend/working_memory/test_shipped_coefficients.py
index b897680b2c..d89492bfe7 100644
--- a/tests/backend/working_memory/test_shipped_coefficients.py
+++ b/tests/backend/working_memory/test_shipped_coefficients.py
@@ -10,6 +10,7 @@ hold within 1.3x are listed in `bounds.UPPER_BOUND_EXCEPTIONS`; the out-of-fit o
"""
import collections
+import dataclasses
import itertools
import platform as stdlib_platform
import re
@@ -45,7 +46,7 @@ from invokeai.backend.working_memory.coefficients import (
shipped_data,
)
from invokeai.backend.working_memory.counters import backend_for
-from invokeai.backend.working_memory.estimate import WorkingMemoryEstimate
+from invokeai.backend.working_memory.estimate import WorkingMemoryEstimate, WorkingMemoryTerm
from invokeai.backend.working_memory.fingerprint import environment_for
from invokeai.backend.working_memory.fit import (
capping_spans,
@@ -80,21 +81,49 @@ OUT_OF_FIT = {
"AMD Radeon Pro W7900 Dual Slot (gfx1100)",
"demand_peak",
): 5,
+ ((("allocator", "native"), ("conv_backend", "cudnn")), "NVIDIA GeForce RTX 4090", "demand_peak"): 16 + 40,
+ ((("allocator", "cudaMallocAsync"), ("conv_backend", "cudnn")), "NVIDIA GeForce RTX 4090", "demand_peak"): 15 + 40,
+ ((("allocator", "native"), ("conv_backend", "cudnn")), "NVIDIA RTX 6000 Ada Generation", "demand_peak"): 12,
+ (
+ (("allocator", "cudaMallocAsync"), ("conv_backend", "cudnn")),
+ "NVIDIA RTX 6000 Ada Generation",
+ "demand_peak",
+ ): 12,
+ (
+ (("allocator", "native"), ("conv_backend", "miopen"), ("os", "windows")),
+ "AMD Radeon RX 9060 XT (gfx1200)",
+ "demand_peak",
+ ): 15,
+ (
+ (("allocator", "expandable"), ("conv_backend", "miopen"), ("os", "windows")),
+ "AMD Radeon RX 9060 XT (gfx1200)",
+ "demand_peak",
+ ): 16,
}
"""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, 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."""
+check the score-matrix term, and the FLUX.3 and Krea-2 denoise checks.
+
+The FLUX.3 checks 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`).
+
+The Krea-2 checks are, on each of its four platforms, 3 reference K/V-cache windows and 12 forwards with 1024- and
+2048-token captions, and a 4-block forward under CUDA's native allocator and ROCm's expandable segments; an RTX 6000
+Ada's 12 caption forwards on Linux under each CUDA allocator, which check the caption excess only; and the RTX 4090's
+40 SageAttention forwards under each CUDA allocator (the fit, large, K/V-cache and caption grids in bf16 and fp16),
+which check that the SDPA lines cover a SageAttention denoise.
+
+A point that leaves the fit needs an edit here."""
LEGACY_ENTRIES = {
("denoise.z_image", (("allocator", "native"), ("conv_backend", "miopen"))),
("denoise.flux2", (("allocator", "native"), ("conv_backend", "miopen"))),
+ ("denoise.krea2", (("allocator", "native"), ("conv_backend", "miopen"))),
}
"""The entries, by estimator and platform keys, that carry hand-set constants (`CoefficientEntry.legacy`) rather than
-fits of measured points: the Z-Image and FLUX.2 denoise on ROCm with the native allocator off Windows, which nothing
-measures yet. Shipping an entry's points and fit removes it from here."""
+fits of measured points: the Z-Image, FLUX.2 and Krea-2 denoise on ROCm with the native allocator off Windows, which
+nothing measures yet. Shipping an entry's points and fit removes it from here."""
# Imported deliberately rather than relying on whichever modules ran first: a spec missing from the registry is a spec
# whose data nobody checks.
@@ -545,6 +574,29 @@ def test_an_unmeasured_platform_raises_a_value_to_its_floor_and_a_measured_one_d
assert on_mps.source == "test:conv_backend=mps (priced as conv_backend=cudnn, floored)"
+def _line_terms(features, values):
+ return (WorkingMemoryTerm.fitted("line", "k", 1, values),)
+
+
+def test_legacy_or_floored_values_reserve_the_legacy_formula_and_fitted_ones_do_not() -> None:
+ """An estimator shaped unlike the formula it replaced declares that formula; it prices only where the values are
+ a `legacy` entry's or raised to their floors on a platform nothing measures, and the estimate reserves the larger."""
+ spec = dataclasses.replace(_spec("test.lender"), terms=_line_terms, legacy_formula=lambda features, values: 100.0)
+ fitted = _data(_entry(spec.id, values={"k": 7.0}, floor={"k": 8.0}))
+ legacy = _data(_entry(spec.id, values={"k": 9.0}).model_copy(update={"legacy": True}))
+ unfloored = _data(_entry(spec.id, values={"k": 7.0}))
+ mps = replace(CUDNN, conv_backend="mps")
+
+ def reserved(data, platform) -> int:
+ resolved = resolve_coefficients(data, spec, platform, origin="test")
+ return spec.evaluate({}, resolved).reservation_bytes
+
+ assert (reserved(fitted, CUDNN), reserved(fitted, mps)) == (7, 100)
+ assert (reserved(legacy, CUDNN), reserved(legacy, mps)) == (100, 100)
+ assert reserved(unfloored, mps) == 7
+ assert _spec("test.lender").evaluate({}, resolve_coefficients(legacy, spec, CUDNN, "test")).terms == ()
+
+
@pytest.mark.parametrize(
"entries, message",
[
diff --git a/tests/test_build_shipped_working_memory.py b/tests/test_build_shipped_working_memory.py
index c816c63056..a361d96214 100644
--- a/tests/test_build_shipped_working_memory.py
+++ b/tests/test_build_shipped_working_memory.py
@@ -838,10 +838,15 @@ def _legacy_data_copy(tmp_path: Path) -> tuple[Path, dict[str, bytes]]:
def _test_points(data_dir: Path) -> list[MeasuredPoint]:
- """The denoise points the test's records or export wrote: their device is not the shipped points' `RTX 4090`. A
- record names the card as the calibration script does, an export's point by name and device class id."""
+ """The Z-Image denoise points the test's records or export wrote: their device is not the shipped Z-Image points'
+ `RTX 4090`. A record names the card as the calibration script does, an export's point by name and device class
+ id."""
devices = {RTX_4090.name, f"{RTX_4090.name} ({RTX_4090.id})"}
- return [point for point in load_data(data_dir)["denoise.json"].points if point.device in devices]
+ return [
+ point
+ for point in load_data(data_dir)["denoise.json"].points
+ if point.estimator == Z_IMAGE_DENOISE_SPEC.id and point.device in devices
+ ]
def test_fresh_process_points_replace_the_legacy_entry_they_fit_and_leave_the_others_as_they_were(
diff --git a/tests/test_calibrate_flux3_denoise_working_memory.py b/tests/test_calibrate_flux3_denoise_working_memory.py
index 9b8606ec92..349e95fcc9 100644
--- a/tests/test_calibrate_flux3_denoise_working_memory.py
+++ b/tests/test_calibrate_flux3_denoise_working_memory.py
@@ -414,7 +414,11 @@ def test_a_real_forward_ships_as_a_lower_bound_every_refit_must_keep(tmp_path: P
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)"]
+ (added,) = [
+ p
+ for p in data.points
+ if p.estimator == FLUX3_DENOISE_SPEC.id and p.device == "AMD Radeon RX 9060 XT (gfx1200)"
+ ]
assert (added.in_fit, added.measured_bytes) == (False, estimate - MIB)
else:
assert status == 1
diff --git a/tests/test_calibrate_krea2_working_memory.py b/tests/test_calibrate_krea2_working_memory.py
new file mode 100644
index 0000000000..e908ce5961
--- /dev/null
+++ b/tests/test_calibrate_krea2_working_memory.py
@@ -0,0 +1,456 @@
+"""scripts/calibrate_krea2_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, and that a
+run's points replace the legacy `denoise.krea2` 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 json
+import shutil
+import sys
+from collections import Counter
+from importlib.util import module_from_spec, spec_from_file_location
+from pathlib import Path
+from types import SimpleNamespace
+
+import pytest
+import torch
+from diffusers.models.transformers.transformer_krea2 import Krea2Transformer2DModel
+
+from invokeai.backend.krea2.attention import KREA2_SDPA_BACKEND_ENV_VAR
+from invokeai.backend.krea2.denoise_working_memory import ATTENTION_BACKEND_FEATURE, KREA2_DENOISE_SPEC
+from invokeai.backend.krea2.reference_edit import Krea2ReferenceKVMode
+from invokeai.backend.util import sage_attention
+from invokeai.backend.util.sage_attention import SageAttentionUsage
+from invokeai.backend.working_memory.coefficients import load_data
+from invokeai.backend.working_memory.counters import CounterReading
+from invokeai.backend.working_memory.measurement import fresh_window
+from scripts.working_memory import fresh_points
+from scripts.working_memory.build_shipped import DATA_DIR, main, write_data
+
+SCRIPT = Path(__file__).parents[1] / "scripts" / "calibrate_krea2_working_memory.py"
+MIB = 2**20
+
+
+def _load_script():
+ spec = spec_from_file_location("calibrate_krea2_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
+
+GRID = {
+ "sizes": [512, 1024, 2048],
+ "text_tokens": 512,
+ "short_text_tokens": 77,
+ "short_text_sizes": [1024],
+ "references": [0, 1, 3],
+ "reference_px": 1024,
+ "blocks": 2,
+ "extra_blocks": 0,
+}
+TRANSFORMER = script._transformer(2)
+
+
+def _features(point):
+ return script.recorded_features(point, script._estimate(point, TRANSFORMER, torch.device("cpu")))
+
+
+def test_the_fit_grid_runs_every_size_the_short_caption_and_the_references_per_dtype() -> None:
+ points = script.plan("fit", dtypes=["bfloat16", "float32"], **(GRID | {"extra_blocks": 4}))
+
+ per_dtype = [
+ ("fit", 512, 512, 0, 2),
+ ("fit", 1024, 512, 0, 2),
+ ("fit", 2048, 512, 0, 2),
+ ("fit", 1024, 77, 0, 2),
+ ("fit", 1024, 512, 1, 2),
+ ("fit", 1024, 512, 3, 2),
+ ]
+ assert [(p.dtype, p.kind, p.px, p.text_tokens, p.references, p.blocks) for p in points] == [
+ *((dtype, *row) for dtype in ("bfloat16", "float32") for row in per_dtype),
+ ("bfloat16", "blocks", 1024, 512, 0, 4),
+ ]
+ assert [point.fit for point in points] == [True] * 12 + [False]
+
+
+def test_a_plain_or_joint_reference_forward_fits_its_dtypes_line_over_every_token() -> None:
+ """Three 1024px joint references at a 1024px generation: 4096 tokens each beside the image's 4096 and the caption."""
+ point = Point("fit", 1024, 512, "float16", references=3)
+ features = _features(point)
+ line = KREA2_DENOISE_SPEC.line(features)
+
+ assert (features["image_tokens"], features["reference_tokens"], features["text_tokens"]) == (4096, 3 * 4096, 512)
+ assert (line.suffix, line.size, line.fits) == ("denoise_fp16", 4096 + 3 * 4096 + 512, True)
+
+
+def test_the_large_grid_reaches_29184_tokens_on_the_line() -> None:
+ points = script.plan("large", dtypes=["bfloat16"], **GRID)
+ lines = [KREA2_DENOISE_SPEC.line(_features(point)) for point in points]
+
+ assert [line.size for line in lines] == [16384 + 4096 + 512, 16384 + 3 * 4096 + 512, 9216 + 3 * 4096 + 512]
+ assert all(point.fit for point in points) and all(line.fits for line in lines)
+
+
+def test_the_caption_checks_run_long_captions_per_dtype_off_the_line() -> None:
+ points = script.plan(
+ "captions", dtypes=["bfloat16", "float32"], **GRID, long_captions=[1024, 2048], long_caption_sizes=[1024]
+ )
+ features = [_features(point) for point in points]
+
+ assert [(p.kind, p.dtype, p.px, p.text_tokens, p.fit) for p in points] == [
+ ("caption", dtype, 1024, caption, False) for dtype in ("bfloat16", "float32") for caption in (1024, 2048)
+ ]
+ assert [f["tokens"] for f in features] == [4096 + 1024, 4096 + 2048] * 2
+ assert not any(KREA2_DENOISE_SPEC.line(f).fits for f in features)
+
+
+def test_the_kv_checks_price_the_longer_pass_and_the_cache_off_the_line() -> None:
+ """At 1024px three cached references outnumber the step's tokens, one does not; neither fits the line."""
+ points = script.plan("kv", dtypes=["bfloat16"], **GRID)
+ features = [_features(point) for point in points]
+
+ assert [(p.px, p.references, p.cache_references, p.fit) for p in points] == [
+ (1024, 1, True, False),
+ (1024, 3, True, False),
+ (2048, 1, True, False),
+ ]
+ assert [f["tokens"] for f in features] == [4096 + 512, 3 * 4096, 16384 + 512]
+ assert all(f["reference_kv_bytes"] > 0 and f["reference_tokens"] == 0 for f in features)
+ assert not any(KREA2_DENOISE_SPEC.line(f).fits for f in features)
+
+
+def _tiny_transformer() -> torch.nn.Module:
+ """The class the script measures, at one head of 8 and a narrow caption, so the CPU runs it in float32."""
+ torch.manual_seed(0)
+ return Krea2Transformer2DModel(
+ in_channels=script.IN_CHANNELS,
+ num_layers=2,
+ attention_head_dim=8,
+ num_attention_heads=2,
+ num_key_value_heads=1,
+ intermediate_size=16,
+ timestep_embed_dim=8,
+ text_hidden_dim=8,
+ num_text_layers=12,
+ text_num_attention_heads=2,
+ text_num_key_value_heads=2,
+ text_intermediate_size=16,
+ num_layerwise_text_blocks=1,
+ num_refiner_text_blocks=1,
+ axes_dims_rope=(2, 2, 4),
+ ).eval()
+
+
+ "point",
+ [
+ Point("fit", 64, 7, "float32"),
+ Point("fit", 64, 7, "float32", references=2, reference_px=32),
+ Point("kv", 64, 7, "float32", references=2, reference_px=32),
+ ],
+ ids=["plain", "joint-references", "kv-cache"],
+)
+def test_the_measured_operation_runs_the_tokens_its_features_name(point) -> None:
+ """The node's inputs through the node's processors: the image's 16 tokens and the caption's 7, the references'
+ 4 each on the joint sequence or in the cache, which the operation fills for its step and empties after it."""
+ features = _features(point)
+ model = _tiny_transformer()
+ cache = script.install_processors(model, point)
+ operation = script.forward(point, model, cache, torch.device("cpu"))
+ appended: list[int] = []
+ if cache is not None:
+ extend = cache.extend
+
+ def recording_extend(block_index, key, value, attention_mask):
+ appended.append(cache._cache[block_index][0].shape[2])
+ return extend(block_index, key, value, attention_mask)
+
+ cache.extend = recording_extend
+
+ with torch.inference_mode():
+ result = operation()
+ # The stock forward returns a tuple, `forward_with_references` the tensor.
+ output = result[0] if isinstance(result, tuple) else result
+
+ assert (features["image_tokens"], features["text_tokens"]) == (16, 7)
+ assert output.shape == (1, 16, script.IN_CHANNELS)
+ if point.cache_references:
+ assert appended == [features["cached_reference_tokens"]] * 2 == [8, 8]
+ assert (len(cache), cache.mode) == (0, Krea2ReferenceKVMode.OFF)
+ else:
+ assert features["reference_tokens"] == 4 * point.references
+
+
+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": 150_000, "float16": 150_000, "float32": 260_000}
+"""Bytes per attended token the synthetic points below lie on, per dtype, over a 300 MiB base."""
+SUFFIXES = {"bfloat16": "bf16", "float16": "fp16", "float32": "fp32"}
+
+
+def _measured_line(point, scale: float = 1.0, recorder=None) -> dict:
+ """The line a measuring process on an RTX 4090 prints for `point`, after the JSON round trip from the measuring
+ process to the driving one: its demand on its dtype's synthetic line, times `scale`, with SageAttention's `recorder`
+ where it ran with one."""
+ features = _features(point)
+ demand = int(scale * (SLOPES[point.dtype] * features["tokens"] + 300 * MIB))
+ window = fresh_window(
+ _reading(), _reading(peak_reserved=1000 + demand, driver=1200 + demand), oom=False, spill=False
+ )
+ common = {
+ "estimator": KREA2_DENOISE_SPEC.id,
+ "version": KREA2_DENOISE_SPEC.version,
+ "platform": {"conv_backend": "cudnn", "allocator": "native", "os": "windows"},
+ "features": dict(features),
+ "device": "NVIDIA GeForce RTX 4090",
+ }
+ line = script.measured_line(point, recorder, common=common, provenance="test", windows=[window, window], raw={})
+ return json.loads(json.dumps(line))
+
+
+def _record(point, scale: float = 1.0) -> dict:
+ """The file record of `point` (`_measured_line`)."""
+ record = fresh_points.file_record(_measured_line(point, scale))
+ assert record is not None
+ return record
+
+
+LEGACY_VALUES = {
+ f"{part}_denoise_{dtype}": value for dtype in SUFFIXES.values() for part, value in (("k", 2**19), ("b", 3 * 2**29))
+}
+"""The hand-set constants of a `legacy` Krea-2 denoise entry."""
+CUDNN_NATIVE = {"conv_backend": "cudnn", "allocator": "native"}
+
+
+def _legacy_data_copy(tmp_path: Path) -> Path:
+ """The shipped data as it was before the RTX 4090's native-allocator Krea-2 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 == KREA2_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
+
+
+SAGE_SCALE = 1.03
+"""How much more than SDPA the synthetic SageAttention points demand: within the fit's 5% margin, so the SDPA lines
+cover them, and above the SDPA points, so a fit that took them in would move."""
+
+
+def test_a_runs_points_replace_the_legacy_entry_of_their_platform(tmp_path: Path, capsys) -> None:
+ """The default fit grid spans each dtype's line, joint references 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. The K/V-cache checks join as out-of-fit points their estimate covers. A SageAttention
+ run of the same forwards, each demanding more, moves no line: its points join out of the fit, each apart from the
+ SDPA point of the same forward, the K/V-cache checks included."""
+ grid = GRID | {"sizes": [512, 768, 1024, 1536, 2048], "short_text_sizes": [1024, 1536], "references": [1, 2, 3]}
+ points = [
+ *script.plan("fit", dtypes=list(script.DTYPES), **(grid | {"extra_blocks": 4})),
+ *script.plan("large", dtypes=["bfloat16"], **grid),
+ *script.plan("kv", dtypes=["bfloat16"], **grid),
+ ]
+ sage = [
+ *script.plan("fit", dtypes=list(script.SAGE_DTYPES), **grid, attention="sage"),
+ *script.plan("kv", dtypes=["bfloat16"], **grid, attention="sage"),
+ ]
+ records = [_record(point) for point in points] + [_record(point, SAGE_SCALE) for point in sage]
+ assert not any(record["in_fit"] for record in records[len(points) :])
+ point_file = tmp_path / "krea2.jsonl"
+ point_file.write_text("".join(json.dumps(record) + "\n" for record in records), 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(records)} fresh-process points from 1 point files" in capsys.readouterr().out
+ native_points = [
+ point
+ for point in load_data(data_dir)["denoise.json"].points
+ if point.estimator == KREA2_DENOISE_SPEC.id and point.platform == CUDNN_NATIVE
+ ]
+ shipped_sage = [point for point in native_points if point.features.get(ATTENTION_BACKEND_FEATURE) == "sage"]
+ assert len(shipped_sage) == len(sage) and not any(point.in_fit for point in shipped_sage)
+ assert len(native_points) == len(records)
+
+ def entries(directory: Path) -> dict:
+ return {
+ ",".join(entry.platform.values()): entry
+ for entry in load_data(directory)["denoise.json"].coefficients
+ if entry.estimator == KREA2_DENOISE_SPEC.id
+ }
+
+ fitted, shipped = entries(data_dir), entries(DATA_DIR)
+ native, shipped_native = fitted.pop("cudnn,native"), shipped.pop("cudnn,native")
+ assert not native.legacy
+ # The synthetic lines plus the shipped fit's 5%, the base rounded up to a whole MiB.
+ assert native.values == {
+ name: value
+ for dtype, slope in SLOPES.items()
+ for name, value in (
+ (f"k_denoise_{SUFFIXES[dtype]}", slope * 21 // 20),
+ (f"b_denoise_{SUFFIXES[dtype]}", 315 * MIB),
+ )
+ }
+ assert native.unmeasured_floor == shipped_native.unmeasured_floor != {}
+ assert fitted == shipped
+
+
+def _main(monkeypatch, *argv: str) -> None:
+ monkeypatch.setattr(sys, "argv", [str(SCRIPT), *argv])
+ script.main()
+
+
+def test_a_sage_run_plans_its_forwards_with_sage_in_half_precision(monkeypatch, capsys) -> None:
+ """The caption checks default to every dtype; with SageAttention, to the two it serves."""
+ _main(monkeypatch, "--attention", "sage", "--mode", "captions", "--dry-run")
+
+ rows = [line.split()[:3] for line in capsys.readouterr().out.splitlines()[1:-1]]
+ assert rows == [["caption", "sage", dtype] for dtype in script.SAGE_DTYPES for _ in range(4)]
+
+
+ ("argv", "environ", "missing", "message"),
+ [
+ (["--dtypes", "bfloat16,float32", "--dry-run"], {}, None, "--attention sage measures half precision only"),
+ (["--extra-blocks", "4", "--dry-run"], {}, None, "--attention sage takes no --extra-blocks"),
+ (["--out", "{out}"], {}, "sageattention", "--attention sage needs sageattention, which"),
+ # The node's own switch, under which it enters no SageAttention scope.
+ (["--out", "{out}"], {KREA2_SDPA_BACKEND_ENV_VAR: "cudnn"}, None, "runs no SageAttention under"),
+ ],
+ ids=["float32", "extra-blocks", "no-sageattention", "sdpa-override"],
+)
+def test_a_sage_run_refuses_what_would_not_measure_the_nodes_sageattention(
+ argv, environ, missing, message, monkeypatch, capsys, tmp_path
+) -> None:
+ out = tmp_path / "sage.jsonl"
+ for name, value in environ.items():
+ monkeypatch.setenv(name, value)
+ monkeypatch.setattr(script, "find_spec", lambda name: None if name == missing else object())
+
+ with pytest.raises(SystemExit) as refused:
+ _main(monkeypatch, "--attention", "sage", *(arg.format(out=out) for arg in argv))
+
+ assert refused.value.code == 2
+ assert message in capsys.readouterr().err
+ assert not out.exists()
+
+
+def _unreachable_sage_kernel(
+ q, k, v, tensor_layout="HND", is_causal=False, qk_quant_gran="per_thread", sm_scale=None, pv_accum_dtype="fp32",
+ smooth_k=True, **kwargs,
+): # fmt: skip
+ raise AssertionError("a CPU float32 call reached the SageAttention kernel")
+
+
+def sage_installed(monkeypatch) -> None:
+ """SageAttention's wrapper installed as on an sm_89 GPU with CUDA 13, its kernel a double no CPU call reaches. The
+ wrapper is unbound again after the test."""
+ monkeypatch.setattr(
+ torch.nn.functional, "scaled_dot_product_attention", torch.nn.functional.scaled_dot_product_attention
+ )
+ with monkeypatch.context() as cuda:
+ cuda.setattr(torch.version, "hip", None)
+ cuda.setattr(torch.version, "cuda", "13.0")
+ cuda.setattr(torch.cuda, "is_available", lambda: True)
+ cuda.setattr(torch.cuda, "device_count", lambda: 1)
+ cuda.setattr(torch.cuda, "get_device_capability", lambda index=None: (8, 9))
+ module = SimpleNamespace(sageattn_qk_int8_pv_fp8_cuda=_unreachable_sage_kernel)
+ cuda.setattr(sage_attention, "_import_sageattention", lambda: ("2.2.0", module))
+ assert sage_attention.install_sage_attention()
+
+
+ "point",
+ [
+ Point("fit", 64, 7, "float32", attention="sage"),
+ Point("fit", 64, 7, "float32", references=2, reference_px=32, attention="sage"),
+ Point("kv", 64, 7, "float32", references=2, reference_px=32, attention="sage"),
+ ],
+ ids=["plain", "joint-references", "kv-cache"],
+)
+def test_steps_sageattention_did_not_serve_void_the_point(sage_installed, point) -> None:
+ """Every call of these steps falls back to PyTorch SDPA (float32 on the CPU is no call SageAttention takes), so
+ they measured no SageAttention denoise: the line the measuring process prints is invalid, with each step's counts.
+ A step's scope counts its two blocks and the text fusion's two calls; the K/V-cache precompute runs before it, as
+ the node runs it before entering SageAttention's scope."""
+ model = _tiny_transformer()
+ cache = script.install_processors(model, point)
+ recorder = script.SageRecorder()
+ operation = script.forward(point, model, cache, torch.device("cpu"), recorder.scope)
+
+ with torch.inference_mode():
+ operation()
+ operation()
+ line = _measured_line(point, recorder=recorder)
+
+ assert line["status"] == "invalid" and fresh_points.file_record(line) is None
+ assert line["reasons"] == ["sage fell back: dtype=8", "sage served fewer than 2 block attentions in 2 of 2 steps"]
+ assert line["raw"]["sage_usage"] == [{"served": 0, "fell_back": {"dtype": 4}, "memory_short": False}] * 2
+
+
+ ("steps", "reasons"),
+ [
+ ([(2, {"short": 3}), (2, {"short": 3})], []),
+ # A caption long enough for SageAttention: the text refiner's calls are served too.
+ ([(3, {"short": 1}), (3, {"short": 1})], []),
+ # Its out-of-memory fallback keeps the rest of the scope on SDPA.
+ (
+ [(2, {"short": 3}), (1, {"memory": 1, "short": 3})],
+ ["sage fell back: memory=1", "sage served fewer than 2 block attentions in 1 of 2 steps"],
+ ),
+ # An image too small for SageAttention: the blocks' calls are short as well.
+ ([(0, {"short": 5}), (0, {"short": 5})], ["sage served fewer than 2 block attentions in 2 of 2 steps"]),
+ # One step's long caption does not make up for another step's blocks.
+ ([(3, {"short": 1}), (1, {"short": 3})], ["sage served fewer than 2 block attentions in 1 of 2 steps"]),
+ # A step run outside the scope leaves nothing to prove.
+ ([], ["sage scoped no transformer step"]),
+ ],
+ ids=["served", "long-caption", "memory", "short-blocks", "one-step-short", "no-step"],
+)
+def test_a_sage_point_needs_every_blocks_attention_on_sage_and_only_short_calls_on_sdpa(steps, reasons) -> None:
+ """A proven point is a point, out of the fit; any other is invalid with the reasons. Either way the line carries
+ each step's counts through the JSON round trip."""
+ recorder = script.SageRecorder()
+ recorder.usages += [SageAttentionUsage(served, Counter(fell_back)) for served, fell_back in steps]
+
+ line = _measured_line(Point("fit", 1024, 512, "bfloat16", attention="sage"), recorder=recorder)
+
+ assert line["status"] == ("invalid" if reasons else "point")
+ assert line.get("reasons", []) == reasons
+ assert line.get("in_fit", False) is False
+ assert line["raw"]["sage_usage"] == [
+ {"served": served, "fell_back": fell_back, "memory_short": False} for served, fell_back in steps
+ ]