mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-08 16:22:38 +08:00
sd: soft_empty_cache on tiler fallback
This doesnt cost a lot and creates the expected VRAM reduction in resource monitors when you fallback to tiler.
This commit is contained in:
parent
8458ae2686
commit
335532c25f
@ -978,6 +978,7 @@ class VAE:
|
|||||||
do_tile = True
|
do_tile = True
|
||||||
|
|
||||||
if do_tile:
|
if do_tile:
|
||||||
|
comfy.model_management.soft_empty_cache()
|
||||||
dims = samples_in.ndim - 2
|
dims = samples_in.ndim - 2
|
||||||
if dims == 1 or self.extra_1d_channel is not None:
|
if dims == 1 or self.extra_1d_channel is not None:
|
||||||
pixel_samples = self.decode_tiled_1d(samples_in)
|
pixel_samples = self.decode_tiled_1d(samples_in)
|
||||||
@ -1059,6 +1060,7 @@ class VAE:
|
|||||||
do_tile = True
|
do_tile = True
|
||||||
|
|
||||||
if do_tile:
|
if do_tile:
|
||||||
|
comfy.model_management.soft_empty_cache()
|
||||||
if self.latent_dim == 3:
|
if self.latent_dim == 3:
|
||||||
tile = 256
|
tile = 256
|
||||||
overlap = tile // 4
|
overlap = tile // 4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user