ford442 commited on
Commit
75458ee
·
verified ·
1 Parent(s): 5c126d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -18,7 +18,9 @@ conda_bin = os.path.join(conda_prefix, "bin")
18
  os.environ["PATH"] = conda_bin + os.pathsep + os.environ["PATH"]
19
 
20
  # Activate the base environment (adjust if needed)
 
21
  os.system(f'{conda_bin}/conda activate base')
 
22
 
23
  import random
24
  import uuid
@@ -185,7 +187,7 @@ def load_and_prepare_model():
185
  return pipe
186
 
187
  hidet.option.parallel_build(True)
188
- hidet.option.parallel_tune(1,2.0)
189
  #hidet.torch.dynamo_config.steal_weights(False)
190
  torch._dynamo.config.suppress_errors = True
191
  torch._dynamo.disallow_in_graph(diffusers.models.attention.BasicTransformerBlock)
@@ -199,7 +201,7 @@ hidet.option.cache_dir("local_cache")
199
  # use float16 data type as the accumulate data type in operators with reduction
200
  #hidet.torch.dynamo_config.use_fp16_reduction(True)
201
  # use tensorcore
202
- hidet.torch.dynamo_config.use_tensor_core()
203
  hidet.torch.dynamo_config.steal_weights(False)
204
 
205
  # Preload and compile both models
 
18
  os.environ["PATH"] = conda_bin + os.pathsep + os.environ["PATH"]
19
 
20
  # Activate the base environment (adjust if needed)
21
+ os.system(f'{conda_bin}/conda init --all')
22
  os.system(f'{conda_bin}/conda activate base')
23
+ os.system(f'{conda_bin}/conda install nvidia/label/cuda-12.4.0::cuda-nvcc')
24
 
25
  import random
26
  import uuid
 
187
  return pipe
188
 
189
  hidet.option.parallel_build(True)
190
+ #hidet.option.parallel_tune(1,2.0)
191
  #hidet.torch.dynamo_config.steal_weights(False)
192
  torch._dynamo.config.suppress_errors = True
193
  torch._dynamo.disallow_in_graph(diffusers.models.attention.BasicTransformerBlock)
 
201
  # use float16 data type as the accumulate data type in operators with reduction
202
  #hidet.torch.dynamo_config.use_fp16_reduction(True)
203
  # use tensorcore
204
+ #hidet.torch.dynamo_config.use_tensor_core()
205
  hidet.torch.dynamo_config.steal_weights(False)
206
 
207
  # Preload and compile both models