Irodori-TTS v4 Large โ Karume
This is an unofficial conversion of Aratako/Irodori-TTS-v4-Large, google/t5gemma-2-1b-1b and Aratako/Semantic-DACVAE-Japanese-32dim for Karume. It is not affiliated with or endorsed by Aratako and Google.
What is this
A Japanese text-to-speech distribution: the Irodori-TTS v4 Large rectified-flow DiT
converted into the WebGPU inference runtime Karume's container format (a .krm part
sequence whose first part carries the graph and model descriptors). Runs as-is in the
browser and in Deno.
- Nine graphs make up the chain: the shared T5Gemma 2 text encoder
backbone, thetext_projandcaption_projcondition projectors, the reference-latentspeakerencoder, thedurationpredictor, the DiT split in two โdit_context(the conditioning keys / values, once per generation) anddit(one forward per Euler step, plus one per classifier-free-guidance branch) โ and the DACVAE codec (Aratako/Semantic-DACVAE-Japanese-32dim) ascodec_decoder/codec_encoder. - Text in, waveform out.
generate()returns f32 mono samples at the codec's sample rate, ready forencodeWav. The decoder is run in tiles so that it also fits GPUs with the default 128MiB storage-buffer limit; the tiling is bit-exact against a single-shot decode. - Voice cloning is wired up both ways: a reference speaker is passed either as audio
(mono f32 โ what
decodeWavreturns), whichcodec_encoderturns into a DACVAE latent, or as such a latent directly. Reference audio must already be at this distribution's own 48000 Hz: there is no resampler, and a mismatch is refused rather than silently converted. Unlike the decoder,codec_encoderis not tiled, so a long reference can exceed the default 128MiB storage-buffer limit. - Not readable by the upstream implementation (it's a different container with an embedded graph); the reader is a pipeline that implements
irodori/1. - Exporter used for the conversion:
karume/0.23.0. The distribution manifest iskarume.json(karume/6).
Base weights and attribution
Converted into the container format โ the original checkpoint is not distributed here.
- Weights: Aratako/Irodori-TTS-v4-Large at revision
2e0c55428ce97268a507f1feeb2478f8d9148e8b, taggedlicense: gemma(as of retrieval). Upstream's model card states that the model is subject to the Gemma Terms of Use because its shared text / caption encoder is derived from google/t5gemma-2-1b-1b, and that use and redistribution must comply with those terms, including the Gemma Prohibited Use Policy, as well as the additional ethical restrictions listed on that model card. Both Gemma texts are included inLICENSE.md, and the notice upstream ships with the model is inNOTICE.md. The training / inference implementation it comes with (Aratako/Irodori-TTS) is MIT; Karume's runtime contains none of that code โ it is an independent implementation that reads these weights from its own container format. - Text encoder: the
backbonecomponent is the checkpoint's fine-tuned text encoder of google/t5gemma-2-1b-1b, redistributed here in the container format; the tokenizer asset is upstream's tokenizer of the same model, converted into Karume's tokenizer format. - Codec: Aratako/Semantic-DACVAE-Japanese-32dim, licensed MIT
(as of retrieval). This repository does not store it: the manifest references the containers
hdae/karume-irodori-v4-smallships as thecodec_decoder/codec_encodercomponents so that text-to-audio runs from this distribution. Its weights derive from facebook/dacvae-watermarked, licensed Apache-2.0 (as of retrieval), by way of Aratako/Semantic-DACVAE-Japanese; the MIT and Apache License 2.0 texts are included inLICENSE.mdfor the codec components. - Changes made here (also listed in
NOTICE.md): conversion into the Karume container format and quantization of the weights โ every component is stored asf16/i8series, and the DiT (dit/dit_context) adds ani4series rounded with GPTQ calibration (the quant table below says which storage each quant selects; nof32series is distributed). The text encoder's sliding-window attention mask is precomputed as one constant, and its embedding's end-of-image row is selected elementwise. The codec stores its weight-normalized convolutions as effective weights, keeps only the mean half ofquantizer.in_projincodec_encoder, and bypasses the watermarking branch incodec_decoder; constant sub-expressions are precomputed. No retraining, no fine-tuning.
Models
| Model | Pipeline | Quants | Default quant |
|---|---|---|---|
v4-large (default) |
irodori/1 |
f16 / i8 / i8-a8 / i8+dit4 |
i8-a8 |
model selects one of these; omitted, it is v4-large. quant defaults to that model's own default quant.
Usage
import { decodeWav, encodeWav } from "jsr:@karume/models";
import { Pipeline } from "jsr:@karume/models/irodori";
await using pipeline = await Pipeline.fromPretrained({
repo: "hdae/karume-irodori-v4-large",
// 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: "v4-large", // default โ available: v4-large
// quant: "i8-a8", // default โ available: f16 / i8 / i8+dit4 / i8-a8
});
const audio = await pipeline.generate({
text: "ใใใซใกใฏใใใใฏใในใใงใใ",
// Voice Design โ describe the voice in Japanese prose:
// caption: "่ฝใก็ใใๅฅณๆงใฎๅฃฐใงใใใฃใใใจไธๅฏงใซ่ฉฑใใฆใใใ",
// Voice cloning โ condition on a reference speaker. The WAV must already be
// 48000 Hz โ any channel count is averaged to mono; there is no resampler,
// so a sample-rate mismatch is refused:
// speaker: { audio: decodeWav(await Deno.readFile("reference.wav")) },
// ...or pass a DACVAE latent you saved earlier instead of the audio:
// speaker: { latent: savedLatent },
seed: 42, // same seed + same inputs โ same audio
// durationSeconds: 5, // override the predicted utterance length (seconds)
});
await Deno.writeFile(
"out.wav",
encodeWav(audio.data, audio.sampleRate),
);
generate() returns { data, sampleRate, frames, seed, forwards }, where data is f32
mono already trimmed to the predicted length. generateLatent() is the same run stopped
one stage earlier: it returns { data, frames, latentDim, seed, forwards } with the
patched DACVAE latent, for callers that want the embedding rather than audio.
caption and speaker are both optional: without them the voice is picked by the model
alone, and the guidance branches for the missing conditions are skipped.
Weights are fetched once and cached (verified against karume.json's size / sha256).
Model: v4-large
Quants
| Quant | What it is | Download | Weights | Compute |
|---|---|---|---|---|
f16 |
Largest (f16) โ Every graph stored as f16 and computed in f32 โ the largest download of this repository (no f32 preset is shipped). | 6.31 GiB (177 MiB shared) | backbone = f16 / text_proj = f16 / caption_proj = f16 / speaker = f16 / duration = f16 / dit = f16 / dit_context = f16 / codec_decoder = f16 / codec_encoder = f16 |
โ |
i8 |
Smaller (int8) โ Every graph stored as int8 and computed in f32, with the execution path left unchanged. | 3.17 GiB (88.8 MiB shared) | backbone = i8 / text_proj = i8 / caption_proj = i8 / speaker = i8 / duration = i8 / dit = i8 / dit_context = i8 / codec_decoder = i8 / codec_encoder = i8 |
โ |
i8-a8 (default) |
Balanced (int8, int8 linear) โ The int8 weights with per-token int8 activations in the DiT's linear layers โ the same download as plain int8. | 3.17 GiB (88.8 MiB shared) | backbone = i8 / text_proj = i8 / caption_proj = i8 / speaker = i8 / duration = i8 / dit = i8 / dit_context = i8 / codec_decoder = i8 / codec_encoder = i8 |
linearCompute = a8 |
i8+dit4 |
Lowest memory (int4 DiT) โ The DiT in GPTQ-calibrated int4 (group-32) while the other seven graphs stay int8 โ the smallest download and the least resident memory. | 2.56 GiB (88.8 MiB shared) | backbone = i8 / text_proj = i8 / caption_proj = i8 / speaker = i8 / duration = i8 / dit = i4 / dit_context = i4 / codec_decoder = i8 / codec_encoder = i8 |
โ |
If no quant is given, it runs as i8-a8 (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.
Some components are fetched from hdae/karume-irodori-v4-small at commit 501239954b205be8โฆ โ those bytes are identical to this model's own, so they are not stored here a second time.
Shape
Derived from the checkpoint's own config, and checked against the exported graphs when this repository was assembled.
- text: up to 256 tokens (BOS included), width 1280
- caption: up to 512 tokens (BOS included), width 1280
- reference speaker: up to 750 patched rows (4 latent frames each = 120s of audio), width 1280
- latent: up to 750 frames at 25 Hz (30s), width 32
- audio: 48000 Hz mono, 1920 samples per latent frame
Defaults
The sampler knobs are fixed by the manifest โ generate() takes none of them.
- steps: 40 Euler steps (
initScale0.999) - guidance: text 3.0 / speaker 5.0 / caption 3.0, applied for t in [0.5, 1.0]
- duration: clamped to [0.5, 30.0] seconds (the duration predictor decides within that, unless
durationSecondsis passed)
seed is the one knob the manifest does not carry โ it defaults to 0, and the same
seed with the same request gives the same audio.
The tokenizer asset carries no rare-token split table (upstream splits no tokens for
this tokenizer), so the text is encoded unsplit, and asking for the split
(splitRareTokens: true) is refused.
Model tree for hdae/karume-irodori-v4-large
Base model
Aratako/Irodori-TTS-v4-Large