MCPcopy Create free account
hub / github.com/Francis-Rings/FlashPortrait / _encode

Method _encode

wan/models/wan_vae.py:661–667  ·  view source on GitHub ↗
(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

659 raise ValueError("Invalid set gradient checkpointing")
660
661 def _encode(self, x: torch.Tensor) -> torch.Tensor:
662 x = [
663 self.model.encode(u.unsqueeze(0), self.scale).squeeze(0)
664 for u in x
665 ]
666 x = torch.stack(x)
667 return x
668
669 @apply_forward_hook
670 def encode(

Callers 1

encodeMethod · 0.95

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected