Spaces:
Runtime error
Runtime error
Commit
·
7c71893
1
Parent(s):
c19b710
Update app.py
Browse files
app.py
CHANGED
|
@@ -156,8 +156,8 @@ class Demo:
|
|
| 156 |
if self.training:
|
| 157 |
return [gr.update(interactive=True, value='Train'), gr.update(value='Someone else is training... Try again soon'), None, gr.update()]
|
| 158 |
# clear the diffusers
|
| 159 |
-
del self.diffuser
|
| 160 |
-
torch.cuda.empty_cache()
|
| 161 |
|
| 162 |
if train_method == 'ESD-x':
|
| 163 |
|
|
@@ -190,7 +190,7 @@ class Demo:
|
|
| 190 |
|
| 191 |
# del self.diffuser
|
| 192 |
torch.cuda.empty_cache()
|
| 193 |
-
self.diffuser = StableDiffuser(scheduler='DDIM', seed=42).to('cuda').eval().half()
|
| 194 |
return [gr.update(interactive=True, value='Train'), gr.update(value='Done Training'), save_path, gr.Dropdown.update(choices=list(model_map.keys()), value='Custom')]
|
| 195 |
|
| 196 |
|
|
|
|
| 156 |
if self.training:
|
| 157 |
return [gr.update(interactive=True, value='Train'), gr.update(value='Someone else is training... Try again soon'), None, gr.update()]
|
| 158 |
# clear the diffusers
|
| 159 |
+
# del self.diffuser
|
| 160 |
+
# torch.cuda.empty_cache()
|
| 161 |
|
| 162 |
if train_method == 'ESD-x':
|
| 163 |
|
|
|
|
| 190 |
|
| 191 |
# del self.diffuser
|
| 192 |
torch.cuda.empty_cache()
|
| 193 |
+
# self.diffuser = StableDiffuser(scheduler='DDIM', seed=42).to('cuda').eval().half()
|
| 194 |
return [gr.update(interactive=True, value='Train'), gr.update(value='Done Training'), save_path, gr.Dropdown.update(choices=list(model_map.keys()), value='Custom')]
|
| 195 |
|
| 196 |
|