Upload folder using huggingface_hub
Browse files- sampler.py +1 -1
sampler.py
CHANGED
@@ -117,7 +117,7 @@ class BaseSampler:
|
|
117 |
self.autoencoder = None
|
118 |
|
119 |
def load_model(self, model, ckpt_path=None):
|
120 |
-
state = torch.load(ckpt_path, map_location=
|
121 |
if 'state_dict' in state:
|
122 |
state = state['state_dict']
|
123 |
util_net.reload_model(model, state)
|
|
|
117 |
self.autoencoder = None
|
118 |
|
119 |
def load_model(self, model, ckpt_path=None):
|
120 |
+
state = torch.load(ckpt_path, map_location=torch.device('cpu'))
|
121 |
if 'state_dict' in state:
|
122 |
state = state['state_dict']
|
123 |
util_net.reload_model(model, state)
|