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

Method forward

wan/models/wan_image_encoder.py:408–418  ·  view source on GitHub ↗

imgs: [B, 3, H, W] of torch.float32. - mean: [0.48145466, 0.4578275, 0.40821073] - std: [0.26862954, 0.26130258, 0.27577711] txt_ids: [B, L] of torch.long. Encoded by data.CLIPTokenizer.

(self, imgs, txt_ids)

Source from the content-addressed store, hash-verified

406 self.log_scale = nn.Parameter(math.log(1 / 0.07) * torch.ones([]))
407
408 def forward(self, imgs, txt_ids):
409 """
410 imgs: [B, 3, H, W] of torch.float32.
411 - mean: [0.48145466, 0.4578275, 0.40821073]
412 - std: [0.26862954, 0.26130258, 0.27577711]
413 txt_ids: [B, L] of torch.long.
414 Encoded by data.CLIPTokenizer.
415 """
416 xi = self.visual(imgs)
417 xt = self.textual(txt_ids)
418 return xi, xt
419
420 def param_groups(self):
421 groups = [{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected