mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Fix PerpNeg node.
This commit is contained in:
parent
1088d1850f
commit
ea9ac9d30b
@ -1,10 +1,11 @@
|
|||||||
import torch
|
import torch
|
||||||
import comfy.model_management
|
import comfy.model_management
|
||||||
import comfy.sample
|
import comfy.sampler_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:
|
|||||||
|
|
||||||
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.sampler_helpers.convert_cond(empty_conditioning)
|
||||||
|
|
||||||
def cfg_function(args):
|
def cfg_function(args):
|
||||||
model = args["model"]
|
model = args["model"]
|
||||||
|
Loading…
Reference in New Issue
Block a user