Open Richardhrz opened 1 year ago
_MODELS={} is empty, so return _MODELS[name] has nothing to do. what form of data should be put int the dict?
Hello, I meet the same issue as yours, could you tell me how to do if you resolve it? Thank you so much.
import all the models in the jupyter file. _MODEL{} is not a global variable.
hello author, when I tried to run the checkpoint, an error occured:
KeyError Traceback (most recent call last) Cell In[12], line 34 30 inverse_scaler = datasets.get_data_inverse_scaler(config) 32 # print(config) ---> 34 score_model = mutils.create_model(config) 36 optimizer = get_optimizer(config, score_model.parameters()) 37 ema = ExponentialMovingAverage(score_model.parameters(), 38 decay=config.model.ema_rate)
File /score_sde_pytorch-main/models/utils.py:94, in create_model(config) 92 model_name = config.model.name 93 print(model_name) # ncsnpp ---> 94 score_model = get_model(model_name)(config) 95 score_model = score_model.to(config.device) 96 score_model = torch.nn.DataParallel(score_model)
File /score_sde_pytorch-main/models/utils.py:48, in get_model(name) 46 def get_model(name): 47 print(_MODELS) ---> 48 return _MODELS[name] 52 def get_sigmas(config):
KeyError: 'ncsnpp'
any suggestion would be grateful.