Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ from models.pipeline_consisid import ConsisIDPipeline
|
|
31 |
from models.eva_clip import create_model_and_transforms
|
32 |
from models.eva_clip.constants import OPENAI_DATASET_MEAN, OPENAI_DATASET_STD
|
33 |
from models.eva_clip.utils_qformer import resize_numpy_image_long
|
34 |
-
|
35 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
36 |
|
37 |
hf_hub_download(repo_id="ai-forever/Real-ESRGAN", filename="RealESRGAN_x4.pth", local_dir="model_real_esran")
|
|
|
31 |
from models.eva_clip import create_model_and_transforms
|
32 |
from models.eva_clip.constants import OPENAI_DATASET_MEAN, OPENAI_DATASET_STD
|
33 |
from models.eva_clip.utils_qformer import resize_numpy_image_long
|
34 |
+
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
|
35 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
36 |
|
37 |
hf_hub_download(repo_id="ai-forever/Real-ESRGAN", filename="RealESRGAN_x4.pth", local_dir="model_real_esran")
|