Spaces:
Runtime error
Runtime error
first commit
Browse files- lib/attention.py +1 -3
- lib/util.py +1 -5
lib/attention.py
CHANGED
@@ -8,9 +8,7 @@
|
|
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
|
@@ -20,7 +18,7 @@ from torch import nn, einsum
|
|
20 |
from einops import rearrange, repeat
|
21 |
from typing import Optional, Any
|
22 |
|
23 |
-
from utils import checkpoint
|
24 |
|
25 |
try:
|
26 |
import xformers
|
|
|
8 |
* Copyright (c) 2023 Lvmin Zhang and Maneesh Agrawala
|
9 |
'''
|
10 |
|
|
|
11 |
|
|
|
12 |
|
13 |
from inspect import isfunction
|
14 |
import math
|
|
|
18 |
from einops import rearrange, repeat
|
19 |
from typing import Optional, Any
|
20 |
|
21 |
+
from ..utils import checkpoint
|
22 |
|
23 |
try:
|
24 |
import xformers
|
lib/util.py
CHANGED
@@ -18,10 +18,6 @@
|
|
18 |
# thanks!
|
19 |
|
20 |
|
21 |
-
import sys
|
22 |
-
|
23 |
-
sys.path.append('./')
|
24 |
-
|
25 |
import os
|
26 |
import math
|
27 |
import torch
|
@@ -29,7 +25,7 @@ import torch.nn as nn
|
|
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):
|
|
|
18 |
# thanks!
|
19 |
|
20 |
|
|
|
|
|
|
|
|
|
21 |
import os
|
22 |
import math
|
23 |
import torch
|
|
|
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):
|