Skip to content

Commit

Permalink
Fix some merge mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
KohakuBlueleaf committed Aug 5, 2023
1 parent d56a9cf commit b85ec2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ def save_intermediate(image, index):
batch_images.append(image)

decoded_samples = torch.from_numpy(np.array(batch_images))
decoded_samples = decoded_samples.to(shared.device)
decoded_samples = decoded_samples.to(shared.device, dtype=devices.dtype_vae)

self.extra_generation_params['VAE Encoder'] = opts.sd_vae_encode_method
samples = images_tensor_to_samples(decoded_samples, approximation_indexes.get(opts.sd_vae_encode_method))
Expand Down Expand Up @@ -1374,6 +1374,7 @@ def init(self, all_prompts, all_seeds, all_subseeds):
raise RuntimeError(f"bad number of images passed: {len(imgs)}; expecting {self.batch_size} or less")

image = torch.from_numpy(batch_images)
image = image.to(shared.device, dtype=devices.dtype_vae)
self.extra_generation_params['VAE Encoder'] = opts.sd_vae_encode_method
self.init_latent = images_tensor_to_samples(image, approximation_indexes.get(opts.sd_vae_encode_method), self.sd_model)
devices.torch_gc()
Expand Down

0 comments on commit b85ec2b

Please sign in to comment.