summaryrefslogtreecommitdiffstats
path: root/training
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-12-24 08:36:30 +0100
committerVolpeon <git@volpeon.ink>2022-12-24 08:36:30 +0100
commit0ef0575e458029232761a74e4207082f1af029b0 (patch)
treeabf80268eadc91ad409969064a30c409591f2050 /training
parentFix again (diff)
downloadtextual-inversion-diff-0ef0575e458029232761a74e4207082f1af029b0.tar.gz
textual-inversion-diff-0ef0575e458029232761a74e4207082f1af029b0.tar.bz2
textual-inversion-diff-0ef0575e458029232761a74e4207082f1af029b0.zip
Fix
Diffstat (limited to 'training')
-rw-r--r--training/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/training/util.py b/training/util.py
index a80e44f..5c056a6 100644
--- a/training/util.py
+++ b/training/util.py
@@ -74,7 +74,7 @@ class CheckpointerBase:
74 generator=generator, 74 generator=generator,
75 ) 75 )
76 76
77 grid_cols = max(self.sample_batch_size, 4) 77 grid_cols = min(self.sample_batch_size, 4)
78 grid_rows = (self.sample_batches * self.sample_batch_size) // grid_cols 78 grid_rows = (self.sample_batches * self.sample_batch_size) // grid_cols
79 79
80 with torch.autocast("cuda"), torch.inference_mode(): 80 with torch.autocast("cuda"), torch.inference_mode():