Loading playground
Input
Additional Settings
Customize your input with more control.
Result
Idle
Customize your input with more control.
Customize your input with more control.
Hint: Upload a prepared .zip archive or provide a URL. See the field description for the required file layout.
Customize your input with more control.
The cost of training depends on the number of steps. The formula is: 0.0023 * steps. With 1000 steps, your request will cost $2.30.
Fine-tune your training parameters and start right now.
/audio-inpaint)The /audio-inpaint endpoint trains a LoRA for the LTX 2.3 model that regenerates masked time spans of an audio clip while keeping the rest unchanged. Each training clip is paired with a list of time ranges marking the spans to regenerate; the model learns to fill those spans so they blend with the kept audio. At inference you supply an audio clip and one or more time ranges, and the model regenerates only those spans. This is audio-only.
Key features:
[start, end] second ranges.audio_duration_seconds.Provide a single .zip archive (linked via training_data_url) where each example is an audio clip plus a JSON mask:
<name>.<ext> — the audio clip (.wav, .mp3, .flac, .ogg, .aac, .m4a).<name>_mask.json — a JSON list of [start, end] second ranges to regenerate (the rest is kept), e.g. [[1.0, 2.0], [3.5, 4.0]].<name>.txt — optional caption.Every clip needs a matching <name>_mask.json. The mask must mark at least one non-empty range inside the clip duration. File names must be unique across the archive. Aim for at least 10 examples.
Example layout:
clip01.wav clip01_mask.json clip01.txt clip02.mp3 clip02_mask.json clip02.txt
At least one clip must fill the audio bucket. A clip shorter than audio_duration_seconds is skipped; if every clip is shorter, the request is rejected up front (HTTP 422). Lower audio_duration_seconds if your clips are short.
training_data_url (required)Type: string
URL to the .zip archive of audio + mask-JSON examples.
trigger_phraseType: string
Default: ""
Phrase prepended to captions during training; include it at inference.
rankType: integer (8, 16, 32, 64, 128)
Default: 32
LoRA capacity.
number_of_stepsType: integer
Default: 2000 (range 100–20000)
Number of optimization steps.
learning_rateType: number
Default: 0.0002
Optimization step size.
audio_duration_secondsType: number
Default: 5.0 (range 0.5–60.0)
Target audio clip length in seconds (the audio duration bucket). Clips shorter than this are skipped; longer clips are trimmed. The mask time ranges are interpreted within this duration.
audio_normalizeType: boolean
Default: true
Peak-normalize audio for consistent loudness across the dataset.
audio_preserve_pitchType: boolean
Default: true
Preserve pitch when fitting audio to the target duration.
validationType: array
Default: [] (max 2 entries)
Validation samples, each an object with:
prompt (string) — the text prompt.audio_url (string, required) — the audio clip to inpaint.time_ranges (array, required) — a list of [start, end] second ranges to regenerate, e.g. [[1.0, 2.0]]. The rest of the audio is kept.validation_negative_promptType: string
Default: a built-in quality negative prompt.
validation_frame_rateType: integer
Default: 24 (range 8–60)
Used together with the audio bucket to size the preview audio length (and therefore where the time ranges land).
stg_scaleType: number
Default: 1.0 (range 0.0–3.0)
debug_datasetType: boolean
Default: false
Return an archive of the preprocessed data for inspection.
Note: this audio-only mode also accepts the shared video/validation-video fields, but they have no effect — no video is processed.
lora_file — the trained LoRA weights (.safetensors).config_file — JSON describing the trigger phrase and training type.audio — a combined preview of the generated validation audio.debug_dataset — preprocessed-data archive, only when debug_dataset is enabled.A successful run is billed max(100, number_of_steps) billable units. Requests that fail before training completes (input-validation errors / HTTP 422, or dataset-download failures) are billed 0 units.
audio_duration_seconds bucket, and each mask's time ranges converted into a per-clip mask over the clip duration..zip is unpacked; macOS metadata and hidden files are ignored.<name> clip is paired with its <name>_mask.json time ranges and optional <name>.txt. A clip without a mask JSON, an unparsable mask, or a mask that marks nothing causes a clear error.audio_duration_seconds bucket (shorter clips skipped, longer ones trimmed; normalized and pitch-fit as configured).[start, end] second ranges become the spans to regenerate; everything else is kept.audio_duration_seconds that fits most clips so few are skipped, and keep your time ranges inside that duration.start < end, inside the clip duration.Good caption: a steady drumbeat with the snare replaced by a clap
Weak caption: drums
At inference, supply an audio clip and time ranges in seconds, and use the same caption style and trigger phrase. Keep durations and ranges in line with audio_duration_seconds.
json{ "training_data_url": "https://example.com/audio_inpaint_examples.zip", "trigger_phrase": "", "rank": 32, "number_of_steps": 2000, "learning_rate": 0.0002, "audio_duration_seconds": 5.0, "validation": [ { "prompt": "a steady drumbeat", "audio_url": "https://example.com/source.wav", "time_ranges": [[1.0, 2.0]] } ] }
[start, end] with start < end inside the clip duration.audio_duration_seconds to match your clips.rank, more examples.<name>_mask.json files or malformed JSON.audio_duration_seconds window.