delete params sooner
This commit is contained in:
@@ -45,8 +45,8 @@ class MinDalleTorch(MinDalleBase):
|
|||||||
is_encoder=True
|
is_encoder=True
|
||||||
)
|
)
|
||||||
self.encoder.load_state_dict(params, strict=False)
|
self.encoder.load_state_dict(params, strict=False)
|
||||||
if torch.cuda.is_available(): self.encoder = self.encoder.cuda()
|
|
||||||
del params
|
del params
|
||||||
|
if torch.cuda.is_available(): self.encoder = self.encoder.cuda()
|
||||||
|
|
||||||
|
|
||||||
def init_decoder(self):
|
def init_decoder(self):
|
||||||
@@ -69,8 +69,8 @@ class MinDalleTorch(MinDalleBase):
|
|||||||
is_encoder=False
|
is_encoder=False
|
||||||
)
|
)
|
||||||
self.decoder.load_state_dict(params, strict=False)
|
self.decoder.load_state_dict(params, strict=False)
|
||||||
if torch.cuda.is_available(): self.decoder = self.decoder.cuda()
|
|
||||||
del params
|
del params
|
||||||
|
if torch.cuda.is_available(): self.decoder = self.decoder.cuda()
|
||||||
|
|
||||||
|
|
||||||
def init_detokenizer(self):
|
def init_detokenizer(self):
|
||||||
|
Reference in New Issue
Block a user