mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-23 18:40:22 -08:00
Simplify a bunch of len(x) > 0/len(x) == 0 style expressions
This commit is contained in:
parent
3e995778fc
commit
51864790fd
25 changed files with 47 additions and 48 deletions
|
|
@ -91,8 +91,9 @@ class VQModel(pl.LightningModule):
|
|||
del sd[k]
|
||||
missing, unexpected = self.load_state_dict(sd, strict=False)
|
||||
print(f"Restored from {path} with {len(missing)} missing and {len(unexpected)} unexpected keys")
|
||||
if len(missing) > 0:
|
||||
if missing:
|
||||
print(f"Missing Keys: {missing}")
|
||||
if unexpected:
|
||||
print(f"Unexpected Keys: {unexpected}")
|
||||
|
||||
def on_train_batch_end(self, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue