forked from google/prompt-to-prompt
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_masa.py
57 lines (52 loc) · 1.87 KB
/
run_masa.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Example of running (Prox-)MasaCtrl
if __name__ == "__main__":
from prox_masactrl import main
########## MasaCtrl ##########
main(
out_dir="./outputs/masactrl_real/",
source_image_path="./images/two_parrots.jpeg",
source_prompt="Two parrots sitting on a stick with two steel bowls, city street background",
target_prompt="Two kissing parrots sitting on a stick with two steel bowls, city street background",
npi=False,
npi_interp=0,
)
########## ProxMasaCtrl ##########
main(
out_dir="./outputs/masactrl_real/",
source_image_path="./images/two_parrots.jpeg",
source_prompt="Two parrots sitting on a stick with two steel bowls, city street background",
target_prompt="Two kissing parrots sitting on a stick with two steel bowls, city street background",
inject_uncond="joint",
npi=True,
npi_interp=1,
) # OR
main(
out_dir="./outputs/masactrl_real/",
source_image_path="./images/two_parrots.jpeg",
source_prompt="Two parrots sitting on a stick with two steel bowls, city street background",
target_prompt="Two kissing parrots sitting on a stick with two steel bowls, city street background",
npi=True,
npi_interp=1,
prox='l0',
quantile=0.6,
)
########## MasaCtrl ##########
main(
out_dir="./outputs/masactrl_real/",
source_image_path="./images/cake2.png",
source_prompt="a round cake",
target_prompt="a square cake",
npi=False,
npi_interp=0,
)
########## ProxMasaCtrl ##########
main(
out_dir="./outputs/masactrl_real/",
source_image_path="./images/cake2.png",
source_prompt="a round cake",
target_prompt="a square cake",
npi=True,
npi_interp=1,
prox='l0',
quantile=0.6,
)