Spaces:
Running
on
Zero
Running
on
Zero
eienmojiki
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -159,12 +159,9 @@ def generate(
|
|
159 |
|
160 |
except Exception as e:
|
161 |
print(f"An error occurred: {e}")
|
162 |
-
finally:
|
163 |
-
free_memory()
|
164 |
|
165 |
if torch.cuda.is_available():
|
166 |
pipe = load_pipeline(MODEL)
|
167 |
-
gr.Info("Loaded on Device!")
|
168 |
else:
|
169 |
pipe = None
|
170 |
|
|
|
159 |
|
160 |
except Exception as e:
|
161 |
print(f"An error occurred: {e}")
|
|
|
|
|
162 |
|
163 |
if torch.cuda.is_available():
|
164 |
pipe = load_pipeline(MODEL)
|
|
|
165 |
else:
|
166 |
pipe = None
|
167 |
|