Remove the forced no grad on vae decode for moss so it can be used with DFEs
This commit is contained in:
1 parent
7cc9fef469
commit
7861f92b13
1 file changed
-1
@@ -629,7 +629,6 @@ class MossImageModel(BaseModel):
|
|||||||
batch = torch.stack([img.to(device, dtype=self.vae.dtype) for img in image_list])
|
batch = torch.stack([img.to(device, dtype=self.vae.dtype) for img in image_list])
|
||||||
return self.vae.encode(batch).to(device, dtype=dtype)
|
return self.vae.encode(batch).to(device, dtype=dtype)
|
||||||
|
|
||||||
@torch.no_grad()
|
|
||||||
def decode_latents(self, latents: torch.Tensor, device=None, dtype=None):
|
def decode_latents(self, latents: torch.Tensor, device=None, dtype=None):
|
||||||
if device is None:
|
if device is None:
|
||||||
device = self.vae_device_torch
|
device = self.vae_device_torch
|
||||||
|
|||||||
Reference in new issue
Block a user