Spaces:
Running
on
A10G
Running
on
A10G
File size: 805 Bytes
eb9a9b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import os
import torch
import utils.constants as const
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
models_path = f'{const.CWD}/pretrained_models'
clip_vision_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'clip_vision')
# clip vision is always inside controlnet "extensions\sd-webui-controlnet"
# and any problem can be solved by removing controlnet and reinstall
models_path = os.path.realpath(models_path)
os.makedirs(models_path, exist_ok=True)
print(f'ControlNet preprocessor location: {models_path}')
# Make sure that the default location is inside controlnet "extensions\sd-webui-controlnet"
# so that any problem can be solved by removing controlnet and reinstall
# if users do not change configs on their own (otherwise users will know what is wrong)
|