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
ea9ac9d3
Commit
ea9ac9d3
authored
Apr 05, 2024
by
comfyanonymous
Browse files
Fix PerpNeg node.
parent
1088d185
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
comfy_extras/nodes_perpneg.py
comfy_extras/nodes_perpneg.py
+3
-2
No files found.
comfy_extras/nodes_perpneg.py
View file @
ea9ac9d3
import
torch
import
torch
import
comfy.model_management
import
comfy.model_management
import
comfy.sample
import
comfy.sample
r_helpers
import
comfy.samplers
import
comfy.samplers
import
comfy.utils
import
comfy.utils
#TODO: This node should be removed and replaced with one that uses the new Guider/SamplerCustomAdvanced.
class
PerpNeg
:
class
PerpNeg
:
@
classmethod
@
classmethod
def
INPUT_TYPES
(
s
):
def
INPUT_TYPES
(
s
):
...
@@ -19,7 +20,7 @@ class PerpNeg:
...
@@ -19,7 +20,7 @@ class PerpNeg:
def
patch
(
self
,
model
,
empty_conditioning
,
neg_scale
):
def
patch
(
self
,
model
,
empty_conditioning
,
neg_scale
):
m
=
model
.
clone
()
m
=
model
.
clone
()
nocond
=
comfy
.
sample
.
convert_cond
(
empty_conditioning
)
nocond
=
comfy
.
sample
r_helpers
.
convert_cond
(
empty_conditioning
)
def
cfg_function
(
args
):
def
cfg_function
(
args
):
model
=
args
[
"model"
]
model
=
args
[
"model"
]
...
...
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