You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REFACTOR_PLAN.md: update progress markers through Phase 2-6
Phase 0 + 1a-1 + 1a-2 + 1b-1 through 1b-5 + 1c-1 through 1c-6 + 1d
(partial) + 2-1 through 2-6 marked DONE / PARTIAL with commit hashes
and remaining work scoped. Adds the cumulative -4,453 LOC mega-file
shrink table so the next session can see where the wins landed.
inference/__init__.py: 3574 → 1521 (-2053). RuntimeController (~1050 LOC) is the only big class still inline; deferred — its helper graph is the most cross-cutting in the package.
**Remaining**: extract `DiffusersTextToImageEngine` (1112 LOC inside image/__init__) + `DiffusersVideoEngine` (1335 LOC inside video/__init__). Both classes use the same pipeline-loader pattern (LoRA fuse, distill swap, nunchaku, fp8, preview-VAE) — extract into `runtimes/common/` after both engines move out of their respective __init__.py files.
**1d. `routes/setup.py` 1,932 → setup/{longlive,wan_install}.py + main __init__.****PARTIAL** (commit `6181c1b`). LongLive + Wan installers extracted. GPU bundle install (~700 LOC) still in main `__init__.py` because its helpers (`_extras_site_packages`, `_cleanup_mlx_video_shadow_metadata`, `_run_pip_install`) are shared with the regular pip-install path. Full split deferred — needs to first move shared helpers into a `setup/_install_helpers.py` module.
93
120
94
121
**1e. helpers/ regrouping into media/ models/ system/ ui/ storage/ inference/ finetune/ remote/ filter/ subpackages. Public re-exports preserve call sites.**
95
122
96
123
**Verify each step:**`pytest`, live smoke gens (text + image + video), `python -c "from backend_service.app import build_app; build_app()"` clean import.
0 commit comments