Merge pull request #8878 from butaixianran/master
Fix None type error for TI module
This commit is contained in:
commit
724a63714d
|
@ -152,7 +152,11 @@ class EmbeddingDatabase:
|
||||||
name = data.get('name', name)
|
name = data.get('name', name)
|
||||||
else:
|
else:
|
||||||
data = extract_image_data_embed(embed_image)
|
data = extract_image_data_embed(embed_image)
|
||||||
name = data.get('name', name)
|
if data:
|
||||||
|
name = data.get('name', name)
|
||||||
|
else:
|
||||||
|
# if data is None, means this is not an embeding, just a preview image
|
||||||
|
return
|
||||||
elif ext in ['.BIN', '.PT']:
|
elif ext in ['.BIN', '.PT']:
|
||||||
data = torch.load(path, map_location="cpu")
|
data = torch.load(path, map_location="cpu")
|
||||||
elif ext in ['.SAFETENSORS']:
|
elif ext in ['.SAFETENSORS']:
|
||||||
|
|
Loading…
Reference in New Issue