mirror of
https://github.com/CompVis/stable-diffusion.git
synced 2026-04-12 03:43:34 +00:00
fix to numpy
This commit is contained in:
parent
239ed0fd02
commit
b9851783e5
@ -266,7 +266,7 @@ def main():
|
|||||||
|
|
||||||
x_samples_ddim = model.decode_first_stage(samples_ddim)
|
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 = 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
|
x_image = x_samples_ddim
|
||||||
safety_checker_input = safety_feature_extractor(numpy_to_pil(x_image), return_tensors="pt")
|
safety_checker_input = safety_feature_extractor(numpy_to_pil(x_image), return_tensors="pt")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user