ford442 commited on
Commit
1246047
·
verified ·
1 Parent(s): c738df4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -144,7 +144,6 @@ def load_and_prepare_model():
144
  pipe.scheduler = sched
145
  #pipe.vae.do_resize=False
146
  #pipe.vae.vae_scale_factor=8
147
- pipe.to(device=device, dtype=torch.bfloat16)
148
  pipe.vae.set_default_attn_processor()
149
  #pipe.to(device)
150
  #pipe.to(torch.bfloat16)
@@ -163,6 +162,7 @@ def load_and_prepare_model():
163
 
164
  pipe.unet = pipe.unet.to(memory_format=torch.contiguous_format)
165
  pipe.unet = torch.compile(pipe.unet, backend="hidet")
 
166
 
167
  return pipe
168
 
@@ -184,6 +184,7 @@ hidet.option.cache_dir("local_cache")
184
  #hidet.torch.dynamo_config.use_fp16_reduction(True)
185
  # use tensorcore
186
  hidet.torch.dynamo_config.use_tensor_core()
 
187
 
188
  pipe = load_and_prepare_model()
189
 
 
144
  pipe.scheduler = sched
145
  #pipe.vae.do_resize=False
146
  #pipe.vae.vae_scale_factor=8
 
147
  pipe.vae.set_default_attn_processor()
148
  #pipe.to(device)
149
  #pipe.to(torch.bfloat16)
 
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
 
 
184
  #hidet.torch.dynamo_config.use_fp16_reduction(True)
185
  # use tensorcore
186
  hidet.torch.dynamo_config.use_tensor_core()
187
+ #hidet.torch.dynamo_config.steal_weights(False)
188
 
189
  pipe = load_and_prepare_model()
190