Li Zhaoxu commited on
Commit
2d918a0
1 Parent(s): c34b4fa
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import random
5
  import numpy as np
6
  import torch
7
  import gradio as gr
8
-
9
  from minigpt4.common.config import Config
10
  from minigpt4.common.dist_utils import get_rank
11
  from minigpt4.common.registry import registry
@@ -39,7 +39,8 @@ def setup_seeds(config):
39
  np.random.seed(seed)
40
  torch.manual_seed(seed)
41
 
42
-
 
43
  # ========================================
44
  # Model Initialization
45
  # ========================================
 
5
  import numpy as np
6
  import torch
7
  import gradio as gr
8
+ import torch.backends.cudnn as cudnn
9
  from minigpt4.common.config import Config
10
  from minigpt4.common.dist_utils import get_rank
11
  from minigpt4.common.registry import registry
 
39
  np.random.seed(seed)
40
  torch.manual_seed(seed)
41
 
42
+ cudnn.benchmark = False
43
+ cudnn.deterministic = True
44
  # ========================================
45
  # Model Initialization
46
  # ========================================