Skip to content

MiniMax-H3 / H3-Image: reference defaults for sizing, edit pre-scaling, posterior, still-latent decode, schedule and steps - #89

Merged
danielhanchen merged 9 commits into
masterfrom
h3-reference-defaults
Nov 15, 2026
Merged

danielhanchen merged 9 commits into
masterfrom
h3-reference-defaults

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Moves the remaining MiniMax-H3-Image and MiniMax-H3 video defaults onto what the reference implementation does: how edit references and keyframes are sized and resized, the edit template's 4 MP pre-scaling and output size, the H3-Image posterior sample, how a single video latent is decoded, the default schedule, step count and size, the timestep rounding, and the built-in server recipes. Each change was checked on CPU against the reference implementation's own functions (bit for bit where the arithmetic allows it); the checks stay local, per CONTRIBUTING.md.

Changes

Reference pictures

  • New sd::resize_lanczos_8bit (threaded over rows, one 8-bit plane at a time, vectorized vertical pass): Pillow's LANCZOS on 8-bit values (the input is scaled to 0..255 and truncated, resized in Pillow's fixed point with a horizontal then a vertical pass, each rounded to 8 bits, and read back as value / 255). The reference resizes every picture this way. New sd::fit_short_edge_size: the aspect-preserving size whose short edge lies in a range, both sides rounded (halves to even) to a multiple.
  • H3-Image VAE copy. The short edge is scaled into 1024-2048 and both sides go on the 32 px grid. Before, a picture inside the range kept its pixels and was then cropped at the top left to whole 16 px VAE cells, and its latent to whole 2x2 patches; a 1500x1100 reference lost 28 px on the right and 12 px at the bottom. It is now resized to 1504x1088 and nothing is cropped.
  • H3-Image text encoder copy. Resized to a 1024 short edge on the 32 px grid. Before, a picture whose short edge was already 1024 skipped the resize even when its long side was off the grid, and the Qwen preprocessing then snapped it with a bilinear resize.
  • A picture already at its target size is used as it is, without a copy; any other goes through the 8-bit Lanczos instead of the float one.
  • H3 video references. Reference pictures and reference video frames now use the 8-bit Lanczos instead of nearest, and their target sizes round halves to even (they rounded halves away from zero).

Keyframes and the edit picture

  • New sd::resize_area (torch's area filter: the float sum of each input box, row by row, divided by the box height and then its width), sd::scale_total_pixels_to_multiple (and its size rule) and sd::center_crop_window.
  • H3 FL2VA / I2VA keyframes. Without --image-preprocess rules, the first frame is stretched to the canvas and the last frame cover-cropped to the canvas aspect, both with the 8-bit Lanczos, as the reference does. Before, both went through the generic preprocessing (centre crop and a nearest resize). The Lanczos reads the crop window in place, so no cropped copy is made. Explicit rules still replace this geometry.
  • H3-Image edit picture. <Picture 1> is scaled to 4 MP with the area filter, then covered and centre-cropped to the nearest smaller multiple of 32 on each side, exactly as the reference edit template does before its conditioning node. A 1360x768 picture becomes 2720x1536 and a 1024x1024 one 2048x2048. The cover pass computes only the cropped window.

VAE

  • H3-Image posterior. The edit reference latent is the seeded posterior sample (seed 42), as before, but kept in float32: the float16 rounding of the sample is dropped. The reference keeps the float32 sample. The H3 video VAE keeps using the posterior mean, which is what the reference video VAE returns.
  • Single video latent. A lone latent through the video VAE is now decoded as a whole chunk of 5 copies, keeping the first real frame after the 3 pre-padding frames, as the reference does. Before, it was decoded alone and kept its last frame. Video generation never takes this path; a one-latent decode does.

H3-Image sampling

  • Model sigmas. t_to_sigma now follows the reference model sampling: timestep t + 1 of 1000 read linearly off the ascending PDD grid, in float32 with torch's two-sided fused lerp. The simple scheduler therefore reproduces the reference's simple sigmas bit for bit for every step count.
  • Default scheduler. simple instead of discrete, with Euler, as in the reference templates. At 6 steps it lands next to the PDD grid (within 9e-4); the PDD heads are picked by the nearest grid point, as in the reference. --scheduler discrete (and --sigmas minimax-h3-image) still samples the exact grid with master's code.
  • Timestep. The image transformer takes t = 1 - timestep / 1000 in double and rounds it once, as the reference does. The float path differed by one ulp on three of the six default steps.
  • The AdaLN curve interpolation was already the reference's (linear between adaln_t_table rows, same index clamp); it is unchanged.

Defaults when nothing is requested

  • ModelSamplingPolicy::default_sample_steps (20; 6 for MiniMax-H3-Image) applies when sample_steps is <= 0, and sd_get_default_sample_steps() reports it. sd-cli now leaves --steps unset by default, so H3-Image runs 6 steps and H3 video 20, as in the reference templates; every other model still runs 20. sd-server keeps advertising 20, and its recipes carry the per-model counts.
  • With neither -W nor -H, sd-cli passes -1 and the library picks the model's size: 512 x 512 as before for every model except MiniMax-H3-Image, which renders 2048 x 2048 for text-to-image and, for an edit, the 4 MP size of picture 1 (2720x1536 for a 1360x768 picture), as the reference templates do.

Server recipes

  • minimax-h3-image: Euler on simple, 6 steps, 2048 x 2048 (the custom sigma list is dropped). The reference templates render a 4 MP square, and the model is tuned for that area, so this recipe keeps 2048 x 2048 as PiD does.
  • minimax-h3-fl2va, minimax-h3-ref2va: res_multistep on simple, 20 steps, 124 frames (5 s at 24 fps), 1344 x 768. They had Euler, no step count and 56 frames, while the library default was already res_multistep on simple.
  • defaults.md and the two model guides are updated to match.

Defaults compared with the reference templates

setting before now reference
H3-Image scheduler discrete (exact PDD grid) simple simple
H3-Image sampler / steps / CFG Euler / 6 (recipe) / 1 unchanged Euler / 6 / 1
H3-Image recipe size 1024 x 1024 2048 x 2048 2048 x 2048 (4 MP square)
H3-Image VAE reference copy kept in 1024-2048, top-left crop to /16, latent to even short edge into 1024-2048, both sides /32, 8-bit Lanczos, no crop same as now
H3-Image encoder reference copy bounded to 1024, float Lanczos, bilinear snap to /32 1024 short edge, both sides /32, 8-bit Lanczos same as now
H3-Image posterior seed 42 sample rounded to float16 seed 42 sample, float32 seed 42 sample, float32
H3 video posterior mean unchanged mean
H3 video single-latent decode decoded alone, last frame 5 copies, first real frame 5 copies, first real frame
H3 video reference resize nearest, halves away from zero 8-bit Lanczos, halves to even 8-bit Lanczos, halves to even
H3 keyframes both centre-cropped, nearest first stretched, last cover-cropped, 8-bit Lanczos same as now
H3-Image edit picture as given 4 MP area scale, cover-crop to /32 same as now
steps without --steps (sd-cli) 20 H3-Image 6, H3 video 20 6 / 20
H3-Image size without -W / -H (sd-cli) 512 x 512 2048 x 2048, edit: picture 1's 4 MP size same as now
H3 video recipe sampler / scheduler / steps / frames Euler / none / none / 56 res_multistep / simple / 20 / 124 res_multistep / simple / 20 / 124
H3 video shift / audio shift / CFG / canvas 12 / 3 / 1 / 1344 x 768 unchanged 12 / 3 / 1 / 1344 x 768

Tests

Verified with a standalone C++ harness linked against a CPU build of this branch, compared with the reference implementation's own Python functions (run outside this repository, on CPU). Per CONTRIBUTING.md the harness is not part of the PR.

  • Reference sizing and the 8-bit Lanczos (sd::fit_short_edge_size + sd::resize_lanczos_8bit against the reference's _size_short_edge and its Pillow-based lanczos, Pillow 10.4): 25 cases, all bit-identical in size and pixels. They cover random pictures at 1500x1100, 800x600, 3000x2000, 1024x1536, 1030x1030, 2048x2048, 4000x500, 333x777, 1504x1088 and 2049x1500 through both the VAE rule (1024-2048) and the encoder rule (1024), plus the model's examples/reference1.png fitted and resized to 1344x768, and the 8-bit round trip at the same size. Master's sizing on the same cases: wrong sizes on 3 of them (1488x1088 instead of 1504x1088, 2992x2000 instead of 3008x1984, 2048x1488 instead of 2048x1504), a top-left crop instead of a resize at 1030x1030 (max abs 1.0), and pixel differences up to 0.78 wherever it resized (float Lanczos). Master's nearest resize of a video reference to 1344x768 differs by up to 0.75.
  • Edit pre-scaling (sd::scale_total_pixels_to_multiple and its size rule against the reference's own scale_total_pixels + scale_to_multiple_cover with the area filter): 11 cases bit-identical in size and pixels, the size rule matching every time. They cover 1360x768, 1024x1024, 800x600, 3000x2000, 2720x1536, 2048x2048, 4000x500, 333x777, 1920x1080, 5000x3333 and examples/reference1.png.
  • Keyframes (stretched first frame and cover-cropped last frame against the reference's _resize with disabled and center): 6 cases bit-identical (1920x1080, 1024x1024, 1344x768 and 1080x1920 to 1344x768; 800x600 to 768x1344; 857x481 to 960x544).
  • Default steps: the model definitions give MiniMax-H3 20, MiniMax-H3-Image 6, and 20 for the others checked (P-H3-Image, Flux).
  • H3-Image sigmas (MiniMaxH3ImageDenoiser with the simple scheduler against the reference's simple_scheduler on MiniMaxH3ImageModelSampling with the checkpoint's pdd_sigmas): bit-identical in float32 for every n from 1 to 50. At 6 steps both give 1, 0.96765357, 0.88770843, 0.75, 0.53364283, 0.23261039, 0. Master's default (discrete) differs from that by up to 8.7e-4. --scheduler discrete at 6 steps stays within 6e-8 of the grid, as before.
  • Timestep rounding (both formulas reproduced in numpy float32 / float64, not through the transformer): on the 6 default sigmas the double path gives the reference's t on all of them; master's float path is one ulp off on 3.
  • H3-Image posterior (release VAE, float32 weights, a 384x256 picture over two reference tiles, CPU): sd.cpp's posterior step on its own encoder moments matches the reference's addcmul with the seed 42 noise to 2.4e-7. The old float16 rounding moved it by up to 1.0e-3. End to end (encoder + posterior + normalization) the latents agree to 1.0% of the latent range (max abs 0.025, mean abs 2.3e-4), and the encoder moments alone differ by the same amount (max abs 0.026, mean abs 5.5e-4): that is the encoder's own conv arithmetic, which this PR does not touch.
  • Single-latent video decode (minimax_h3_video_vae_fp16.safetensors, a seeded 8x12 latent, CPU): sd.cpp now matches the reference's decode (5 copies, first real frame) to 2.2e-3 max abs (1.1e-4 mean), which is the float16-weight arithmetic. The old decode-alone path differs from the reference by up to 0.98 (mean 0.081).
  • Server recipes: sd-server started on this branch lists the three MiniMax-H3 recipes with the new defaults and reports no catalog errors.
  • sd-cli and sd-server build cleanly on CPU. Only the changed lines were checked with clang-format (--lines), which reports no changes.

GPU renders against the reference (Colab G4, RTX PRO 6000 Blackwell)

Same seed (42), one VM, three arms:

  • REF: the reference implementation running its own templates (prompt enhancer off) with its int8 diffusion model, int8 text encoder and fp16 VAE.
  • BASE: the master-982-0518b34-u2217753 prebuilt (fork master).
  • HEAD: this branch, built on the VM: e23683a in the first run, 4dd7bb6 in the second (a fresh VM; the REF renders of the first run are reused).

Both sd.cpp arms use the Q8_0 GGUF, the Q4_K_M text encoder and the release VAE. Text-to-image uses the template size, 2048 x 2048. The edit uses the model's examples/reference1.png with prompt.edit.txt. Every arm rendered pixel-identical images on its two repeats.

pair text-to-image LPIPS / PSNR edit LPIPS / PSNR
BASE vs REF 0.1011 / 21.76 dB 0.1905 / 21.91 dB
HEAD vs REF, size given 0.0994 / 21.85 dB 0.0147 / 32.77 dB
HEAD vs REF, no -W / -H (4dd7bb6) 0.0994 / 21.85 dB 0.0147 / 32.77 dB
HEAD vs BASE 0.0045 / 39.29 dB 0.1892 / 22.21 dB
  • Edit: it moves from 0.19 to 0.015 LPIPS of the reference render.
  • Text-to-image: the remaining 0.10 is the same for both arms. It is most likely the different weight quantization (Q8_0 and a Q4_K_M encoder against int8), not the recipe.
  • Defaults: HEAD without --steps / --scheduler ran 6 steps on the simple schedule.
  • Auto edit size: at e23683a, HEAD without -W / -H rendered the edit at 1024 x 1024 instead of the reference's 2048 x 2048, because sd-cli filled the size from the picture before the library could apply the template rule. At 4dd7bb6 the same command renders 2048 x 2048, pixel-identical to the run with the size given, so it lands on the same 0.0147 LPIPS.
  • Unchanged parts: 4dd7bb6 and e23683a render pixel-identical text-to-image images, and an identical edit when the size is given. BASE and the REF scores reproduce exactly on the second VM.
render BASE wall (2 runs) HEAD wall (2 runs) peak VRAM BASE / HEAD host RSS BASE / HEAD
text-to-image 2048 x 2048 9.57 / 8.96 s 9.02 / 9.00 s 42.6 / 42.6 GB 5.3 / 5.1 GB
edit, output 2048 x 2048 13.13 / 13.08 s 17.85 / 17.87 s 44.2 / 45.0 GB 5.9 / 6.2 GB

Wall time is the whole sd-cli process, model loading included. The second run (4dd7bb6) measured BASE at 9.28 / 8.98 s and 12.99 / 13.07 s, and HEAD at 8.93-8.96 s and 17.74-17.87 s (with or without -W / -H), with the same VRAM and host memory.

  • Text-to-image costs the same.
  • The edit is 4.8 s slower (1.75 against 1.13 s per step) and uses 0.8 GB more VRAM. Like the reference, HEAD conditions on the 4 MP pre-scaled picture (2048 x 2048 here), where BASE conditioned on the 1024 x 1024 original. This is the cost of the template's geometry, and it is what closes the edit gap above.

MiniMax-H3 FL2VA render (same G4, 4dd7bb6)

A short FL2VA run checks the keyframe change end to end: minimax_h3_fl2va_pruned-UD-Q3_K_XL.gguf, 512 x 288, 22 frames, 4 steps, seed 42. The first keyframe is the square reference1.png and the last a 4:3 picture, so stretching and cover-cropping give very different frames. The table compares the decoded first and last frame against both geometries (Pillow Lanczos):

build first frame vs stretch / cover crop last frame vs cover crop / stretch wall peak VRAM
BASE 13.89 / 23.90 dB 25.06 / 13.11 dB 6.38 s 35.1 GB
HEAD 24.46 / 13.64 dB 25.24 / 13.16 dB 6.38 s 35.1 GB

HEAD's first frame now follows the stretched keyframe, as in the reference workflow, where BASE cropped it. The last frame is cover-cropped by both builds. Both runs logged MiniMax-H3 FL2VA, wrote all 22 frames, and sampled with res_multistep on the simple schedule. Sampling took 2.33 s against 2.30 s, and decode 0.72 s for both.

Performance

CPU only, on a shared host (load average about 700 on 192 cores), so wall times are noisy; the tables use the minimum process CPU time over 7 repetitions, with each arm run twice in ABBA order (the pair is the A/A spread). Master is fork master 2217753 for the decode and master's code path for the resizes. Memory is the peak RSS growth over the input picture.

Reference picture sizing and resizing (single thread):

case master CPU ms (A/A) this PR CPU ms (A/A) RSS growth master / PR
H3-Image VAE copy 800x600 (both resize) 201 / 210 42 / 37 32 / 33 MiB
VAE copy 4000x3000 (both resize) 700 / 824 452 / 332 130 / 137 MiB
VAE copy 2048x2048 (on the grid) 35 / 34 (copy) 0 / 0 (no copy) 97 / 0 MiB
VAE copy 1500x1100 (master crops, the PR resizes to 1504x1088) 10 / 10 66 / 83 93 / 40 MiB
VAE copy 3000x2000 (master crops, the PR resizes to 3008x1984) 173 / 175 224 / 294 274 / 142 MiB
encoder copy 1500x1100 to 1408x1024 225 / 215 50 / 65 34 / 36 MiB
encoder copy 3000x2000 to 1536x1024 203 / 246 145 / 132 36 / 39 MiB
encoder copy 1024x1024 (on the grid) 1.3 / 1.4 (copy) 0 / 0 (no copy) 25 / 0 MiB
H3 video reference 1920x1080 to 1344x768 (master: nearest) 237 / 216 53 / 54 22 / 25 MiB
  • With 32 threads, the 3000x2000 VAE copy takes 73 ms against master's 158 ms wall. The 1500x1100 copy takes 21 ms against 6 ms.
  • The only cases that cost more are the ones where master skipped the resize and cropped instead. The reference resizes them, so the resize is the price of matching it, and it is small next to the VAE encode that follows.
  • Memory stays within about 7 MiB of master where both resize, and is lower where master copied or cropped.

Keyframes and the edit pre-scaling (CPU ms, min over 7 runs, two runs per arm; master's keyframe arm is its crop-resize with nearest):

case master, 1 thread this PR, 1 thread this PR, 32 threads (wall) RSS growth master / PR
last keyframe 1920x1080 to 1344x768 149 / 146 37 / 36 4.6 ms 59 / 24-26 MiB
last keyframe 1080x1920 to 1344x768 464 / 480 18 / 19 3.5 ms 96 / 24 MiB
first keyframe 1920x1080 to 1344x768 155 / 158 39 / 39 4.6 ms 59 / 24 MiB
edit pre-scale 1360x768 to 2720x1536 none 158 / 181 53 ms 0 / 143 MiB
edit pre-scale 3000x2000 to 2496x1664 none 174 / 177 51 ms 0 / 142 MiB
edit pre-scale 1024x1024 to 2048x2048 none 60 / 58 25 ms 0 / 97 MiB

The pre-scale is new work that master did not do, about 50 ms with 32 threads. Its memory is the 4 MP picture the reference also builds, plus one intermediate at the scaled size. Fusing the cover resize with the crop took it from 112 ms and 238 MiB to 52 ms and 143 MiB. The larger effect is downstream: like the reference template, an edit now runs at the picture's 4 MP size when no size is given. The new step default makes H3-Image runs without --steps 3.3x shorter (6 steps instead of 20).

Single-latent video VAE decode (16x16 latents, 32 threads, minimax_h3_video_vae_fp16):

build wall ms (min, two runs) peak RSS
master (decode alone) 2010 / 2058 4661 / 4666 MiB
this PR (5-latent chunk) 11067 / 11676 4958 / 4948 MiB

The chunk decode is about 5.4x slower and uses about 290 MiB more, because the reference decodes 5 copies through a decoder that attends over the whole chunk, and no shortcut gives the same frame. Video generation never takes this path: it only runs when a single latent is decoded with the video VAE.

Everything else costs nothing at run time. The posterior change removes a loop. The H3-Image sigma and timestep changes are a few scalar operations per step. res_multistep runs one model evaluation per step, like Euler.

The new recipe defaults are heavier on purpose because they follow the reference templates: 2048 x 2048 instead of 1024 x 1024 for H3-Image, and 124 frames instead of 56 for H3 video. Requests can still pick a smaller size.

Not covered

  • sd-server still uses 20 steps for a MiniMax-H3-Image request that sends none when no recipe applies (the recipe carries 6), and its OpenAI-compatible image route still defaults to 512 x 512.
  • GPU renders cover one text-to-image, one edit and one short FL2VA video on one G4 card. The FL2VA run checks the keyframe geometry and that the pipeline runs; no reference video render was compared.
  • The shared CPU RNG (--rng cpu, also the posterior noise) matches torch.randn bit for bit on 83% of values and within 3 ulp on the rest; torch's vectorized Box-Muller uses its own log / sin / cos. This is unchanged here.
  • VAE precision. On GPU the reference runs the VAE in float16 (its VAE dtype list is float16, then float32), so its activations, tile blends and moments are all float16 values. sd.cpp's VAE graphs keep activations in float32. Matching float16 throughout would need a cast after every op, which adds kernels and slows the decode, and it still would not reproduce the reference's kernel accumulation order. Rounding only the final moments to float16 would not help: sd.cpp's moments already differ from the float32 reference by up to 0.026 (mean 5.5e-4), while float16 storage moves a value of 1 by at most 4.9e-4. So the VAE numerics are left in float32, at no cost.
  • P-H3-Image is unchanged (its references still use the float Lanczos).

… does

Add sd::resize_lanczos_8bit (Pillow's LANCZOS on 8-bit values, truncated in and
read back as value / 255) and sd::fit_short_edge_size.

MiniMax-H3-Image: the VAE copy of a reference now has its short edge scaled into
1024-2048 with both sides on the 32 px grid (no top-left crop to 16 px cells, no
crop of the latent to whole patches), and the text encoder copy is resized to a
1024 short edge on the same grid. A picture already at its size is used as it
is; any other goes through the 8-bit Lanczos instead of the float one.

MiniMax-H3 video: reference pictures and reference video frames use the 8-bit
Lanczos instead of nearest, and their sizes round halves to even.
…es a still latent as a chunk

The image VAEs condition on the seeded posterior sample (seed 42); the reference
keeps it in float32, so drop the float16 rounding of the H3-Image sample.

A single latent through the video VAE is now decoded as a whole 5-latent chunk
of copies and keeps the first real frame (after the 3 pre-padding frames), as
the reference does, instead of being decoded alone.
…ce workflows

The H3-Image model sigmas now follow the reference: timestep t + 1 of 1000 read
linearly off the ascending PDD grid in float32 with the two-sided fused lerp, so
the simple scheduler reproduces the reference's simple sigmas bit for bit. The
default scheduler becomes simple (Euler, 6 steps), as in the reference
templates; --scheduler discrete keeps the exact PDD grid.

The image transformer takes t = 1 - timestep / 1000 in double and rounds it
once, as the reference does (three of the six default steps differed by one
ulp).
minimax-h3-image: Euler on the simple schedule, 6 steps, 2048 x 2048 (the model
is tuned for that area). minimax-h3-fl2va / minimax-h3-ref2va: res_multistep on
the simple schedule, 20 steps, 124 frames (5 s at 24 fps).
…t plane

resize_lanczos_8bit now quantizes each input row into a per-thread buffer,
keeps a single 8-bit plane between the two passes, runs both passes over rows
with parallel_for and accumulates the vertical pass tap-major along contiguous
rows, so it vectorizes. Output is unchanged bit for bit.

The H3-Image sizing no longer copies a reference that is already at its target
size (master copied it on every call).
…ference geometry

Add sd::resize_area (torch's area filter), sd::scale_total_pixels_to_multiple
(and its size rule) and sd::center_crop_to_aspect.

MiniMax-H3 FL2VA / I2VA: without --image-preprocess rules the first frame is
stretched to the canvas and the last frame cover-cropped to its aspect, both
with the 8-bit Lanczos, as the reference does. Before, both went through the
generic center crop and a nearest resize.

MiniMax-H3-Image edits: picture 1 is scaled to 4 MP with the area filter and
then covered and centre-cropped to multiples of 32 before the model sees it, as
the reference edit template does.
…when none is given

ModelSamplingPolicy gains default_sample_steps (20; 6 for MiniMax-H3-Image), used
when sample_steps is <= 0, and sd_get_default_sample_steps() reports it. sd-cli
leaves --steps unset by default (-1) so the model default applies; sd-server
keeps advertising 20, its recipes carry the per-model counts.

A request with neither width nor height set (sd-cli without -W / -H) now takes
the model's default size: 512 x 512 as before for every model except
MiniMax-H3-Image, which renders 2048 x 2048 for text-to-image and, for an edit,
the 4 MP multiple-of-32 size of picture 1, as the reference templates do.
The 8-bit Lanczos takes an optional crop window and reads it in place, so the
cover-cropped last keyframe needs no cropped copy (center_crop_window replaces
center_crop_to_aspect). The edit picture's cover resize computes only the
centred window, so neither the full cover image nor the two slice copies are
made. Output is unchanged bit for bit.
sd-cli fills an unset size from the first loaded picture, so a MiniMax-H3-Image
edit without -W / -H rendered at the picture's own size instead of the
template's 4 MP size. When the size came only from the first reference, sd-cli
now passes -1 and the library picks it: that reference's size for every other
model, as before, and the 4 MP multiple-of-32 size for MiniMax-H3-Image.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T05:37:25.893862Z 4dd7bb6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 4dd7bb6b25

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 27b9ddc into master Nov 15, 2026
danielhanchen added a commit to unslothai/unsloth that referenced this pull request Nov 15, 2026
#17824)

## Summary

Moves Studio's pinned stable-diffusion.cpp prebuilt from
`master-982-0518b34-u2217753` to `master-982-0518b34-u27b9ddc`. The only
change between the two builds is unslothai/stable-diffusion.cpp#89
(MiniMax-H3 / H3-Image reference defaults for sizing, edit pre-scaling,
the condition posterior, still-latent decode, the schedule and the step
count), so GGUF MiniMax-H3 renders on the native engine now follow the
same recipe the diffusers path uses.

Existing installs pick the new build up on their next start: Studio
reinstalls the bundle when the pin moves
(`UNSLOTH_SD_CPP_AUTO_UPGRADE=0` keeps the old one).

## Checks

- The new release ships the same 14 assets as the old one (names equal
after the tag), so every platform the old pin covered still resolves:
Linux CUDA 12 / 13, Vulkan, CPU, aarch64, Windows CPU x64 / arm64, CUDA
12 / 13, Vulkan, and macOS arm64 / x86_64.
- The compare between the two fork commits is exactly one commit ahead
(`2217753...27b9ddc`).
- Tests that name the asset files and the pin were updated:
`test_diffusion_more_families.py`, `test_sd_cpp_args.py`,
`test_sd_cpp_cuda_cpu_torch.py`, `test_sd_cpp_vulkan_cpu_torch.py` (337
passed; 1 Vulkan fallback test errors identically on the base here, on a
host CUDA probe).

## GPU check (A100-40GB, release CUDA 13 bundles of both tags)

Same jobs, seeds and Studio sampler flags on both binaries; the old
binary rerun is byte-identical, so every delta below comes from the
build.

| job | sampling s, old / new | peak GiB, old / new | result |
|---|---|---|---|
| MiniMax-H3-Image GGUF text-to-image, 1024x1024 | 7.10 / 7.27 | 29.84 /
29.82 | LPIPS to a bf16 reference 0.1706 -> 0.1640 |
| MiniMax-H3-Image GGUF edit, one 1470x815 picture | 19.89 / 27.49 |
31.33 / 31.52 | picture now scaled to 2720x1504 (about 4 MP, as the
reference workflow does); LPIPS to reference 0.2018 -> 0.1996 |
| FLUX.2 klein 4B GGUF text-to-image | 2.73 / 2.60 | 12.08 / 12.08 |
byte-identical PNG |

The edit is slower on a small input picture by design: it carries about
four times the reference tokens. Not run: L4 / T4 / Blackwell cards, the
CUDA 12, CPU, Vulkan, ROCm, Metal and Windows bundles, and multi-picture
edits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant