Restore runtime deps: models, dots.tts, torchvision shadow
Rebuild the venv half of the reconstruction. Adds the two CPU onnx detectors back under models/ (comic-text-detector, deepghs anime face, both gitignored), re-clones the dots.tts checkout, and records both recipes in requirements.txt so the next rebuild skips the archaeology. Two pre-existing environment breakages had to be cleared: - Arch's torchvision 0.25 is too old for torch 2.13, so every transformers model import died with "operator torchvision::nms does not exist". Shadowed with 0.28.0+rocm7.2 inside the venv only, so the system copy stays put. - dots_tts refuses to import when torch and torchaudio minors differ, and that pair is unsatisfiable here: 2.11 is the newest torchaudio ROCm wheel there is. Verified 2.11 loads and resamples against 2.13, then scoped a bypass around the import in both call sites. Self-checks 13/14. worker_layers still needs the ComfyUI workflow json, which legacy/ took with it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,18 @@ def load_model(model_name: str):
|
||||
cls, *args, **{"fix_mistral_regex": True, **kwargs}
|
||||
)
|
||||
)
|
||||
from dots_tts.runtime import DotsTtsRuntime
|
||||
# Match worker_tts.py's torch/torchaudio minor-mismatch bypass too.
|
||||
import torch
|
||||
import importlib.metadata as metadata
|
||||
|
||||
real_version = metadata.version
|
||||
metadata.version = (
|
||||
lambda name: torch.__version__ if name == "torchaudio" else real_version(name)
|
||||
)
|
||||
try:
|
||||
from dots_tts.runtime import DotsTtsRuntime
|
||||
finally:
|
||||
metadata.version = real_version
|
||||
|
||||
return DotsTtsRuntime.from_pretrained(model_name, precision="bfloat16")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user