Enhance documentation and UI for HVideoTool: added restoration feature for detected regions, updated layout for collection controls, and improved navigation bar. Clarified tool capabilities and limitations in README and CLAUDE.md.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""Restorer factory: build a Restorer by name.
|
||||
|
||||
Currently only the cv2 inpaint baseline is wired. Generative engines
|
||||
(DeepMosaics / LADA BasicVSR++) are placeholders — they need model weights and a
|
||||
CUDA GPU, and raise a clear, actionable error until integrated. See README.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .base import Restorer
|
||||
from .inpaint import InpaintRestorer
|
||||
|
||||
|
||||
def build_restorer(name: str = "inpaint", model_path: str | None = None) -> Restorer:
|
||||
if name == "inpaint":
|
||||
return InpaintRestorer()
|
||||
if name in ("deepmosaics", "lada"):
|
||||
raise ValueError(
|
||||
"Генеративное восстановление пока не подключено.\n"
|
||||
"Нужна модель (DeepMosaics / LADA) и GPU (CUDA). См. README → Восстановление."
|
||||
)
|
||||
raise ValueError(f"Неизвестный режим восстановления: {name!r}")
|
||||
Reference in New Issue
Block a user