radiance 1.8.1

- MiniMax-H3 and FastH3 no longer stop the server on a prompt longer than 16 tokens (FastH3) or
  128 tokens (MiniMax-H3)
- latent upscaling for the MiniMax-H3 containers: with LBH-123-AI's latent upscaler in the
  container, `latent_upscale` runs the first steps at a smaller size and refines the latent at the
  full size; `upscale_refine_steps` sets how many steps refine, and the video object reports both
- rad-convert --in-place extends a container whose weights the plugin has regrouped since
- plugin ABI 22: out-of-tree plugins must be rebuilt
This commit is contained in:
Deadcode committed 2026-10-18 15:41:44 +02:00
1 parent 7a7707a955
commit 816e24bd46
43 files changed
+4458 -81

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ extern "C" {
* kind of plugin reports it, and a plugin that does not report exactly this version is refused at
* load with both versions printed. A new optional export (e.g. rad_plugin_reference) is not a
* change of shape: a plugin without it gets the default. */
#define RAD_ABI_VERSION 21u
#define RAD_ABI_VERSION 22u
/* ================================================================== plugin identity */
/* One value per plugin, not flags (QUANT is 3). RAD_PLUGIN_QUANT is a quantiser plugin:
+23 -1
View File
@@ -837,9 +837,25 @@ int rad_declare_audio_generator(RadBuilder* b, const RadAudioGenDecl* d);
* the base times it was trained on (`rungs`, below): s = rungs then 0, each taken to f32, the same
* shifts applied, and the step count fixed at n_rungs + 1.
*
* Latent upscaling, for a plugin with a network that enlarges a video latent (`upscale_max` > 1):
* a request with a factor f > 1 is denoised at a smaller size first. Its video is W x H; each side
* divided by f and rounded to the nearest multiple of `size_multiple` (at least one multiple, at
* most the side) gives the small size W' x H'. The request's evaluations but its last `refine` run
* at W' x H', the last of them stepping to sigma 0 (its clean estimate) instead of the next grid
* point. Then one pass:
*
* RAD_GEN_PASS_VUPSCALE the lane's video latent from W' x H' to W x H through the plugin's
* network, told the factor (W / W' + H / H') / 2; then both latents
* re-noised to the sigmas of the first evaluation at W x H, each with a
* stream of its own seed other than the one its first step drew.
*
* The last `refine` evaluations run at W x H, and the decodes follow as for any request. Every
* pass carries the geometry its latent has at that point: a step before the VUPSCALE pass is at
* W' x H'. The schedule is the request's own, whatever size each evaluation runs at.
*
* A program declares exactly one of this, the other generators, logits or pooled vectors. */
enum { RAD_GEN_PASS_VCOND = 8, RAD_GEN_PASS_VSTEP = 9, RAD_GEN_PASS_ADECODE = 10,
RAD_GEN_PASS_VDECODE = 11 };
RAD_GEN_PASS_VDECODE = 11, RAD_GEN_PASS_VUPSCALE = 12 };
typedef struct RadVideoGenDecl {
const char* name; /* "minimax-h3" -- the served model id and messages */
@@ -880,6 +896,12 @@ typedef struct RadVideoGenDecl {
* count. 0 is the linspace schedule. */
int32_t n_rungs;
const double* rungs;
/* Latent upscaling (above): the largest factor a request may ask for, 0 when the plugin has no
* upscaler; and the evaluations at the full size a request that names none runs, at least 1
* and fewer than the default schedule's. */
double upscale_max;
int32_t upscale_refine;
} RadVideoGenDecl;
int rad_declare_video_generator(RadBuilder* b, const RadVideoGenDecl* d);
+13 -1
View File
@@ -423,6 +423,7 @@ enum {
* patches. No token ids.
* ADECODE no rows of the pass's own.
* VDECODE `dec_rows` rows of the decoder's own (rad_arch_video_positions, RAD_VPOS_DECODE).
* VUPSCALE no rows of the pass's own: the lane's video latent from `geom_from` to `geom`.
*
* Every pointer is device memory unless the name ends in _h. */
typedef struct RadVideoGenBatch {
@@ -460,6 +461,13 @@ typedef struct RadVideoGenBatch {
/* ---- ADECODE */
int64_t n_samples; /* samples a channel the pass writes to audio_out */
/* ---- VUPSCALE (rad_builder.h, "Latent upscaling"). `geom` is the geometry the video latent
* is enlarged to and `geom_from` the one it has; `geom_d` carries both (RAD_VGEOM_UP_*).
* `sched` is the first full-size step's, whose sigmas (sched[1] the video's, sched[4] the
* soundtrack's) the latents are re-noised to; `seed` is a step's. */
RadVideoGeom geom_from;
const float* upscale; /* f32 [1]: the factor the network is told */
} RadVideoGenBatch;
/* RadVideoGenBatch::geom_d. The request's latent geometry, then a VDECODE pass's chunk: the latent
@@ -471,7 +479,11 @@ enum {
RAD_VGEOM_CHUNK_FRAMES = 6, RAD_VGEOM_CHUNK_H = 7, RAD_VGEOM_CHUNK_W = 8,
RAD_VGEOM_CHUNK_FIRST = 9, RAD_VGEOM_CHUNK_LAST = 10,
RAD_VGEOM_PATCH_FRAMES = 11, RAD_VGEOM_PATCH_H = 12, RAD_VGEOM_PATCH_W = 13,
RAD_VGEOM_N = 16
/* A VUPSCALE pass's: (frames, h, w, H, W), the latent's grid before and after, of which the
* first three are also the source volume; (frames, H, W) the target volume; then both in
* patches, (frames, h / patch, w / patch) and (frames, H / patch, W / patch). */
RAD_VGEOM_UP_SRC = 16, RAD_VGEOM_UP_DST = 21, RAD_VGEOM_UP_PSRC = 24, RAD_VGEOM_UP_PDST = 27,
RAD_VGEOM_N = 32
};
/* ================================================================== operands */