Spaces:
Runtime error
Runtime error
RohitGandikota
commited on
Commit
β’
42b98a9
1
Parent(s):
45481f4
cleaner inference for faster compute
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ class Demo:
|
|
52 |
self.pipe.enable_xformers_memory_efficient_attention()
|
53 |
with gr.Blocks() as demo:
|
54 |
self.layout()
|
55 |
-
demo.queue().launch(share=True, max_threads=3)
|
56 |
|
57 |
|
58 |
def layout(self):
|
@@ -245,8 +245,8 @@ class Demo:
|
|
245 |
save_name += f'_noxattn'
|
246 |
save_name += f'_rank_{rank}.pt'
|
247 |
|
248 |
-
|
249 |
-
|
250 |
if self.training:
|
251 |
return [gr.update(interactive=True, value='Train'), gr.update(value='Someone else is training... Try again soon'), None, gr.update()]
|
252 |
|
|
|
52 |
self.pipe.enable_xformers_memory_efficient_attention()
|
53 |
with gr.Blocks() as demo:
|
54 |
self.layout()
|
55 |
+
demo.queue(max_size=5).launch(share=True, max_threads=3)
|
56 |
|
57 |
|
58 |
def layout(self):
|
|
|
245 |
save_name += f'_noxattn'
|
246 |
save_name += f'_rank_{rank}.pt'
|
247 |
|
248 |
+
# if torch.cuda.get_device_properties(0).total_memory * 1e-9 < 40:
|
249 |
+
# return [gr.update(interactive=True, value='Train'), gr.update(value='GPU Memory is not enough for training... Please upgrade to GPU atleast 40GB or clone the repo to your local machine.'), None, gr.update()]
|
250 |
if self.training:
|
251 |
return [gr.update(interactive=True, value='Train'), gr.update(value='Someone else is training... Try again soon'), None, gr.update()]
|
252 |
|