Spaces:
Runtime error
Runtime error
Update gradio-app.py
Browse filesSee if I can eliminate the "not enough sm's" error on this T4 during compile with max-autotune.
- gradio-app.py +6 -4
gradio-app.py
CHANGED
@@ -32,10 +32,12 @@ pipe.unet.to(memory_format=torch.channels_last)
|
|
32 |
pipe.set_progress_bar_config(disable=True)
|
33 |
|
34 |
if TORCH_COMPILE:
|
35 |
-
|
36 |
-
|
37 |
-
pipe.
|
38 |
-
pipe.
|
|
|
|
|
39 |
|
40 |
|
41 |
def predict(prompt1, prompt2, merge_ratio, guidance, steps, sharpness, seed=1231231):
|
|
|
32 |
pipe.set_progress_bar_config(disable=True)
|
33 |
|
34 |
if TORCH_COMPILE:
|
35 |
+
#optmode = 'max-autotune'
|
36 |
+
optmode = 'reduce-overhead'
|
37 |
+
pipe.text_encoder = torch.compile(pipe.text_encoder, mode=optmode)
|
38 |
+
pipe.tokenizer = torch.compile(pipe.tokenizer, mode=optmode)
|
39 |
+
pipe.unet = torch.compile(pipe.unet, mode=optmode)
|
40 |
+
pipe.vae = torch.compile(pipe.vae, mode=optmode)
|
41 |
|
42 |
|
43 |
def predict(prompt1, prompt2, merge_ratio, guidance, steps, sharpness, seed=1231231):
|