forked from merlresearch/SteeredDiffusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.py
33 lines (28 loc) · 1.23 KB
/
parser.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright (C) 2023-2024 Mitsubishi Electric Research Laboratories (MERL)
# Copyright (C) 2022-2023 Omri Avrahami
# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-License-Identifier: MIT
# Code adapted from https://github.com/omriav/blended-diffusion -- MIT License
import argparse
def get_arguments() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument(
"-config", "--config", type=str, help="Config file with generations", default="configs/diffusion_config.yml"
)
parser.add_argument(
"-img_path", "--img_path", type=str, help="Path of example image", default="./input_example/faces/4.jpg"
)
parser.add_argument(
"-mask_path", "--mask_path", type=str, help="Path of example mask", default="./input_example/masks/4.png"
)
parser.add_argument("-data_fold", "--data_fold", type=str, help="Path of data fold", default="./data")
parser.add_argument("-condition", "--condition", type=str, help="Required condition", default="grayscale")
parser.add_argument(
"-editing_text",
"--editing_text",
type=str,
help="Required text for editing",
default="A woman with blonde hair",
)
args = parser.parse_args()
return args