MCPcopy
hub / github.com/Wan-Video/Wan2.2 / encode

Method encode

wan/modules/vae2_2.py:1024–1036  ·  view source on GitHub ↗
(self, videos)

Source from the content-addressed store, hash-verified

1022 ).eval().requires_grad_(False).to(device))
1023
1024 def encode(self, videos):
1025 try:
1026 if not isinstance(videos, list):
1027 raise TypeError("videos should be a list")
1028 with amp.autocast(dtype=self.dtype):
1029 return [
1030 self.model.encode(u.unsqueeze(0),
1031 self.scale).float().squeeze(0)
1032 for u in videos
1033 ]
1034 except TypeError as e:
1035 logging.info(e)
1036 return None
1037
1038 def decode(self, zs):
1039 try:

Callers

nothing calls this directly

Calls 2

squeezeMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected