Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -109,15 +109,17 @@ def load_and_prepare_model():
|
|
109 |
print(f'init noise scale: {pipe.scheduler.init_noise_sigma}')
|
110 |
pipe.watermark=None
|
111 |
pipe.safety_checker=None
|
112 |
-
pipe.unet
|
113 |
-
pipe.
|
|
|
|
|
114 |
pipe.to(device=device, dtype=torch.bfloat16)
|
115 |
|
116 |
return pipe
|
117 |
|
118 |
# for compile
|
119 |
hidet.option.parallel_build(True)
|
120 |
-
hidet.option.parallel_tune(-1,4.0)
|
121 |
torch._dynamo.config.suppress_errors = True
|
122 |
torch._dynamo.disallow_in_graph(diffusers.models.attention.BasicTransformerBlock)
|
123 |
# more search
|
|
|
109 |
print(f'init noise scale: {pipe.scheduler.init_noise_sigma}')
|
110 |
pipe.watermark=None
|
111 |
pipe.safety_checker=None
|
112 |
+
#pipe.unet.to(memory_format=torch.channels_last)
|
113 |
+
#pipe.enable_vae_tiling()
|
114 |
+
#pipe.unet = pipe.unet.to(memory_format=torch.contiguous_format)
|
115 |
+
#pipe.unet = torch.compile(pipe.unet, backend="hidet")
|
116 |
pipe.to(device=device, dtype=torch.bfloat16)
|
117 |
|
118 |
return pipe
|
119 |
|
120 |
# for compile
|
121 |
hidet.option.parallel_build(True)
|
122 |
+
#hidet.option.parallel_tune(-1,4.0)
|
123 |
torch._dynamo.config.suppress_errors = True
|
124 |
torch._dynamo.disallow_in_graph(diffusers.models.attention.BasicTransformerBlock)
|
125 |
# more search
|