JiantaoLin
commited on
Commit
Β·
dc89c53
1
Parent(s):
24165b8
new
Browse files
app.py
CHANGED
|
@@ -151,6 +151,7 @@ def text_to_detailed(prompt, seed=None):
|
|
| 151 |
|
| 152 |
@spaces.GPU(duration=120)
|
| 153 |
def text_to_image(prompt, seed=None, strength=1.0,lora_scale=1.0, num_inference_steps=20, redux_hparam=None, init_image=None, **kwargs):
|
|
|
|
| 154 |
# print(f"Before text_to_image: {torch.cuda.memory_allocated() / 1024**3} GB")
|
| 155 |
k3d_wrapper.renew_uuid()
|
| 156 |
init_image = None
|
|
|
|
| 151 |
|
| 152 |
@spaces.GPU(duration=120)
|
| 153 |
def text_to_image(prompt, seed=None, strength=1.0,lora_scale=1.0, num_inference_steps=20, redux_hparam=None, init_image=None, **kwargs):
|
| 154 |
+
subprocess.run("rm -rf /data-nvme/zerogpu-offload/*", env={}, shell=True)
|
| 155 |
# print(f"Before text_to_image: {torch.cuda.memory_allocated() / 1024**3} GB")
|
| 156 |
k3d_wrapper.renew_uuid()
|
| 157 |
init_image = None
|