final fixups to memory_cache

- fixed backwards calculation of minimum available memory
- only execute m.padding adjustment code once upon load
This commit is contained in:
Lincoln Stein
2022-10-12 15:56:06 -04:00
parent aa6aa68753
commit 1c102c71fc
2 changed files with 5 additions and 6 deletions

View File

@ -679,11 +679,6 @@ class Generate:
)
self._set_sampler()
for m in self.model.modules():
if isinstance(m, (nn.Conv2d, nn.ConvTranspose2d)):
m._orig_padding_mode = m.padding_mode
self.model_name = model_name
return self.model