Skip to content

Commit

Permalink
fix to numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickvonplaten committed Aug 19, 2022
1 parent 239ed0f commit b985178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/txt2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def main():

x_samples_ddim = model.decode_first_stage(samples_ddim)
x_samples_ddim = torch.clamp((x_samples_ddim + 1.0) / 2.0, min=0.0, max=1.0)
x_samples_ddim = x_samples_ddim.cpu().permute(0, 2, 3, 1)
x_samples_ddim = x_samples_ddim.cpu().permute(0, 2, 3, 1).numpy()

x_image = x_samples_ddim
safety_checker_input = safety_feature_extractor(numpy_to_pil(x_image), return_tensors="pt")
Expand Down

0 comments on commit b985178

Please sign in to comment.