MCPcopy
hub / github.com/MeiGen-AI/InfiniteTalk / visual

Method visual

wan/modules/clip.py:527–542  ·  view source on GitHub ↗
(self, videos)

Source from the content-addressed store, hash-verified

525 clean='whitespace')
526
527 def visual(self, videos):
528 # preprocess
529 size = (self.model.image_size,) * 2
530 videos = torch.cat([
531 F.interpolate(
532 u.transpose(0, 1),
533 size=size,
534 mode='bicubic',
535 align_corners=False) for u in videos
536 ])
537 videos = self.transforms.transforms[-1](videos.mul_(0.5).add_(0.5))
538
539 # forward
540 with torch.cuda.amp.autocast(dtype=self.dtype):
541 out = self.model.visual(videos, use_31_block=True)
542 return out

Callers 4

generateMethod · 0.80
generateMethod · 0.80
generate_infinitetalkMethod · 0.80
forwardMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected