mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-16 08:22:36 +08:00
Handle latent dim difference for image model in the VAE instead
This commit is contained in:
parent
653ad84203
commit
4acd51abab
@ -1690,6 +1690,3 @@ class Kandinsky5_image(Kandinsky5):
|
|||||||
|
|
||||||
def concat_cond(self, **kwargs):
|
def concat_cond(self, **kwargs):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def process_latent_out(self, latent): # input is still 5D, return single frame to decode with Flux VAE
|
|
||||||
return self.latent_format.process_out(latent)[:, :, 0]
|
|
||||||
|
|||||||
@ -742,6 +742,8 @@ class VAE:
|
|||||||
self.throw_exception_if_invalid()
|
self.throw_exception_if_invalid()
|
||||||
pixel_samples = None
|
pixel_samples = None
|
||||||
do_tile = False
|
do_tile = False
|
||||||
|
if self.latent_dim == 2 and samples_in.ndim == 5:
|
||||||
|
samples_in = samples_in[:, :, 0]
|
||||||
try:
|
try:
|
||||||
memory_used = self.memory_used_decode(samples_in.shape, self.vae_dtype)
|
memory_used = self.memory_used_decode(samples_in.shape, self.vae_dtype)
|
||||||
model_management.load_models_gpu([self.patcher], memory_required=memory_used, force_full_load=self.disable_offload)
|
model_management.load_models_gpu([self.patcher], memory_required=memory_used, force_full_load=self.disable_offload)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user