Views
No views yet

1from diffusers import StableDiffusionPipeline
2import torch
3
4model_id = "vinesmsuic/bg-visualnovel-v03"
5pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
6pipe = pipe.to("cuda")
7
8prompt = "a classroom"
9image = pipe(prompt, height=512, width=512).images[0]
10# ^ alternatively you can use for height=1920, width=1080 if you have enough CUDA memory
11# make sure both height and width are divisible by 8
12image.save("./classroom.png")
13
14prompt = "a hospital building, two trees"
15image = pipe(prompt, height=512, width=512).images[0]
16
17image.save("./hospital.png")
18
19prompt = "a street at night with nobody around"
20image = pipe(prompt, height=512, width=512).images[0]
21
22image.save("./nightstreet.png")




