Spaces:
Running
Running
Delete app.py
Browse files
app.py
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
import torch
|
2 |
-
from diffusers import StableDiffusionXLImg2ImgPipeline
|
3 |
-
from diffusers.utils import load_image
|
4 |
-
|
5 |
-
pipe = StableDiffusionXLImg2ImgPipeline.from_pretrained(
|
6 |
-
"stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
|
7 |
-
)
|
8 |
-
pipe = pipe.to("cuda")
|
9 |
-
url = "https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/aa_xl/000000009.png"
|
10 |
-
|
11 |
-
init_image = load_image(url).convert("RGB")
|
12 |
-
prompt = "a photo of an astronaut riding a horse on mars"
|
13 |
-
image = pipe(prompt, image=init_image).images
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|