soiz1 commited on
Commit
5586578
·
verified ·
1 Parent(s): 365d7ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,6 +14,7 @@ import spaces
14
  import gradio as gr
15
 
16
  import torch
 
17
  import matplotlib.pyplot as plt
18
  from PIL import Image, ImageDraw, ImageFont
19
  import requests
@@ -26,7 +27,7 @@ from retinaface import RetinaFace
26
  device = "cuda" if torch.cuda.is_available() else "cpu"
27
 
28
  # load Gaze-LLE model
29
- model, transform = torch.hub.load("fkryan/gazelle", "gazelle_dinov2_vitl14_inout")
30
  model.eval()
31
  model.to(device)
32
 
 
14
  import gradio as gr
15
 
16
  import torch
17
+ torch.backends.cuda.enable_mem_efficient_attention(False)
18
  import matplotlib.pyplot as plt
19
  from PIL import Image, ImageDraw, ImageFont
20
  import requests
 
27
  device = "cuda" if torch.cuda.is_available() else "cpu"
28
 
29
  # load Gaze-LLE model
30
+ model, transform = torch.hub.load("fkryan/gazelle", "gazelle_dinov2_vitl14_inout", use_memory_efficient_attention=False)
31
  model.eval()
32
  model.to(device)
33