27 Commits

Author SHA1 Message Date
f5030245e5 Fix audio AbortError race condition in all generation tabs
Use gr.skip() instead of gr.update() for audio/waveform/duration/seed
outputs during the initial "Generating..." status yield. This prevents
Gradio's StaticAudio component from starting a fetch that gets aborted
when the actual audio path arrives in the second yield.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 17:04:55 +01:00
1935bae594 Fix pandas DataFrame indexing in project selection
Use df.iloc[row, col] instead of df[row][col] for proper pandas access.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 16:25:55 +01:00
0a27d7c227 Fix projects page to handle dataclass objects instead of dicts
Project and Generation are dataclasses, not dicts. Added _get_attr helper
to access attributes from both dict and object types.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 16:22:04 +01:00
f3b5894e0e Fix mixed content error for audio files behind HTTPS proxy
Add root_path setting to configure Gradio for HTTPS reverse proxy.
Set AUDIOCRAFT_ROOT_PATH env var to external URL (e.g., https://example.com).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:35:07 +01:00
2f9bdb122f fix: gpu header display 2025-11-27 15:29:16 +01:00
b80defd929 Set comfyui_reserve_gb default to 0.0
When ComfyUI is not running, the 10GB reservation wastes VRAM and causes
OOM errors. Default to 0, users can set AUDIOCRAFT_COMFYUI_RESERVE_GB=10
when running alongside ComfyUI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:12:31 +01:00
b8a87e7109 Fix model loading - use device param instead of .to()
AudioCraft's get_pretrained() accepts device parameter directly.
The model objects don't have a .to() method.

Fixed in all adapters:
- MusicGen
- AudioGen
- MAGNeT
- MusicGen Style
- JASCO

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:50:09 +01:00
74f69707b8 Pin transformers<4.40.0 for PyTorch 2.1 compatibility
transformers 4.40+ uses serialized_type_name kwarg in _register_pytree_node()
which doesn't exist in PyTorch 2.1. Pin to older version.

Also removes the ineffective pytree shim.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:34:37 +01:00
df2e9f193a Add robust PyTorch pytree compatibility shim
Create bidirectional aliases for _register_pytree_node/register_pytree_node
to support both older and newer PyTorch versions with AudioCraft.

The API changed between versions - older uses underscore prefix (private),
newer uses no prefix (public). This shim creates both aliases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:01:26 +01:00
f27ac50f1d Pin PyTorch <2.4.0 for AudioCraft compatibility
AudioCraft requires PyTorch 2.1.x. PyTorch 2.4+ changed the
torch.utils._pytree API (serialized_type_name parameter), breaking
AudioCraft's model loading.

- Pin torch>=2.1.0,<2.4.0
- Pin torchaudio>=2.1.0,<2.4.0
- Remove broken pytree monkey-patch attempt

After pulling, reinstall with:
  pip install -r requirements.txt --force-reinstall torch torchaudio

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:43:26 +01:00
4c602a6c07 Add PyTorch 2.5+ compatibility patch for _pytree API
The torch.utils._pytree module changed its API in PyTorch 2.5:
- register_pytree_node became _register_pytree_node (or vice versa)
- This breaks audiocraft which uses the old API

Add monkey-patch to alias the function for backwards compatibility.

See: https://stackoverflow.com/questions/78501569

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:38:09 +01:00
0288e32de9 Fix relative path resolution for models.yaml config
- Change working directory to PROJECT_ROOT on startup
- Resolve models_config path relative to PROJECT_ROOT
- Add debug logging for config path and available models
- This fixes "Unknown model" error when running from different directories

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:32:05 +01:00
503b3ce473 Fix model registration + add long-form generation support
- Fix critical bug: register_all_adapters() now called in main.py
- Add generate_long() method to MusicGen adapter for continuation-based
  extended tracks (up to 5 minutes)
- Add long-form checkbox in UI that unlocks duration slider to 300s
- Update GenerationService to route to generate_long when duration > 30s
- Update BatchProcessor to support long_form parameter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:22:06 +01:00
e53314023c Fix GPUMemoryManager method call - use get_status()
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:42:29 +01:00
dcf369db13 Fix BatchProcessor attribute access in queue status
Use private _queue and _jobs attributes with hasattr checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:40:44 +01:00
c28397f176 Remove height params from Gradio 6 components
Dataframe, Gallery, Image no longer accept height parameter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:38:18 +01:00
df49ee777e Fix ProjectService param and Gradio 6 Audio component
- Fix ProjectService: db -> database
- Remove show_download_button from gr.Audio (Gradio 6.x)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:36:42 +01:00
1779d3898d Fix service init params and simplify VRAM monitor
- Fix GenerationService params: registry, database
- Simplify VRAM display to basic Markdown for now

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:35:15 +01:00
5080eeab08 Update to Gradio 6.x API
- Move css from gr.Blocks() to launch()
- Replace show_api with footer_links parameter
- Remove theme from Blocks (moved to launch in Gradio 6)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:32:36 +01:00
1b1d836b6c Simplify gr.Blocks for older Gradio compatibility
Remove theme and title params that aren't supported in older versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:30:10 +01:00
cdb420d0f7 Fix ModelRegistry params and Gradio Blocks compatibility
- Fix ModelRegistry init params: config_path, max_cached_models, idle_timeout_minutes
- Make gr.Blocks creation compatible with different Gradio versions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:28:41 +01:00
626fb8d02f Fix GPUMemoryManager param and simplify theme
- Fix comfyui_reserve_bytes -> comfyui_reserve_gb in main.py
- Simplify Gradio theme to avoid invalid parameters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:25:34 +01:00
64a94e7ab7 Fix Database.initialize and remove invalid theme param
- Add initialize() method as alias for connect()
- Remove invalid tab_nav_background_fill theme parameter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:24:08 +01:00
fd5c8acea2 Add missing settings attributes
Added: api_enabled, api_key_required, api_rate_limit, default_format,
sample_rate, normalize_audio, debug, max_loaded_models

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:22:11 +01:00
b6eb73dea4 Fix async generator syntax errors in tab files
Changed return statements to yield + return in async generator
functions. Python doesn't allow 'return' with a value in generators.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:16:39 +01:00
1513f1fefa Fix import errors and NumPy compatibility
- Rename create_theme() to create_audiocraft_theme() to match imports
- Add missing get_custom_css() function
- Pin numpy<2.0.0 for PyTorch compatibility
- Replace deprecated pynvml with nvidia-ml-py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:11:18 +01:00
ffbf02b12c Initial implementation of AudioCraft Studio
Complete web interface for Meta's AudioCraft AI audio generation:

- Gradio UI with tabs for all 5 model families (MusicGen, AudioGen,
  MAGNeT, MusicGen Style, JASCO)
- REST API with FastAPI, OpenAPI docs, and API key auth
- VRAM management with ComfyUI coexistence support
- SQLite database for project/generation history
- Batch processing queue for async generation
- Docker deployment optimized for RunPod with RTX 4090

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:34:27 +01:00