jpjp9292 commited on
Commit
72d6623
ยท
verified ยท
1 Parent(s): d2cade4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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="fp16", use_safetensors=True)
 
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=20, # ์ถ”๋ก  ๋‹จ๊ณ„๋ฅผ 20์œผ๋กœ ์„ค์ •ํ•˜์—ฌ ์‹œ๊ฐ„ ๋‹จ์ถ•
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(