Commit 2806c79
committed
fix: headless/Colab mode + UI reliability fixes
Critical fixes for Colab no-UI mode:
- configs/config.py: Lazy imports for onnxruntime + GPU backends,
fixed singleton pattern, removed eager deps that crashed headless
- utils/variables.py: get_config() now uses local lazy Config class
instead of the eager configs.config.Config
- app/__init__.py: Lazy imports for gui/tensorboard so importing
the app module doesn't crash without gradio
- engine/realtime/audio.py: Wrapped sounddevice + librosa in
try/except with None guards for headless environments
- Created utils/feedback.py: Lightweight logging-only gr_info/
gr_warning/gr_error + utility functions (process_output,
replace_punctuation, replace_url, etc.) that work without UI deps
UI fixes:
- ui/feedback.py: Replaced raw gr.update() calls with safe dict
pattern to prevent AttributeError when gradio is unavailable
- services/*.py: Split imports - gr_info/gr_warning/gr_error now
from utils.feedback (no UI dep), UI-specific functions from ui.feedback
- engine/inference/inference.py: Split imports similarly
- engine/training/extract/preparing_files.py: Fixed wrong import
source (ui.feedback → utils.variables for config/configs)
Other fixes:
- models/backends/directml.py: Lazy import of fairseq (was eager)
- services/realtime_client.py: Wrapped FastAPI import in try/except
- Removed 90+ sys.path.append(os.getcwd()) code smells across
entire codebase - unnecessary in proper package1 parent a4db1ca commit 2806c79
109 files changed
Lines changed: 349 additions & 201 deletions
File tree
- advanced_rvc_inference
- api
- app
- tabs
- downloads
- extra
- child
- inference
- child
- realtime
- training
- child
- configs
- engine
- inference
- realtime
- training
- extract
- preprocess
- runner
- models
- algorithms
- backends
- embedders
- generators
- onnx
- predictors
- CREPE
- DJCM
- FCPE
- PENN
- PESTO
- RMVPE
- speaker
- services
- ui
- utils
- uvr
- uvr5_lib
- uvr
- vr_network
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
12 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
0 commit comments