mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 22:35:09 +00:00
support TI embeds trained by WebUI(?)
This commit is contained in:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user