1
0
Fork 0

use correct fn to make dirs

This commit is contained in:
Sean Sube 2023-02-21 22:50:59 -06:00
parent 3dfaef041e
commit 45f5fca383
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
from os import mkdirs, path from os import makedirs, path
from huggingface_hub.file_download import hf_hub_download from huggingface_hub.file_download import hf_hub_download
from transformers import CLIPTokenizer, CLIPTextModel from transformers import CLIPTokenizer, CLIPTextModel
from torch.onnx import export from torch.onnx import export
@ -18,7 +18,7 @@ def convert_diffusion_textual_inversion(context: ConversionContext, name: str, b
if path.exists(dest_path): if path.exists(dest_path):
logger.info("ONNX model already exists, skipping.") logger.info("ONNX model already exists, skipping.")
mkdirs(path.join(dest_path, "text_encoder")) makedirs(path.join(dest_path, "text_encoder"))
embeds_file = hf_hub_download(repo_id=inversion, filename="learned_embeds.bin") embeds_file = hf_hub_download(repo_id=inversion, filename="learned_embeds.bin")
token_file = hf_hub_download(repo_id=inversion, filename="token_identifier.txt") token_file = hf_hub_download(repo_id=inversion, filename="token_identifier.txt")