Skip to content

Commit ccb34d4

Browse files
authored
Merge pull request #41 from audiohacking/slimming
Slimming: remove Japanese Sudachi payload and fix duplicate requests
2 parents 53c4c93 + 4d649cf commit ccb34d4

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

CDMF.spec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,11 @@ a = Analysis(
323323
excludes=[
324324
# Note: matplotlib is used by some dependencies but excluded to reduce bundle size
325325
# If you encounter import errors, remove this exclusion
326+
# Slimming: exclude Japanese Sudachi packages (large dictionary payload; not needed)
327+
'sudachipy',
328+
'sudachidict_core',
329+
'sudachidict_small',
330+
'sudachidict_full',
326331
],
327332
win_no_prefer_redirects=False,
328333
win_private_assemblies=False,

build_local.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ echo "[Build] Installing additional dependencies..."
7171
"$PY" -m pip install "git+https://github.com/ace-step/ACE-Step.git" --no-deps --quiet
7272
"$PY" -m pip install "rotary_embedding_torch" --quiet
7373

74+
# ---------------------------------------------------------------------------
75+
# Slimming: remove Japanese (Sudachi) dictionary payload
76+
# SudachiDict-core is ~200MB and not needed for AceForge.
77+
# We explicitly uninstall it (and SudachiPy) so PyInstaller cannot bundle it.
78+
# ---------------------------------------------------------------------------
79+
echo "[Build] Removing Japanese Sudachi packages (if present)..."
80+
"$PY" -m pip uninstall -y SudachiDict-core SudachiPy sudachidict-core sudachipy >/dev/null 2>&1 || true
81+
7482
# Install TTS for voice cloning (required for frozen app; build fails if TTS cannot be imported)
7583
# TTS 0.21.2 needs its full dependency tree (phonemizers etc.); --no-deps breaks "from TTS.api import TTS"
7684
echo "[Build] Installing TTS for voice cloning..."
@@ -120,6 +128,10 @@ fi
120128
echo "[Build] PyInstaller version: $("$PY" -m PyInstaller --version)"
121129
echo ""
122130

131+
# One last pass right before bundling, in case anything reintroduced Sudachi.
132+
echo "[Build] Final check: removing Japanese Sudachi packages (if present)..."
133+
"$PY" -m pip uninstall -y SudachiDict-core SudachiPy sudachidict-core sudachipy >/dev/null 2>&1 || true
134+
123135
# Clean previous builds (PyInstaller outputs only).
124136
# NEVER delete build/macos/ — it contains AceForge.icns (app icon), codesign.sh, pyinstaller hooks.
125137
echo "[Build] Cleaning previous builds..."

static/scripts/cdmf_generation_ui.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,14 @@
419419
function onSubmitForm(ev) {
420420
const state = getState();
421421

422+
// Prevent duplicate submissions (double-click protection)
423+
if (state.candyIsGenerating || window.candyIsGenerating) {
424+
if (ev && ev.preventDefault) {
425+
ev.preventDefault();
426+
}
427+
return false;
428+
}
429+
422430
// If the ACE model is not ready yet, repurpose this submit as
423431
// a "Download Models" action instead of sending /generate.
424432
if (!state.candyModelsReady) {

0 commit comments

Comments
 (0)