supundhananjaya commited on
Commit
8df2f1f
·
verified ·
1 Parent(s): 540d79b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -44,10 +44,10 @@ from diffusers import UNet2DConditionModel
44
  def load_models():
45
  torch_device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
46
 
47
- image_processor_model_path = os.path.join(settings.BASE_DIR, 'depthAPI', 'models', 'image_processor')
48
- swin_transformer_model_path = os.path.join(settings.BASE_DIR, 'depthAPI', 'models', 'swin_transformer')
49
- vae_model_path = os.path.join(settings.BASE_DIR, 'depthAPI', 'models', 'vae', 'MonoChannelVAE.pth')
50
- unet_model_path = os.path.join(settings.BASE_DIR, 'depthAPI', 'models', 'unet')
51
 
52
  image_processor = AutoImageProcessor.from_pretrained(image_processor_model_path)
53
  swin_transformer = SwinModel.from_pretrained(swin_transformer_model_path)
 
44
  def load_models():
45
  torch_device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
46
 
47
+ image_processor_model_path = 'models/image_processor/image_processor'
48
+ swin_transformer_model_path = 'models/swin_transformer/swin_transformer'
49
+ vae_model_path = 'models/vae/vae/MonoChannelVAE.pth'
50
+ unet_model_path = 'models/unet/unet'
51
 
52
  image_processor = AutoImageProcessor.from_pretrained(image_processor_model_path)
53
  swin_transformer = SwinModel.from_pretrained(swin_transformer_model_path)