Spaces:
Running
on
Zero
Running
on
Zero
modify
Browse files- app.py +1 -0
- misc_utils/train_utils.py +2 -0
app.py
CHANGED
@@ -19,6 +19,7 @@ import imageio
|
|
19 |
import time
|
20 |
|
21 |
from torchvision.transforms import functional as F
|
|
|
22 |
|
23 |
import os
|
24 |
|
|
|
19 |
import time
|
20 |
|
21 |
from torchvision.transforms import functional as F
|
22 |
+
from torch.hub import download_url_to_file
|
23 |
|
24 |
import os
|
25 |
|
misc_utils/train_utils.py
CHANGED
@@ -28,6 +28,7 @@ def get_models(args):
|
|
28 |
return model_dict
|
29 |
|
30 |
def get_text_model(args):
|
|
|
31 |
base_path = None
|
32 |
if args.get('diffusion'):
|
33 |
if args.diffusion.params.get('base_path'):# 这边有base path的情况下已经load参数了
|
@@ -38,6 +39,7 @@ def get_text_model(args):
|
|
38 |
return None
|
39 |
|
40 |
def get_vae(args):
|
|
|
41 |
base_path = None
|
42 |
if args.get('diffusion'):
|
43 |
if args.diffusion.params.get('base_path'):
|
|
|
28 |
return model_dict
|
29 |
|
30 |
def get_text_model(args):
|
31 |
+
# 注意简化一下这个函数
|
32 |
base_path = None
|
33 |
if args.get('diffusion'):
|
34 |
if args.diffusion.params.get('base_path'):# 这边有base path的情况下已经load参数了
|
|
|
39 |
return None
|
40 |
|
41 |
def get_vae(args):
|
42 |
+
# 简化函数+1
|
43 |
base_path = None
|
44 |
if args.get('diffusion'):
|
45 |
if args.diffusion.params.get('base_path'):
|