Spaces:
Runtime error
Runtime error
weifeng-chen
commited on
Commit
โข
2b8b583
1
Parent(s):
da639ee
update
Browse files- app.py +2 -2
- requirements.txt +1 -0
app.py
CHANGED
@@ -3,7 +3,7 @@ from diffusers import StableDiffusionPipeline
|
|
3 |
# from PIL import Image
|
4 |
|
5 |
|
6 |
-
device="
|
7 |
model_id = "IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1"
|
8 |
|
9 |
# pipe_img2img = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, tokenizer=tokenizer, text_encoder=text_encoder, vae=vae, unet=unet).to(device)
|
@@ -30,4 +30,4 @@ gr.Interface(fn=infer, inputs=
|
|
30 |
gr.Slider(10, 30, value = 20, step = 1, label = '่ฟญไปฃๆฌกๆฐ'),
|
31 |
gr.Slider(256, 768, value = 512, step = 64, label = 'ๅฎฝๅบฆ'),
|
32 |
gr.Slider(256, 768, value = 512, step = 64, label = '้ซๅบฆ'),
|
33 |
-
],outputs='image').queue(
|
|
|
3 |
# from PIL import Image
|
4 |
|
5 |
|
6 |
+
device="cpu"
|
7 |
model_id = "IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1"
|
8 |
|
9 |
# pipe_img2img = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, tokenizer=tokenizer, text_encoder=text_encoder, vae=vae, unet=unet).to(device)
|
|
|
30 |
gr.Slider(10, 30, value = 20, step = 1, label = '่ฟญไปฃๆฌกๆฐ'),
|
31 |
gr.Slider(256, 768, value = 512, step = 64, label = 'ๅฎฝๅบฆ'),
|
32 |
gr.Slider(256, 768, value = 512, step = 64, label = '้ซๅบฆ'),
|
33 |
+
],outputs='image').queue(concurrency_count=10).launch()
|
requirements.txt
CHANGED
@@ -3,3 +3,4 @@ torch
|
|
3 |
torchvision
|
4 |
git+https://github.com/huggingface/diffusers.git
|
5 |
transformers
|
|
|
|
3 |
torchvision
|
4 |
git+https://github.com/huggingface/diffusers.git
|
5 |
transformers
|
6 |
+
accelerate
|