Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -161,13 +161,16 @@ def load_and_prepare_model():
|
|
161 |
'''
|
162 |
|
163 |
pipe.unet = pipe.unet.to(memory_format=torch.contiguous_format)
|
|
|
|
|
|
|
164 |
pipe.unet = torch.compile(pipe.unet, backend="hidet")
|
165 |
pipe.to(device=device, dtype=torch.bfloat16)
|
166 |
|
167 |
return pipe
|
168 |
|
169 |
hidet.option.parallel_build(True)
|
170 |
-
hidet.option.parallel_tune(-1,
|
171 |
|
172 |
torch._dynamo.config.suppress_errors = True
|
173 |
torch._dynamo.disallow_in_graph(diffusers.models.attention.BasicTransformerBlock)
|
|
|
161 |
'''
|
162 |
|
163 |
pipe.unet = pipe.unet.to(memory_format=torch.contiguous_format)
|
164 |
+
|
165 |
+
#pipe.unet.to(memory_format=torch.channels_last)
|
166 |
+
#pipe.enable_vae_tiling()
|
167 |
pipe.unet = torch.compile(pipe.unet, backend="hidet")
|
168 |
pipe.to(device=device, dtype=torch.bfloat16)
|
169 |
|
170 |
return pipe
|
171 |
|
172 |
hidet.option.parallel_build(True)
|
173 |
+
#hidet.option.parallel_tune(-1,4.0)
|
174 |
|
175 |
torch._dynamo.config.suppress_errors = True
|
176 |
torch._dynamo.disallow_in_graph(diffusers.models.attention.BasicTransformerBlock)
|