Archived
New models: - LTX-2.5 (base and distilled): video with a stereo soundtrack from text or from text and a first frame, on one card, with its duration head, tiled VAE decoding, the diffusion decoder and the x2 latent upsampler - Krea 2 Raw and Turbo, and FLUX.3 [klein] and its base: text to image, and for FLUX.3 edits from up to ten reference pictures, on one card - GLM-5.3-Flash from AMD's Quark MXFP4 export, on eight cards (John McDonough, Nunze) - Gemma 3 / TranslateGemma 27B with an optional DFlash2 drafter (mici81) Engine: - --kv-cache-dtype fp8_v4 and k6_v4 for Gemma 3 and Qwen3.8-Flash-Next (mici81) - the rotated int8 trunk (i8a8h) for Qwen3.8-27B (eddie168168) - eight-rank all-reduce bands, weighted shards and pieces (Nunze); --host-headroom-mib (sfjes) - the dashboard shows the single-stream decode floor and its most recent window (Memoria) Fixes: prefix-cache reservations kept until their save lands (baKon), tool calls in Responses namespaces (#119), system messages merged when a template refuses several (#137), a prefill continued with no open step (#127), calibration of a Gram accumulation (#122), JSON Schema patterns read unanchored (davetha), GLM-style tool calls, the KV floor counting every sequence's state. Plugin ABI 24.
28 lines
1.2 KiB
C++
28 lines
1.2 KiB
C++
/* imaging.h -- image arithmetic done the way PIL does it, so a picture reaches the model exactly
|
|
* as the reference pipeline's would.
|
|
*
|
|
* Resize: PIL's Image.resize with LANCZOS, bit for bit. Per-axis coefficients are computed in
|
|
* double (support 3x the downscale, normalised to sum one) and converted to 22-bit fixed point;
|
|
* a horizontal then a vertical pass run over 8-bit values, rounding and clipping each output.
|
|
* RGBA is premultiplied by alpha first and divided back after, as PIL does. Diffusers'
|
|
* VaeImageProcessor resizes this way.
|
|
*
|
|
* Composite: Image.paste(picture, mask=alpha) onto white, each channel
|
|
* (c * a + 255 * (255 - a)) / 255 with PIL's rounding. The reference flattens a transparent
|
|
* picture this way for an RGB text encoder. */
|
|
#pragma once
|
|
#include "mm/media.h"
|
|
|
|
namespace rad {
|
|
namespace mm {
|
|
|
|
/* `src` resized to w x h. */
|
|
void resize_lanczos_rgba(const FrameRGBA& src, int32_t w, int32_t h, FrameRGBA* out);
|
|
/* The same with PIL's BILINEAR filter (a triangle of support 1, widened when shrinking). */
|
|
void resize_bilinear_rgba(const FrameRGBA& src, int32_t w, int32_t h, FrameRGBA* out);
|
|
/* `src` over an opaque white ground. */
|
|
void composite_white(const FrameRGBA& src, Frame* out);
|
|
|
|
} /* namespace mm */
|
|
} /* namespace rad */
|