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
ComfyUI
Commits
d07cd442
Commit
d07cd442
authored
Nov 07, 2023
by
comfyanonymous
Browse files
Merge branch 'master' of
https://github.com/cubiq/ComfyUI
parents
656c0b5d
4acfc11a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
comfy_extras/nodes_post_processing.py
comfy_extras/nodes_post_processing.py
+3
-1
No files found.
comfy_extras/nodes_post_processing.py
View file @
d07cd442
...
...
@@ -23,7 +23,7 @@ class Blend:
"max"
:
1.0
,
"step"
:
0.01
}),
"blend_mode"
:
([
"normal"
,
"multiply"
,
"screen"
,
"overlay"
,
"soft_light"
],),
"blend_mode"
:
([
"normal"
,
"multiply"
,
"screen"
,
"overlay"
,
"soft_light"
,
"difference"
],),
},
}
...
...
@@ -54,6 +54,8 @@ class Blend:
return
torch
.
where
(
img1
<=
0.5
,
2
*
img1
*
img2
,
1
-
2
*
(
1
-
img1
)
*
(
1
-
img2
))
elif
mode
==
"soft_light"
:
return
torch
.
where
(
img2
<=
0.5
,
img1
-
(
1
-
2
*
img2
)
*
img1
*
(
1
-
img1
),
img1
+
(
2
*
img2
-
1
)
*
(
self
.
g
(
img1
)
-
img1
))
elif
mode
==
"difference"
:
return
img1
-
img2
else
:
raise
ValueError
(
f
"Unsupported blend mode:
{
mode
}
"
)
...
...
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