Spaces:
Runtime error
Runtime error
Commit
•
9110980
1
Parent(s):
6a97866
Update app.py
Browse files
app.py
CHANGED
@@ -369,6 +369,11 @@ Sample pictures of:
|
|
369 |
return [gr.update(visible=True, value=f"Successfully uploaded your model. Access it [here](https://huggingface.co/{model_id})"), gr.update(visible=True, value=["diffusers_model.tar", "model.ckpt"])]
|
370 |
|
371 |
def convert_to_ckpt():
|
|
|
|
|
|
|
|
|
|
|
372 |
convert("output_model", "model.ckpt")
|
373 |
return gr.update(visible=True, value=["diffusers_model.tar", "model.ckpt"])
|
374 |
|
|
|
369 |
return [gr.update(visible=True, value=f"Successfully uploaded your model. Access it [here](https://huggingface.co/{model_id})"), gr.update(visible=True, value=["diffusers_model.tar", "model.ckpt"])]
|
370 |
|
371 |
def convert_to_ckpt():
|
372 |
+
if 'pipe' in globals():
|
373 |
+
global pipe, pipe_is_set
|
374 |
+
del pipe
|
375 |
+
pipe_is_set = False
|
376 |
+
gc.collect()
|
377 |
convert("output_model", "model.ckpt")
|
378 |
return gr.update(visible=True, value=["diffusers_model.tar", "model.ckpt"])
|
379 |
|