Last active
November 10, 2023 19:22
-
-
Save noskill/702a75de92390c576bf3db3ee2c425cb to your computer and use it in GitHub Desktop.
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
import os | |
from diffusers import StableDiffusionPipeline | |
import torch | |
model_id = "dreamlike-art/dreamlike-photoreal-2.0" | |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) | |
pipe = pipe.to("cuda") | |
prompt = "photo, a church in the middle of a field of crops, bright cinematic lighting, gopro, fisheye lens" | |
image = pipe(prompt).images[0] | |
image.save("./result.jpg") | |
print(f'saved image to {os.getcwd()}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment