Files
Derfuu-Derfuu_ComfyUI_Modde…/components/sizes.py
T
Derfuu cc43376402 Updated to last ComfyUI version (on 26.03.23) to use conversion between fields and connection points
- Fixed types issues
- Added:
 - Int2Tuple node
- Deleted due to last ComfyUI update which made them nearly useless now:
 - ConditioningSetAreaEXT (modded)
 - EmptyLatentImage (modded)
- NOT Deleted, but now might be useless (IMHO):
 - LatentComposite (modded)
 - ConditioningSetArea (modded)
- TUPLES moved to their own subfolder in UI
- ALL custom nodes with FLOAT, INT, STRING values now can use their own fields as inputs (use original conversion to points to connect)
- Refactored nearly all code... again
2023-03-26 20:20:41 +03:00

13 lines
380 B
Python

def get_latent_size(LATENT, ORIGINAL_VALUES=False):
lc = LATENT.copy()
size = lc["samples"].shape[3], lc["samples"].shape[2]
if ORIGINAL_VALUES == False:
size = size[0] * 8, size[1] * 8
return size
def get_image_size(IMAGE):
samples = IMAGE.movedim(-1, 1)
size = samples.shape[3], samples.shape[2]
# size = size.movedim(1, -1)
return size