Skip to content

Commit 536eb1a

Browse files
Apply suggestions from code review
1 parent d0c714a commit 536eb1a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/txt2img.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,7 @@ def main():
237237
if opt.fixed_code:
238238
start_code = torch.randn([opt.n_samples, opt.C, opt.H // opt.f, opt.W // opt.f], device=device)
239239

240-
print("start code", start_code.abs().sum())
241240
precision_scope = autocast if opt.precision=="autocast" else nullcontext
242-
precision_scope = nullcontext
243241
with torch.no_grad():
244242
with precision_scope("cuda"):
245243
with model.ema_scope():
@@ -288,6 +286,7 @@ def main():
288286
Image.fromarray(grid.astype(np.uint8)).save(os.path.join(outpath, f'grid-{grid_count:04}.png'))
289287
grid_count += 1
290288

289+
toc = time.time()
291290
image = x_samples_ddim.cpu().permute(0, 2, 3, 1).numpy()
292291

293292
# run safety checker

0 commit comments

Comments
 (0)