Created
November 7, 2023 08:19
-
-
Save noskill/1d4554812968a0cf4f34f89d197c0cc6 to your computer and use it in GitHub Desktop.
hello world in diffusers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from diffusers import StableDiffusionPipeline | |
pipe = StableDiffusionPipeline.from_pretrained("hf-internal-testing/tiny-stable-diffusion-torch") | |
prompt = "a photo of an astronaut riding a horse on mars" | |
pipe.enable_attention_slicing() | |
image = pipe(prompt).images[0] | |
print(image) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment