ford442 commited on
Commit
e2f1f18
·
verified ·
1 Parent(s): 7750195

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,7 +34,7 @@ os.system(f'{conda_bin}/conda install nvidia/label/cuda-12.4.0::cuda-toolkit')
34
  #os.system(f'{conda_bin}/conda install pytorch::pytorch-cuda')
35
  #os.system(f'{conda_bin}/conda install rcdr_py37::tensorrt')
36
  #subprocess.run(['sh', './hidet.sh'])
37
- subprocess.run(['sh', './modelopt.sh'])
38
  import hidet
39
  #print(dir(hidet))
40
  #import torch_tensorrt
@@ -201,7 +201,7 @@ def load_and_prepare_model():
201
  #pipe.unet = torch.compile(pipe.unet, backend="hidet", dynamic=False, mode='max-autotune') #.to(device=device, dtype=torch.bfloat16)
202
  #pipe.unet = torch.compile(pipe.unet, backend="hidet", dynamic=False, mode='max-autotune-no-cudagraphs') #.to(device=device, dtype=torch.bfloat16)
203
  #pipe.unet = torch.compile(pipe.unet, backend="hidet", dynamic=False, options={'epilogue_fusion': True, 'shape_padding': True}) #.to(device=device, dtype=torch.bfloat16)
204
- pipe.unet = torch.compile(pipe.unet, backend="inductor")
205
  #pipe.unet = torch.compile(pipe.unet, backend="hidet", dynamic=False, options={"search_space": 0})
206
  #pipe.unet = torch.compile(pipe.unet, backend="torch_tensorrt", dynamic=False, options={"precision": torch.bfloat16,"optimization_level": 4,})
207
  pipe.to(device=device, dtype=torch.bfloat16)
 
34
  #os.system(f'{conda_bin}/conda install pytorch::pytorch-cuda')
35
  #os.system(f'{conda_bin}/conda install rcdr_py37::tensorrt')
36
  #subprocess.run(['sh', './hidet.sh'])
37
+ #subprocess.run(['sh', './modelopt.sh'])
38
  import hidet
39
  #print(dir(hidet))
40
  #import torch_tensorrt
 
201
  #pipe.unet = torch.compile(pipe.unet, backend="hidet", dynamic=False, mode='max-autotune') #.to(device=device, dtype=torch.bfloat16)
202
  #pipe.unet = torch.compile(pipe.unet, backend="hidet", dynamic=False, mode='max-autotune-no-cudagraphs') #.to(device=device, dtype=torch.bfloat16)
203
  #pipe.unet = torch.compile(pipe.unet, backend="hidet", dynamic=False, options={'epilogue_fusion': True, 'shape_padding': True}) #.to(device=device, dtype=torch.bfloat16)
204
+ pipe.unet = torch.compile(pipe.unet, backend="tvm", dynamic=False)
205
  #pipe.unet = torch.compile(pipe.unet, backend="hidet", dynamic=False, options={"search_space": 0})
206
  #pipe.unet = torch.compile(pipe.unet, backend="torch_tensorrt", dynamic=False, options={"precision": torch.bfloat16,"optimization_level": 4,})
207
  pipe.to(device=device, dtype=torch.bfloat16)