3 ms·
I tried doing this on my own laptop a few weeks ago using Hugging Face diffusers - https://github.com/huggingface/diffusers https://github.com/huggingface/diffu
by simonw 4y ago
I tried doing this on my own laptop a few weeks ago using Hugging Face diffusers - https://github.com/huggingface/diffusers https://github.com/huggingface/diffusers
Here's the code:
from diffusers import DiffusionPipeline
ldm = DiffusionPipeline.from_pretrained(
"CompVis/ldm-text2im-large-256"
)
output = ldm(
["a painting of a raccoon reading a book"],
num_inference_steps=50,
eta=0.3,
guidance_scale=6
)
output["sample"][0].save("image.png")
This took 5m25s to run on my laptop (no GPU configured) and produced a recognisable image of a Raccoon reading a book. I tweeted the resulting image here: https://twitter.com/simonw/status/1550143524179288064 https://twitter.com/simonw/status/1550143524179288064