mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-10-16 13:07:11 +08:00
Make VAEDecodeTiled backward compatible by making overlap optional
This commit is contained in:
parent
bdeb1c171c
commit
446686e69f
15
nodes.py
15
nodes.py
@ -289,16 +289,21 @@ class VAEDecode:
|
|||||||
class VAEDecodeTiled:
|
class VAEDecodeTiled:
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
return {"required": {"samples": ("LATENT", ), "vae": ("VAE", ),
|
return {
|
||||||
"tile_size": ("INT", {"default": 512, "min": 128, "max": 4096, "step": 32}),
|
"required": {
|
||||||
"overlap": ("INT", {"default": 64, "min": 0, "max": 4096, "step": 32}),
|
"samples": ("LATENT", ),"vae": ("VAE", ),
|
||||||
}}
|
"tile_size": ("INT", {"default": 512, "min": 128, "max": 4096, "step": 32})
|
||||||
|
},
|
||||||
|
"optional": {
|
||||||
|
"overlap": ("INT", {"default": 64, "min": 0, "max": 4096, "step": 32})
|
||||||
|
}
|
||||||
|
}
|
||||||
RETURN_TYPES = ("IMAGE",)
|
RETURN_TYPES = ("IMAGE",)
|
||||||
FUNCTION = "decode"
|
FUNCTION = "decode"
|
||||||
|
|
||||||
CATEGORY = "_for_testing"
|
CATEGORY = "_for_testing"
|
||||||
|
|
||||||
def decode(self, vae, samples, tile_size, overlap):
|
def decode(self, vae, samples, tile_size, overlap=64):
|
||||||
if tile_size < overlap * 4:
|
if tile_size < overlap * 4:
|
||||||
overlap = tile_size // 4
|
overlap = tile_size // 4
|
||||||
images = vae.decode_tiled(samples["samples"], tile_x=tile_size // 8, tile_y=tile_size // 8, overlap=overlap // 8)
|
images = vae.decode_tiled(samples["samples"], tile_x=tile_size // 8, tile_y=tile_size // 8, overlap=overlap // 8)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user