Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xiaoyu liu
infer_comfyui_matting
Commits
81933108
Commit
81933108
authored
9 months ago
by
xiaoyu liu
Browse files
Options
Download
Email Patches
Plain Diff
update,fix bug,增加mask通道输出
parent
cb2cd957
main
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
run_comfyui_biref.py
+4
-3
run_comfyui_biref.py
with
4 additions
and
3 deletions
+4
-3
run_comfyui_biref.py
+
4
-
3
View file @
81933108
...
...
@@ -78,13 +78,14 @@ def _upload_image(input_path, name, image_type="input", overwrite=False, subfold
def
infer
(
ws
,
local_image_path
,
upload_image_name
,
prompt
):
# 将local_image_path的图片上传到server,命名为upload_image_name
#
_upload_image(local_image_path, upload_image_name)
_upload_image
(
local_image_path
,
upload_image_name
)
# 将promt中的input节点需要读取的图片名称设置为刚刚上传的图片名
prompt
[
"2"
][
"inputs"
][
"image"
]
=
upload_image_name
#run inference
img
=
get_images
(
ws
,
prompt
)
print
(
'biref matting output: %s'
%
img
.
shape
)
return
img
print
(
'biref matting output size: %s'
%
str
(
img
.
size
))
r
,
g
,
b
,
a
=
img
.
split
()
return
img
,
a
if
__name__
==
"__main__"
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets