Commit Graph
85 Commits
Author SHA1 Message Date
Leonid PershinandClaude Opus 5 c7953dc4e0 fix: don't crash the UI on output files with custom names
create_text2music_ui() sorted the saved *_input_params.json files with
int(name.split('_')[1]), which assumes the generated
output_<timestamp>_<idx>_ shape. Output names are user-controlled — via
infer.py --output_path or a save_path from the UI — so any other name
raised ValueError while the Blocks were being built and took the whole
interface down before it could start:

    ValueError: invalid literal for int() with base 10: 'base'

Sort by mtime instead. That is what "previous generated input params"
means anyway (newest first) and it works for any filename; a file that
disappears between listdir() and getmtime() sorts last rather than
raising.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 20:30:58 +03:00
Leonid PershinandClaude Opus 5 0584397884 fix: write and read audio with soundfile instead of torchaudio
torchaudio 2.11 routes torchaudio.save()/load() through TorchCodec and
ignores the `backend` argument, so every generation died at the save
step with "ImportError: TorchCodec is required for save_with_torchcodec"
after the diffusion had already finished. Reference-audio loading
(audio2audio, repaint, extend) and the training dataset loader hit the
same wall.

soundfile is already a required dependency and covers all four output
formats the UI offers, so use it directly rather than pulling in
TorchCodec and its native FFmpeg stack:

- pipeline_ace_step.save_wav_file(): sf.write(), transposing
  (channels, samples) -> (samples, channels); drops the now-unused
  torchaudio import
- MusicDCAE.load_audio() and text2music_dataset: sf.read(dtype=float32,
  always_2d=True), transposed back to (channels, samples)

torchaudio is still used for Resample/MelScale transforms, which are
unaffected.

Verified end to end: 10s generation on an RTX 3060 in 9.7s, output is
valid non-silent 48kHz stereo; load_audio round-trips it; wav/mp3/ogg/
flac all write and read back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 19:03:29 +03:00
Leonid PershinandClaude Opus 5 6e3273d049 deps: migrate the UI to Gradio 6
Gradio was unpinned, so a fresh install pulled Gradio 6, where
gr.Audio no longer accepts show_download_button — the UI crashed on
startup with TypeError. Move forward to Gradio 6 instead of pinning
back to 5:

- requirements: gradio>=6.0.0
- drop the removed show_download_button kwarg (4 call sites)
- requirements: transformers>=4.57.0 — Gradio 6 requires
  huggingface-hub>=1.0, which transformers==4.50.0 forbids. Only
  UMT5EncoderModel and AutoTokenizer are used, so the bump is safe.

Verified: pip check clean, UI renders and server callbacks work on
gradio 6.26.0 / transformers 5.16.1 / huggingface-hub 1.30.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 18:38:12 +03:00
jackj 435e9fd667 Fix: Shape mismatch in extend mode causing AssertionError
- Added automatic shape alignment for target_latents and x0
- Handles both shorter (padding) and longer (trimming) cases
- Fixes crash in extend mode with long audio files
- Minimal impact on audio quality (~0.05-0.15 sec)

Resolves issue where extend mode fails with AssertionError
when target_latents shape doesn't match x0 shape after
padding/trimming operations.
2026-01-23 23:15:42 +05:00
rkfg 9c5c92946d Use sox backend for ogg 2025-06-03 15:31:20 +03:00
Sayo 3e2cb3ee58 [fix] export_quantized_weights import 2025-05-26 03:40:01 +00:00
rkfg 05e641f6ec Fix lora reloading on weight change 2025-05-21 19:41:11 +03:00
rkfg fc984d81fa Add lora weight 2025-05-20 08:59:00 +03:00
Gong Junmin 516792aa82 Merge pull request #214 from craftmine1000/main 2025-05-19 17:50:15 +08:00
rkfg 481d950db4 Fix lora loading with diffusers 0.33.1 2025-05-19 09:33:56 +03:00
Michael Hedman bfac11fecf prepare for hub download of quantized models 2025-05-19 08:18:26 +02:00
Michael Hedman 401b910936 missed a dtype
cleanup immediate surroundings
2025-05-19 07:57:05 +02:00
Michael Hedman 0b379b6163 reduce device and dtype vars 2025-05-19 07:34:13 +02:00
Michael Hedman d470cd903f reduce path vars 2025-05-19 06:47:04 +02:00
Michael Hedman 21efcd3905 move language filters 2025-05-19 04:51:22 +02:00
Michael Hedman cdab63d688 remove fixed float16 COLAB_FREE env var
add ACE_PIPELINE_DTYPE env var dtype config
set colab notebook to float16
2025-05-19 04:17:38 +02:00
Michael Hedman 0e0021d754 Merge branch 'main' of https://github.com/ace-step/ACE-Step.git 2025-05-18 20:22:46 +02:00
Gong Junmin 74121a5d8a Merge pull request #209 from GeorgeDrb/memory-optimization 2025-05-18 21:24:42 +08:00
GeorgeDrb 375431486c Add memory cleanup to prevent VRAM overflow 2025-05-18 15:35:21 +03:00
Gong Junmin e3a6f4f659 Revert "#194: implement negative tags for text2audio" 2025-05-18 19:42:29 +08:00
Skelp c3abb45241 #194: implement negative tags for text2audio 2025-05-17 18:14:29 +02:00
woctordho 3d6fe064f5 Enable gradient checkpointing 2025-05-17 20:40:21 +08:00
Michael Hedman 79dd277e21 fix environ check 2025-05-16 18:10:26 +02:00
Michael Hedman 42884d94b7 re-enable transformer compile 2025-05-16 18:07:30 +02:00
Michael Hedman 048db5c12f change to float16 model dtype 2025-05-16 18:02:48 +02:00
Michael Hedman 9b425b6bfa disable transformer compile 2025-05-16 17:45:37 +02:00
Michael Hedman c50acb83a6 rearrange model loading order, interleave compilation with loading 2025-05-16 17:32:18 +02:00
chuxij d881cb0219 add_scheduler_type_info 2025-05-15 11:57:41 +00:00
chuxij b11f1c1a5a fix bug in audio2audio 2025-05-15 08:39:19 +00:00
chuxij ded11fd02f fix audio2audio 2025-05-15 08:15:15 +00:00
chuxij 05c58339f0 add stable audio small pingpong sampler support 2025-05-15 06:35:17 +00:00
dannyzen 322a62d73e Removing changed src 2025-05-14 16:47:59 -04:00
dannyzen f95c91f072 Improve Docker output paths and non-Docker compatibility 2025-05-14 15:19:33 -04:00
chuxij 292ccef7bf asign cuda device 2025-05-14 03:37:07 +00:00
Gong Junmin 512ab193b7 Merge pull request #155 from SD-inst/format 2025-05-13 20:33:47 +08:00
rkfg 0feca8a820 Add format selector 2025-05-13 14:41:56 +03:00
Samrat Barai f0687c8840 Merge branch 'main' into patch-1 2025-05-13 16:49:11 +06:00
Samrat Barai e2614cd6ac add auto outputs folder creation in components.py
Add the functionality to automatically create the outputs folder if it doesn't exist at line 99
2025-05-13 16:35:12 +06:00
Strange 0cd2638c78 Add output directory creation in create_text2music_ui function 2025-05-13 12:55:18 +03:00
Gong Junmin 02f823f406 Merge pull request #136 from ace-step/add_lora_support
add chinese_rap_lora
2025-05-13 15:01:17 +08:00
chuxij 6ca5bd880e update ui and add examples 2025-05-13 07:00:35 +00:00
chuxij 84ba6afea3 add more examples 2025-05-12 17:50:37 +00:00
chuxij 92dc15663b add examples and fix bugs 2025-05-12 14:13:39 +00:00
chuxij bdddf1512f fix bugs 2025-05-12 09:45:21 +00:00
Sayo 44ef026f02 [fix] checkpoints path 2025-05-12 17:22:57 +08:00
chuxij da4c3da354 add snapshot_download 2025-05-12 08:45:25 +00:00
chuxij 348cebc7f8 add lora interface 2025-05-12 08:09:26 +00:00
mrfakename 85d68306c6 fix imports 2025-05-11 11:28:12 -07:00
Gong Junmin 47669c2375 fix decode_overlap_shorter 2025-05-11 15:04:40 +08:00
Gong Junmin b86a71088c fix mono input 2025-05-10 21:37:38 +08:00