Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,8 @@ import torch
|
|
| 7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 8 |
|
| 9 |
if torch.cuda.is_available():
|
| 10 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="
|
|
|
|
| 11 |
pipe.enable_xformers_memory_efficient_attention()
|
| 12 |
pipe = pipe.to(device)
|
| 13 |
else:
|
|
@@ -36,10 +37,8 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
| 36 |
return image
|
| 37 |
|
| 38 |
examples = [
|
| 39 |
-
"Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
|
| 40 |
"A playful Australian Shepherd dog running around in Central Park",
|
| 41 |
"A tempting slice of Basque cheesecake",
|
| 42 |
-
"์ ๊ธ์ ์๋ ์ฐ์ฃผ ๋นํ์ฌ, ์ฐจ๊ฐ์ด ์ ํ๋ ํธ, muted ์์, ์์ธํ, 8k",
|
| 43 |
"์ผํธ๋ดํํฌ์์ ๋ฐ์ด ๋๊ณ ์๋ ์ค์คํธ๋ ์ผ๋ฆฌ์ธ ์
ฐํผ๋ ๊ฐ์์ง ",
|
| 44 |
"๋ง์๋ ๋ฐ์คํฌ ์น์ฆ์ผ์ดํฌ ์กฐ๊ฐ",
|
| 45 |
]
|
|
@@ -131,7 +130,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 131 |
minimum=1,
|
| 132 |
maximum=50,
|
| 133 |
step=1,
|
| 134 |
-
value=
|
| 135 |
)
|
| 136 |
|
| 137 |
gr.Examples(
|
|
|
|
| 7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 8 |
|
| 9 |
if torch.cuda.is_available():
|
| 10 |
+
# pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp32", use_safetensors=True)
|
| 11 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp32", use_safetensors=True)
|
| 12 |
pipe.enable_xformers_memory_efficient_attention()
|
| 13 |
pipe = pipe.to(device)
|
| 14 |
else:
|
|
|
|
| 37 |
return image
|
| 38 |
|
| 39 |
examples = [
|
|
|
|
| 40 |
"A playful Australian Shepherd dog running around in Central Park",
|
| 41 |
"A tempting slice of Basque cheesecake",
|
|
|
|
| 42 |
"์ผํธ๋ดํํฌ์์ ๋ฐ์ด ๋๊ณ ์๋ ์ค์คํธ๋ ์ผ๋ฆฌ์ธ ์
ฐํผ๋ ๊ฐ์์ง ",
|
| 43 |
"๋ง์๋ ๋ฐ์คํฌ ์น์ฆ์ผ์ดํฌ ์กฐ๊ฐ",
|
| 44 |
]
|
|
|
|
| 130 |
minimum=1,
|
| 131 |
maximum=50,
|
| 132 |
step=1,
|
| 133 |
+
value=10, # ์ถ๋ก ๋จ๊ณ๋ฅผ 10์ผ๋ก ์ค์ ํ์ฌ ์๊ฐ ๋จ์ถ
|
| 134 |
)
|
| 135 |
|
| 136 |
gr.Examples(
|