Implement DeepMosaics restoration engine in HVideoTool: updated configuration options, integrated into the UI, and enhanced documentation in README and CLAUDE.md. The restoration process now supports both inpainting and generative models, with necessary setup instructions included.
This commit is contained in:
@@ -35,6 +35,11 @@ def apply(config: AppConfig) -> None:
|
||||
config.model_path = data["model_path"]
|
||||
if "threshold" in data:
|
||||
config.default_threshold = float(data["threshold"])
|
||||
if data.get("restorer"):
|
||||
config.restorer = data["restorer"]
|
||||
for key in ("dm_dir", "dm_model", "dm_python", "dm_gpu"):
|
||||
if key in data:
|
||||
setattr(config, key, data[key])
|
||||
|
||||
|
||||
def save(config: AppConfig) -> None:
|
||||
@@ -44,6 +49,11 @@ def save(config: AppConfig) -> None:
|
||||
detector=config.detector,
|
||||
model_path=config.model_path,
|
||||
threshold=config.default_threshold,
|
||||
restorer=config.restorer,
|
||||
dm_dir=config.dm_dir,
|
||||
dm_model=config.dm_model,
|
||||
dm_python=config.dm_python,
|
||||
dm_gpu=config.dm_gpu,
|
||||
)
|
||||
_write(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user