mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-14 23:34:35 +08:00
Update nodes.py
This commit is contained in:
parent
dc919c3d8d
commit
a7382e40c5
23
nodes.py
23
nodes.py
@ -3642,6 +3642,23 @@ class EffnetEncode:
|
|||||||
t = effnet(image).cpu()
|
t = effnet(image).cpu()
|
||||||
return ({"samples":t}, )
|
return ({"samples":t}, )
|
||||||
|
|
||||||
|
class ImageNormalize_Neg1_To_1:
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {"required": {
|
||||||
|
"images": ("IMAGE",),
|
||||||
|
|
||||||
|
}}
|
||||||
|
RETURN_TYPES = ("IMAGE",)
|
||||||
|
FUNCTION = "normalize"
|
||||||
|
|
||||||
|
CATEGORY = "KJNodes"
|
||||||
|
|
||||||
|
def normalize(self,images):
|
||||||
|
|
||||||
|
images = images * 2.0 - 1.0
|
||||||
|
|
||||||
|
return (images,)
|
||||||
|
|
||||||
NODE_CLASS_MAPPINGS = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
"INTConstant": INTConstant,
|
"INTConstant": INTConstant,
|
||||||
@ -3709,7 +3726,8 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
"CondPassThrough": CondPassThrough,
|
"CondPassThrough": CondPassThrough,
|
||||||
"ImageUpscaleWithModelBatched": ImageUpscaleWithModelBatched,
|
"ImageUpscaleWithModelBatched": ImageUpscaleWithModelBatched,
|
||||||
"ScaleBatchPromptSchedule": ScaleBatchPromptSchedule,
|
"ScaleBatchPromptSchedule": ScaleBatchPromptSchedule,
|
||||||
"EffnetEncode": EffnetEncode
|
"EffnetEncode": EffnetEncode,
|
||||||
|
"ImageNormalize_Neg1_To_1": ImageNormalize_Neg1_To_1
|
||||||
}
|
}
|
||||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||||
"INTConstant": "INT Constant",
|
"INTConstant": "INT Constant",
|
||||||
@ -3776,5 +3794,6 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
|||||||
"CondPassThrough": "CondPassThrough",
|
"CondPassThrough": "CondPassThrough",
|
||||||
"ImageUpscaleWithModelBatched": "ImageUpscaleWithModelBatched",
|
"ImageUpscaleWithModelBatched": "ImageUpscaleWithModelBatched",
|
||||||
"ScaleBatchPromptSchedule": "ScaleBatchPromptSchedule",
|
"ScaleBatchPromptSchedule": "ScaleBatchPromptSchedule",
|
||||||
"EffnetEncode": "EffnetEncode"
|
"EffnetEncode": "EffnetEncode",
|
||||||
|
"ImageNormalize_Neg1_To_1": "ImageNormalize_Neg1_To_1"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user