Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
PhotoMaker-base
Commits
2987fc60
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "8fa0c956b34123d1f1406ae96d74c484976d0e3f"
Unverified
Commit
2987fc60
authored
Jul 22, 2024
by
Zhen Li
Committed by
GitHub
Jul 22, 2024
Browse files
Update inference_pmv2.py
parent
3271db0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
inference_scripts/inference_pmv2.py
inference_scripts/inference_pmv2.py
+2
-2
No files found.
inference_scripts/inference_pmv2.py
View file @
2987fc60
...
@@ -30,7 +30,7 @@ if device == "mps":
...
@@ -30,7 +30,7 @@ if device == "mps":
output_dir
=
"./outputs"
output_dir
=
"./outputs"
os
.
makedirs
(
output_dir
,
exist_ok
=
True
)
os
.
makedirs
(
output_dir
,
exist_ok
=
True
)
photomaker_
path
=
hf_hub_download
(
repo_id
=
"TencentARC/PhotoMaker"
,
filename
=
"photomaker-v2.bin"
,
repo_type
=
"model"
)
photomaker_
ckpt
=
hf_hub_download
(
repo_id
=
"TencentARC/PhotoMaker
-V2
"
,
filename
=
"photomaker-v2.bin"
,
repo_type
=
"model"
)
prompt
=
"instagram photo, portrait photo of a woman img, colorful, perfect face, natural skin, hard shadows, film grain, best quality"
prompt
=
"instagram photo, portrait photo of a woman img, colorful, perfect face, natural skin, hard shadows, film grain, best quality"
negative_prompt
=
"(asymmetry, worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth"
negative_prompt
=
"(asymmetry, worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth"
...
@@ -91,4 +91,4 @@ images = pipe(
...
@@ -91,4 +91,4 @@ images = pipe(
).
images
).
images
for
idx
,
img
in
enumerate
(
images
):
for
idx
,
img
in
enumerate
(
images
):
img
.
save
(
os
.
path
.
join
(
output_dir
,
f
"output_pmv2_
{
idx
}
.jpg"
))
img
.
save
(
os
.
path
.
join
(
output_dir
,
f
"output_pmv2_
{
idx
}
.jpg"
))
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment