support TI embeds trained by WebUI(?)

This commit is contained in:
Kohya S
2023-03-24 20:46:42 +09:00
parent b2c5b96f2a
commit e203270e31

View File

@@ -2300,7 +2300,10 @@ def main(args):
else:
data = torch.load(embeds_file, map_location="cpu")
if "string_to_param" in data:
data = data["string_to_param"]
embeds = next(iter(data.values()))
if type(embeds) != torch.Tensor:
raise ValueError(f"weight file does not contains Tensor / 重みファイルのデータがTensorではありません: {embeds_file}")