fixed wrong file path
This commit is contained in:
parent
fffd0f2b83
commit
7bf76deafb
|
@ -129,7 +129,7 @@ def convert_and_save_torch_params(is_mega: bool, model_path: str):
|
|||
encoder_params[i] = encoder_params[i].to(torch.float16)
|
||||
|
||||
detoker_params = load_vqgan_torch_params('./pretrained/vqgan')
|
||||
detoker_path = os.path.join('pretrained', 'vqgan', 'detokenizer.pt')
|
||||
detoker_path = os.path.join('pretrained', 'vqgan', 'detoker.pt')
|
||||
|
||||
torch.save(encoder_params, os.path.join(model_path, 'encoder.pt'))
|
||||
torch.save(decoder_params, os.path.join(model_path, 'decoder.pt'))
|
||||
|
|
|
@ -3,7 +3,6 @@ import json
|
|||
import numpy
|
||||
|
||||
from .text_tokenizer import TextTokenizer
|
||||
from .models.vqgan_detokenizer import VQGanDetokenizer
|
||||
|
||||
class MinDalleBase:
|
||||
def __init__(self, is_mega: bool):
|
||||
|
|
|
@ -27,7 +27,7 @@ class MinDalleTorch(MinDalleBase):
|
|||
|
||||
self.encoder_params_path = os.path.join(self.model_path, 'encoder.pt')
|
||||
self.decoder_params_path = os.path.join(self.model_path, 'decoder.pt')
|
||||
self.detoker_params_path = os.path.join('pretrained', 'vqgan', 'detokenizer.pt')
|
||||
self.detoker_params_path = os.path.join('pretrained', 'vqgan', 'detoker.pt')
|
||||
|
||||
is_converted = os.path.exists(self.encoder_params_path)
|
||||
is_converted &= os.path.exists(self.decoder_params_path)
|
||||
|
|
Loading…
Reference in New Issue
Block a user