mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-18 01:04:36 +08:00
Move RemapDepth to marigold repo
This commit is contained in:
parent
431c8d57aa
commit
004c4120e8
29
nodes.py
29
nodes.py
@ -2732,29 +2732,6 @@ class GenerateNoise:
|
|||||||
noise = noise[0].repeat(batch_size, 1, 1, 1)
|
noise = noise[0].repeat(batch_size, 1, 1, 1)
|
||||||
return ({"samples":noise}, )
|
return ({"samples":noise}, )
|
||||||
|
|
||||||
class RemapDepth:
|
|
||||||
@classmethod
|
|
||||||
def INPUT_TYPES(s):
|
|
||||||
return {"required": {
|
|
||||||
"image": ("IMAGE",),
|
|
||||||
"min": ("FLOAT", {"default": 0.0,"min": -10.0, "max": 1.0, "step": 0.01}),
|
|
||||||
"max": ("FLOAT", {"default": 1.0,"min": 0.0, "max": 10.0, "step": 0.01}),
|
|
||||||
"clamp": ("BOOLEAN", {"default": True}),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN_TYPES = ("IMAGE",)
|
|
||||||
FUNCTION = "remap"
|
|
||||||
|
|
||||||
CATEGORY = "KJNodes/noise"
|
|
||||||
|
|
||||||
def remap(self, image, min, max, clamp):
|
|
||||||
|
|
||||||
image = min + image * (max - min)
|
|
||||||
if clamp:
|
|
||||||
image = torch.clamp(image, min=0.0, max=1.0)
|
|
||||||
return (image, )
|
|
||||||
|
|
||||||
NODE_CLASS_MAPPINGS = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
"INTConstant": INTConstant,
|
"INTConstant": INTConstant,
|
||||||
"FloatConstant": FloatConstant,
|
"FloatConstant": FloatConstant,
|
||||||
@ -2806,8 +2783,7 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
"AddLabel": AddLabel,
|
"AddLabel": AddLabel,
|
||||||
"ReferenceOnlySimple3": ReferenceOnlySimple3,
|
"ReferenceOnlySimple3": ReferenceOnlySimple3,
|
||||||
"SoundReactive": SoundReactive,
|
"SoundReactive": SoundReactive,
|
||||||
"GenerateNoise": GenerateNoise,
|
"GenerateNoise": GenerateNoise
|
||||||
"RemapDepth": RemapDepth,
|
|
||||||
}
|
}
|
||||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||||
"INTConstant": "INT Constant",
|
"INTConstant": "INT Constant",
|
||||||
@ -2859,6 +2835,5 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
|||||||
"AddLabel": "AddLabel",
|
"AddLabel": "AddLabel",
|
||||||
"ReferenceOnlySimple3": "ReferenceOnlySimple3",
|
"ReferenceOnlySimple3": "ReferenceOnlySimple3",
|
||||||
"SoundReactive": "SoundReactive",
|
"SoundReactive": "SoundReactive",
|
||||||
"GenerateNoise": "GenerateNoise",
|
"GenerateNoise": "GenerateNoise"
|
||||||
"RemapDepth": "RemapDepth",
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user