Spaces:
Running
Running
yonishafir
commited on
Commit
•
5453ac3
1
Parent(s):
a7cd134
Update app.py
Browse files
app.py
CHANGED
@@ -101,7 +101,7 @@ generator = torch.Generator(device='cuda:0').manual_seed(123456)
|
|
101 |
|
102 |
vae = pipe.vae
|
103 |
|
104 |
-
|
105 |
# pipe.force_zeros_for_empty_prompt = False
|
106 |
|
107 |
# default_negative_prompt= "" #"Logo,Watermark,Text,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"
|
@@ -183,7 +183,7 @@ def predict(dict, prompt="", negative_prompt = default_negative_prompt, guidance
|
|
183 |
# guidance_scale = 1.2,
|
184 |
# generator=generator).images[0]
|
185 |
|
186 |
-
|
187 |
return output.images[0] #, gr.update(visible=True)
|
188 |
|
189 |
|
|
|
101 |
|
102 |
vae = pipe.vae
|
103 |
|
104 |
+
pipe.enable_model_cpu_offload()
|
105 |
# pipe.force_zeros_for_empty_prompt = False
|
106 |
|
107 |
# default_negative_prompt= "" #"Logo,Watermark,Text,Ugly,Morbid,Extra fingers,Poorly drawn hands,Mutation,Blurry,Extra limbs,Gross proportions,Missing arms,Mutated hands,Long neck,Duplicate,Mutilated,Mutilated hands,Poorly drawn face,Deformed,Bad anatomy,Cloned face,Malformed limbs,Missing legs,Too many fingers"
|
|
|
183 |
# guidance_scale = 1.2,
|
184 |
# generator=generator).images[0]
|
185 |
|
186 |
+
torch.cuda.empty_cache
|
187 |
return output.images[0] #, gr.update(visible=True)
|
188 |
|
189 |
|