Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 =
|
48 |
-
swin_transformer_model_path =
|
49 |
-
vae_model_path =
|
50 |
-
unet_model_path =
|
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)
|