MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / load_from_pretrained

Method load_from_pretrained

vtp/utils/lpips.py:78–82  ·  view source on GitHub ↗
(self, name="vgg_lpips")

Source from the content-addressed store, hash-verified

76 param.requires_grad = False
77
78 def load_from_pretrained(self, name="vgg_lpips"):
79 ckpt = get_ckpt_path(name)
80 self.load_state_dict(
81 torch.load(ckpt, map_location=torch.device("cpu")), strict=False
82 )
83
84 def forward(self, input, target):
85 in0_input, in1_input = (self.scaling_layer(input), self.scaling_layer(target))

Callers 1

__init__Method · 0.95

Calls 1

get_ckpt_pathFunction · 0.85

Tested by

no test coverage detected