mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-16 00:04:35 +08:00
Update nodes.py
This commit is contained in:
parent
a8c1a707a9
commit
8dbfddc5ec
22
nodes.py
22
nodes.py
@ -2891,6 +2891,26 @@ class StableZero123_BatchSchedule:
|
|||||||
|
|
||||||
latent = torch.zeros([batch_size, 4, height // 8, width // 8])
|
latent = torch.zeros([batch_size, 4, height // 8, width // 8])
|
||||||
return (final_positive, final_negative, {"samples": latent})
|
return (final_positive, final_negative, {"samples": latent})
|
||||||
|
|
||||||
|
class ImageBatchRepeatEveryNth:
|
||||||
|
|
||||||
|
RETURN_TYPES = ("IMAGE",)
|
||||||
|
FUNCTION = "repeat"
|
||||||
|
CATEGORY = "KJNodes"
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {
|
||||||
|
"required": {
|
||||||
|
"images": ("IMAGE",),
|
||||||
|
"repeats": ("INT", {"default": 1, "min": 1, "max": 4096}),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
def repeat(self, images, repeats):
|
||||||
|
|
||||||
|
repeated_images = torch.repeat_interleave(images, repeats=repeats, dim=0)
|
||||||
|
return (repeated_images, )
|
||||||
|
|
||||||
NODE_CLASS_MAPPINGS = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
"INTConstant": INTConstant,
|
"INTConstant": INTConstant,
|
||||||
@ -2945,6 +2965,7 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
"SoundReactive": SoundReactive,
|
"SoundReactive": SoundReactive,
|
||||||
"GenerateNoise": GenerateNoise,
|
"GenerateNoise": GenerateNoise,
|
||||||
"StableZero123_BatchSchedule": StableZero123_BatchSchedule,
|
"StableZero123_BatchSchedule": StableZero123_BatchSchedule,
|
||||||
|
"ImageBatchRepeatEveryNth": ImageBatchRepeatEveryNth
|
||||||
}
|
}
|
||||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||||
"INTConstant": "INT Constant",
|
"INTConstant": "INT Constant",
|
||||||
@ -2998,4 +3019,5 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
|||||||
"SoundReactive": "SoundReactive",
|
"SoundReactive": "SoundReactive",
|
||||||
"GenerateNoise": "GenerateNoise",
|
"GenerateNoise": "GenerateNoise",
|
||||||
"StableZero123_BatchSchedule": "StableZero123_BatchSchedule",
|
"StableZero123_BatchSchedule": "StableZero123_BatchSchedule",
|
||||||
|
"ImageBatchRepeatEveryNth": "ImageBatchRepeatEveryNth"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user