mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
support TI embeds trained by WebUI(?)
This commit is contained in:
@@ -2300,7 +2300,10 @@ def main(args):
|
|||||||
else:
|
else:
|
||||||
data = torch.load(embeds_file, map_location="cpu")
|
data = torch.load(embeds_file, map_location="cpu")
|
||||||
|
|
||||||
|
if "string_to_param" in data:
|
||||||
|
data = data["string_to_param"]
|
||||||
embeds = next(iter(data.values()))
|
embeds = next(iter(data.values()))
|
||||||
|
|
||||||
if type(embeds) != torch.Tensor:
|
if type(embeds) != torch.Tensor:
|
||||||
raise ValueError(f"weight file does not contains Tensor / 重みファイルのデータがTensorではありません: {embeds_file}")
|
raise ValueError(f"weight file does not contains Tensor / 重みファイルのデータがTensorではありません: {embeds_file}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user