From 58f4227d7395b887bc38d76cea2fb671a8203025 Mon Sep 17 00:00:00 2001 From: OrangeWolf Date: Sun, 4 May 2025 17:37:48 +0800 Subject: [PATCH 1/2] feat: use device from config file when predict --- bin/predict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/predict.py b/bin/predict.py index 4ff90dc2..3a89660a 100755 --- a/bin/predict.py +++ b/bin/predict.py @@ -41,7 +41,7 @@ def main(predict_config: OmegaConf): if sys.platform != 'win32': register_debug_signal_handlers() # kill -10 will result in traceback dumped into log - device = torch.device("cpu") + device = torch.device(predict_config.get('device', 'cpu')) train_config_path = os.path.join(predict_config.model.path, 'config.yaml') with open(train_config_path, 'r') as f: From 3fe04631b5c873790c4657b7fbcd15afe1d18eba Mon Sep 17 00:00:00 2001 From: orange_wolf Date: Wed, 7 May 2025 22:16:57 +0800 Subject: [PATCH 2/2] feat: predict jpg format by default --- configs/prediction/default.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/prediction/default.yaml b/configs/prediction/default.yaml index 80fa69b2..113f4a27 100644 --- a/configs/prediction/default.yaml +++ b/configs/prediction/default.yaml @@ -7,11 +7,12 @@ model: dataset: kind: default - img_suffix: .png + img_suffix: .jpg pad_out_to_modulo: 8 device: cuda out_key: inpainted +out_ext: .jpg refine: False # refiner will only run if this is True refiner: