This commit is contained in:
lllyasviel 2024-01-25 22:57:14 -08:00
parent 6cb4130303
commit e3e84ba063
2 changed files with 10 additions and 5 deletions

View File

@ -12,10 +12,11 @@ from ldm_patched.contrib.external_video_model import ImageOnlyCheckpointLoader,
from ldm_patched.contrib.external import KSampler, VAEDecode
gradio_compile(SVD_img2vid_Conditioning.INPUT_TYPES(), prefix='')
gradio_compile(KSampler.INPUT_TYPES(), prefix='sampling')
gradio_compile(VideoLinearCFGGuidance.INPUT_TYPES(), prefix='guidance')
a = 0
ps = []
ps += gradio_compile(SVD_img2vid_Conditioning.INPUT_TYPES(), prefix='')
ps += gradio_compile(KSampler.INPUT_TYPES(), prefix='sampling')
ps += gradio_compile(VideoLinearCFGGuidance.INPUT_TYPES(), prefix='guidance')
print(', '.join(ps))
svd_root = os.path.join(models_path, 'svd')
os.makedirs(svd_root, exist_ok=True)

View File

@ -1,5 +1,6 @@
def gradio_compile(items, prefix):
names = []
for k, v in items["required"].items():
t = v[0]
d = v[1] if len(v) > 1 else None
@ -7,6 +8,9 @@ def gradio_compile(items, prefix):
name = (prefix + k).replace(' ', '_').lower()
else:
name = k.replace(' ', '_').lower()
names.append(name)
title = name.replace('_', ' ').title()
if t == 'INT':
@ -38,4 +42,4 @@ def gradio_compile(items, prefix):
else:
print('error ' + str(t))
return
return names