Skip to content

Commit b985178

Browse files
fix to numpy
1 parent 239ed0f commit b985178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/txt2img.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def main():
266266

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

271271
x_image = x_samples_ddim
272272
safety_checker_input = safety_feature_extractor(numpy_to_pil(x_image), return_tensors="pt")

0 commit comments

Comments
 (0)