Added ImpactLatentInfo (#402)

This commit is contained in:
narukaze132
2023-12-29 07:40:13 +09:00
committed by GitHub
parent 9d22e7e55c
commit c5cdfa2f40
2 changed files with 21 additions and 0 deletions
+1
View File
@@ -288,6 +288,7 @@ NODE_CLASS_MAPPINGS = {
"ImpactValueSender": ImpactValueSender,
"ImpactValueReceiver": ImpactValueReceiver,
"ImpactImageInfo": ImpactImageInfo,
"ImpactLatentInfo": ImpactLatentInfo,
"ImpactMinMax": ImpactMinMax,
"ImpactNeg": ImpactNeg,
"ImpactConditionalStopIteration": ImpactConditionalStopIteration,
+20
View File
@@ -248,6 +248,26 @@ class ImpactImageInfo:
return (value.shape[0], value.shape[1], value.shape[2], value.shape[3])
class ImpactLatentInfo:
@classmethod
def INPUT_TYPES(cls):
return {"required": {
"value": ("LATENT", ),
},
}
FUNCTION = "doit"
CATEGORY = "ImpactPack/Logic/_for_test"
RETURN_TYPES = ("INT", "INT", "INT", "INT")
RETURN_NAMES = ("batch", "height", "width", "channel")
def doit(self, value):
shape = value['samples'].shape
return (shape[0], shape[2] * 8, shape[3] * 8, shape[1])
class ImpactMinMax:
@classmethod
def INPUT_TYPES(cls):