diff --git a/comfy/ldm/genmo/vae/model.py b/comfy/ldm/genmo/vae/model.py index b68d48a..694b33a 100644 --- a/comfy/ldm/genmo/vae/model.py +++ b/comfy/ldm/genmo/vae/model.py @@ -78,7 +78,12 @@ class PConv3d(ops.Conv3d): # Apply padding. assert self.padding_mode == "replicate" # DEBUG mode = "constant" if self.padding_mode == "zeros" else self.padding_mode + is_mps_device = x.device.type == "mps" + if is_mps_device: + x = x.to("cpu") x = F.pad(x, (0, 0, 0, 0, pad_front, pad_back), mode=mode) + if is_mps_device: + x = x.to("mps") return super().forward(x)