Spaces:
Runtime error
Runtime error
removed callback outdir references
Browse files
sd.py
CHANGED
|
@@ -574,13 +574,13 @@ class SamplerCallback(object):
|
|
| 574 |
self.verbose = verbose
|
| 575 |
|
| 576 |
self.batch_size = args.n_samples
|
| 577 |
-
self.save_sample_per_step = args.save_sample_per_step
|
| 578 |
-
self.show_sample_per_step = args.show_sample_per_step
|
| 579 |
-
self.paths_to_image_steps = [os.path.join( args.outdir, f"{args.timestring}_{index:02}_{args.seed}") for index in range(args.n_samples) ]
|
| 580 |
|
| 581 |
-
if self.save_sample_per_step:
|
| 582 |
-
|
| 583 |
-
|
| 584 |
|
| 585 |
self.step_index = 0
|
| 586 |
|
|
@@ -630,7 +630,7 @@ class SamplerCallback(object):
|
|
| 630 |
new_img = init_noise * torch.where(is_masked,1,0) + args_dict['x'] * torch.where(is_masked,0,1)
|
| 631 |
args_dict['x'].copy_(new_img)
|
| 632 |
|
| 633 |
-
self.view_sample_step(args_dict['denoised'], "x0_pred")
|
| 634 |
|
| 635 |
# Callback for Compvis samplers
|
| 636 |
# Function that is called on the image (img) and step (i) at each step
|
|
@@ -648,4 +648,4 @@ class SamplerCallback(object):
|
|
| 648 |
new_img = init_noise * torch.where(is_masked,1,0) + img * torch.where(is_masked,0,1)
|
| 649 |
img.copy_(new_img)
|
| 650 |
|
| 651 |
-
self.view_sample_step(img, "x")
|
|
|
|
| 574 |
self.verbose = verbose
|
| 575 |
|
| 576 |
self.batch_size = args.n_samples
|
| 577 |
+
#self.save_sample_per_step = args.save_sample_per_step
|
| 578 |
+
#self.show_sample_per_step = args.show_sample_per_step
|
| 579 |
+
#self.paths_to_image_steps = [os.path.join( args.outdir, f"{args.timestring}_{index:02}_{args.seed}") for index in range(args.n_samples) ]
|
| 580 |
|
| 581 |
+
#if self.save_sample_per_step:
|
| 582 |
+
# for path in self.paths_to_image_steps:
|
| 583 |
+
# os.makedirs(path, exist_ok=True)
|
| 584 |
|
| 585 |
self.step_index = 0
|
| 586 |
|
|
|
|
| 630 |
new_img = init_noise * torch.where(is_masked,1,0) + args_dict['x'] * torch.where(is_masked,0,1)
|
| 631 |
args_dict['x'].copy_(new_img)
|
| 632 |
|
| 633 |
+
#self.view_sample_step(args_dict['denoised'], "x0_pred")
|
| 634 |
|
| 635 |
# Callback for Compvis samplers
|
| 636 |
# Function that is called on the image (img) and step (i) at each step
|
|
|
|
| 648 |
new_img = init_noise * torch.where(is_masked,1,0) + img * torch.where(is_masked,0,1)
|
| 649 |
img.copy_(new_img)
|
| 650 |
|
| 651 |
+
#self.view_sample_step(img, "x")
|