Replies: 2 comments
-
You can use pipeline = StableDiffusionXLPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
torch_dtype=torch.float16,
variant="fp16",
).to("cuda")
generator = torch.Generator(device="cpu").manual_seed(0)
tensor = pipeline(
prompt="a cat", negative_prompt="", num_inference_steps=20, generator=generator, output_type="pt"
).images[0] |
Beta Was this translation helpful? Give feedback.
0 replies
-
It works, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I was wondering if there's a way that when doing inference
image = pipe(prompt).images[0]
it returns the image as Tensor array instead of the options of a numpy array or a pil image.Thanks,
Joan
Beta Was this translation helpful? Give feedback.
All reactions