Spaces:
Runtime error
Runtime error
Use cuda when available
Browse files
app.py
CHANGED
@@ -45,7 +45,10 @@ class Instance:
|
|
45 |
|
46 |
def load_model(self, model_id='j-min/IterInpaint-CLEVR'):
|
47 |
pipe = StableDiffusionInpaintPipeline.from_pretrained(model_id)
|
48 |
-
|
|
|
|
|
|
|
49 |
def dummy(images, **kwargs):
|
50 |
return images, False
|
51 |
pipe.safety_checker = dummy
|
@@ -727,10 +730,10 @@ with Blocks(
|
|
727 |
gr.HTML(thank_desc)
|
728 |
|
729 |
main.queue(concurrency_count=1, api_open=False)
|
730 |
-
|
731 |
-
main.launch(
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
|
|
45 |
|
46 |
def load_model(self, model_id='j-min/IterInpaint-CLEVR'):
|
47 |
pipe = StableDiffusionInpaintPipeline.from_pretrained(model_id)
|
48 |
+
|
49 |
+
if torch.cuda.is_available():
|
50 |
+
pipe = pipe.to('cuda')
|
51 |
+
|
52 |
def dummy(images, **kwargs):
|
53 |
return images, False
|
54 |
pipe.safety_checker = dummy
|
|
|
730 |
gr.HTML(thank_desc)
|
731 |
|
732 |
main.queue(concurrency_count=1, api_open=False)
|
733 |
+
main.launch(share=False, show_api=False, show_error=True)
|
734 |
+
# main.launch(
|
735 |
+
# server_name="0.0.0.0",
|
736 |
+
# share=True,
|
737 |
+
# # server_port=7864,
|
738 |
+
# show_api=False, show_error=True
|
739 |
+
# )
|