MOSS-Image-SFT β Karume
What is this
A text-to-image distribution: MOSS-Image-SFT (a 5B single-stream diffusion transformer
with a Qwen3.5-9B text encoder and the FLUX.2 VAE), converted into the WebGPU inference
runtime Karume's container format (a .krm part sequence whose first part carries
the graph and model descriptors). Runs in the browser, in Node and in Deno.
- Everything runs in Karume: the chat template and the tokenizer on the host, then the text encoder, the transformer and the VAE on the GPU, one stage at a time (each stage closes before the next one opens, so the text encoder and the transformer are never resident together).
- The negative branch of classifier-free guidance is upstream's: the transformer without block 22 (zero-based). Guidance 1 runs no negative branch.
- The VAE decodes untiled, as upstream does. The largest accepted area is set by the device's storage-binding limit (about 2.8 million pixels at 2 GiB).
- The seeded noise is Karume's own generator, not torch's: the same seed does not give upstream's image.
- Not readable by diffusers (it's a different container with an embedded graph); the reader is a pipeline that implements
moss-image/1. - Exporter used for the conversion:
karume/0.15.1. The distribution manifest iskarume.json(karume/5).
Base weights and attribution
Converted and partly quantized β the original checkpoint is not distributed here.
- Weights: OpenMOSS-Team/MOSS-Image-SFT at commit
f972bd4b4b9e3852133cc5da954d87bc32cd8fb9, licensed apache-2.0 (as of retrieval; full text β a verbatim copy is inLICENSE.md). - Authors: MOSS-Image is released by OpenMOSS (technical report).
- Text encoder (
text_encoder,tokenizer): the checkpoint's bundled Qwen3.5 text encoder, from Qwen/Qwen3.5-9B at commitc202236235762e1c871ad0ccb60c8ee5ba337b9a(the Qwen team, Alibaba Cloud), licensed apache-2.0 (as of retrieval), and its tokenizer. Only the text tower is redistributed here; its copyright notice is kept inNOTICE.md. - VAE decoder (
vae_decoder_pre/vae_decoder_attn/vae_decoder_post): the checkpoint's bundled FLUX.2 VAE with the FLUX.2 small decoder (Black Forest Labs). Only the decode path is redistributed; the VAE encoder is not included:- the decoder and
post_quant_conv: black-forest-labs/FLUX.2-small-decoder at commita3efc24f613ef42d9428af62fdbd6f5fd8856c4a, licensed apache-2.0 (as of retrieval) - the latent batch-normalization statistics (
vae/): black-forest-labs/FLUX.2-klein-4B at commite7b7dc27f91deacad38e78976d1f2b499d76a294, licensed apache-2.0 (as of retrieval) - Black Forest Labs' model cards of both origins (black-forest-labs/FLUX.2-small-decoder, black-forest-labs/FLUX.2-klein-4B) also point to the BFL Usage Policy, without a link of their own. This is informational: it is not a term of the Apache License, Version 2.0.
- the decoder and
- Changes made here (listed in full in
NOTICE.md, per Apache 2.0 Β§4(b)): the transformer's and the text encoder's weight matrices are stored as int8 (one scale per output channel); the VAE keeps the source f32 values. The transformer is split into a text-refiner graph and the joint-sequence graph (plus the same graph without block 22, which borrows its weights), the VAE decoder into three graphs around its middle attention, and the text encoder keeps its text tower only. No retraining and no fine-tuning. - This is not an official release of Black Forest Labs, and it is not endorsed by them; the Black Forest Labs and FLUX names are used only to describe where the VAE weights come from.
Models
| Model | Pipeline | Quants | Default quant |
|---|---|---|---|
sft (default) |
moss-image/1 |
f32+dit8 / f32+dit8-a8-attn8-online |
f32+dit8-a8-attn8-online |
model selects one of these; omitted, it is sft. quant defaults to that model's own default quant.
Usage
import { imageToRgba, Pipeline } from "jsr:@karume/models/moss";
await using pipeline = await Pipeline.fromPretrained({
repo: "hdae/karume-moss-image",
// Pin a commit for reproducible builds β without it you track `main`, and a future
// repo update (renamed files, new manifest format) may break your app.
// Copy the full hash from this repo's "Files and versions" tab:
// revision: "<full commit sha>",
}, {
// model: "sft", // default β available: sft
// quant: "f32+dit8-a8-attn8-online", // default β available: f32+dit8 / f32+dit8-a8-attn8-online
});
const image = await pipeline.generate({
prompt: "A red bicycle leaning against a white wall, morning light",
// width: 1024, height: 1024, // pixels, multiples of 16
// steps: 50, guidance: 3.0, shift: 5.0,
// negativePrompt: "",
// seed: 0,
});
// [3, height, width] f32 in [-1, 1] β 8-bit RGBA
const rgba = imageToRgba(image);
Weights are fetched once and cached (verified against karume.json's size / sha256).
Concurrent generate calls are queued.
Model: sft
Quants
| Quant | What it is | Download | Weights | Compute |
|---|---|---|---|---|
f32+dit8 |
int8 transformer, f32 compute β Transformer and text encoder weights stored as int8 (one scale per output channel) and computed in f32; the VAE stays f32. The reference preset. | 12.3 GiB | text_encoder = i8 / dit_text = i8 / dit = i8 / dit_skip22 = i8 / vae_decoder_pre = f32 / vae_decoder_attn = f32 / vae_decoder_post = f32 |
β |
f32+dit8-a8-attn8-online (default) |
int8 transformer, int8 activations, online attention β The reference preset's weights with per-token int8 activations in the transformer's linear layers and attention computed online (the scores are never stored). | 12.3 GiB | text_encoder = i8 / dit_text = i8 / dit = i8 / dit_skip22 = i8 / vae_decoder_pre = f32 / vae_decoder_attn = f32 / vae_decoder_post = f32 |
linearCompute = a8 / attentionCompute = a8 / attentionScoreStorage = none |
If no quant is given, it runs as f32+dit8-a8-attn8-online (this model's recommended default).
Per-file size and sha256 live in karume.json β verify against that at the fetch layer.
Dtype labels use the runtime's storage dtype vocabulary (f16 / bf16 / i8 / i4 / i2), not the fp16 spelling common elsewhere in the ecosystem.
Weights ship as Karume container files (.krm), split into numbered parts; a part is fetched and verified on its own.
Generation defaults
Upstream's own defaults, used for every field a request leaves out:
- size 1024 Γ 1024, 50 steps, guidance 3.0, shift 5.0
- negative prompt: the empty prompt (used when guidance β 1)
Model tree for hdae/karume-moss-image
Base model
OpenMOSS-Team/MOSS-Image-Base