Spaces:
Build error
Build error
NikeZoldyck
commited on
Commit
•
0351b16
1
Parent(s):
f4cf673
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ model_id = "CompVis/stable-diffusion-v1-4"
|
|
27 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
28 |
context = autocast if device == "cuda" else nullcontext
|
29 |
|
30 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id,use_auth_token=token).to(device)
|
31 |
|
32 |
|
33 |
def infer(prompt,samples):
|
@@ -208,5 +208,6 @@ with demo:
|
|
208 |
gr.Examples(examples=[["cont_img.png","ref_img.png"]],inputs=[overlay_img, ref_img], label = "Nvidia - FastPhotoStyle")
|
209 |
|
210 |
|
211 |
-
demo.queue(concurrency_count=40, max_size=20)
|
|
|
212 |
|
|
|
27 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
28 |
context = autocast if device == "cuda" else nullcontext
|
29 |
|
30 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id,revision="fp16", torch_dtype=torch.float16,use_auth_token=token).to(device)
|
31 |
|
32 |
|
33 |
def infer(prompt,samples):
|
|
|
208 |
gr.Examples(examples=[["cont_img.png","ref_img.png"]],inputs=[overlay_img, ref_img], label = "Nvidia - FastPhotoStyle")
|
209 |
|
210 |
|
211 |
+
demo.queue(concurrency_count=40, max_size=20)
|
212 |
+
demo.launch(share=True,enable_queue=True,max_threads=150)
|
213 |
|