Robert001 commited on
Commit
b313237
1 Parent(s): e598301

first commit

Browse files
Files changed (2) hide show
  1. lib/attention.py +5 -1
  2. lib/util.py +5 -1
lib/attention.py CHANGED
@@ -8,6 +8,10 @@
8
  * Copyright (c) 2023 Lvmin Zhang and Maneesh Agrawala
9
  '''
10
 
 
 
 
 
11
  from inspect import isfunction
12
  import math
13
  import torch
@@ -16,7 +20,7 @@ from torch import nn, einsum
16
  from einops import rearrange, repeat
17
  from typing import Optional, Any
18
 
19
- from ..utils import checkpoint
20
 
21
  try:
22
  import xformers
 
8
  * Copyright (c) 2023 Lvmin Zhang and Maneesh Agrawala
9
  '''
10
 
11
+ import sys
12
+
13
+ sys.path.append('./')
14
+
15
  from inspect import isfunction
16
  import math
17
  import torch
 
20
  from einops import rearrange, repeat
21
  from typing import Optional, Any
22
 
23
+ from utils import checkpoint
24
 
25
  try:
26
  import xformers
lib/util.py CHANGED
@@ -18,6 +18,10 @@
18
  # thanks!
19
 
20
 
 
 
 
 
21
  import os
22
  import math
23
  import torch
@@ -25,7 +29,7 @@ import torch.nn as nn
25
  import numpy as np
26
  from einops import repeat
27
 
28
- from ..utils import instantiate_from_config
29
 
30
 
31
  def make_beta_schedule(schedule, n_timestep, linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3):
 
18
  # thanks!
19
 
20
 
21
+ import sys
22
+
23
+ sys.path.append('./')
24
+
25
  import os
26
  import math
27
  import torch
 
29
  import numpy as np
30
  from einops import repeat
31
 
32
+ from utils import instantiate_from_config
33
 
34
 
35
  def make_beta_schedule(schedule, n_timestep, linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3):