Robert001 commited on
Commit
58f7d74
1 Parent(s): b094b4a

first commit

Browse files
Files changed (2) hide show
  1. lib/attention.py +1 -1
  2. utils.py +2 -1
lib/attention.py CHANGED
@@ -18,7 +18,7 @@ from torch import nn, einsum
18
  from einops import rearrange, repeat
19
  from typing import Optional, Any
20
 
21
- from utils import checkpoint
22
 
23
  try:
24
  import xformers
 
18
  from einops import rearrange, repeat
19
  from typing import Optional, Any
20
 
21
+ from util import checkpoint
22
 
23
  try:
24
  import xformers
utils.py CHANGED
@@ -19,6 +19,7 @@ from inspect import isfunction
19
  from PIL import Image, ImageDraw, ImageFont
20
 
21
 
 
22
  def log_txt_as_img(wh, xc, size=10):
23
  # wh a tuple of (width, height)
24
  # xc a list of captions to plot
@@ -114,4 +115,4 @@ def create_model(config_path):
114
  config = OmegaConf.load(config_path)
115
  model = instantiate_from_config(config.model).cpu()
116
  print(f'Loaded model config from [{config_path}]')
117
- return model
 
19
  from PIL import Image, ImageDraw, ImageFont
20
 
21
 
22
+
23
  def log_txt_as_img(wh, xc, size=10):
24
  # wh a tuple of (width, height)
25
  # xc a list of captions to plot
 
115
  config = OmegaConf.load(config_path)
116
  model = instantiate_from_config(config.model).cpu()
117
  print(f'Loaded model config from [{config_path}]')
118
+ return model