Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -160,7 +160,6 @@ def load_and_prepare_model():
|
|
160 |
pipe.vae.eval()
|
161 |
pipe.text_encoder.eval()
|
162 |
'''
|
163 |
-
|
164 |
pipe.unet = pipe.unet.to(memory_format=torch.contiguous_format)
|
165 |
pipe.unet = torch.compile(pipe.unet, backend="hidet")
|
166 |
|
@@ -168,14 +167,14 @@ def load_and_prepare_model():
|
|
168 |
|
169 |
hidet.option.parallel_build(True)
|
170 |
hidet.option.parallel_tune(-1,8.0)
|
171 |
-
|
172 |
torch._dynamo.config.suppress_errors = True
|
173 |
torch._dynamo.disallow_in_graph(diffusers.models.attention.BasicTransformerBlock)
|
174 |
# Preload and compile both models
|
175 |
|
176 |
|
177 |
# more search
|
178 |
-
hidet.torch.dynamo_config.search_space(
|
179 |
#hidet.torch.dynamo_config.dump_graph_ir("./local_graph")
|
180 |
hidet.option.cache_dir("local_cache")
|
181 |
# automatically transform the model to use float16 data type
|
|
|
160 |
pipe.vae.eval()
|
161 |
pipe.text_encoder.eval()
|
162 |
'''
|
|
|
163 |
pipe.unet = pipe.unet.to(memory_format=torch.contiguous_format)
|
164 |
pipe.unet = torch.compile(pipe.unet, backend="hidet")
|
165 |
|
|
|
167 |
|
168 |
hidet.option.parallel_build(True)
|
169 |
hidet.option.parallel_tune(-1,8.0)
|
170 |
+
hidet.torch.dynamo_config.steal_weights(False)
|
171 |
torch._dynamo.config.suppress_errors = True
|
172 |
torch._dynamo.disallow_in_graph(diffusers.models.attention.BasicTransformerBlock)
|
173 |
# Preload and compile both models
|
174 |
|
175 |
|
176 |
# more search
|
177 |
+
hidet.torch.dynamo_config.search_space(2)
|
178 |
#hidet.torch.dynamo_config.dump_graph_ir("./local_graph")
|
179 |
hidet.option.cache_dir("local_cache")
|
180 |
# automatically transform the model to use float16 data type
|