fixup dirs not being shown due to wrong isdir call
parent
f58716e0d9
commit
d16b0f5473
|
|
@ -87,12 +87,13 @@ def setup_text2video_settings_dictionary():
|
|||
models = []
|
||||
if os.path.isdir(os.path.join(ph.models_path, 'ModelScope/t2v')):
|
||||
models.append('<modelscope>')
|
||||
if os.path.isdir(os.path.join(ph.models_path, 'VideoCrafter')):
|
||||
if os.path.isdir(os.path.join(ph.models_path, 'VideoCrafter/')):
|
||||
models.append('<videocrafter>')
|
||||
models_dir = os.path.join(ph.models_path, 'text2video/')
|
||||
for subdir in os.listdir(models_dir):
|
||||
if os.path.isdir(subdir):
|
||||
models.append(subdir)
|
||||
if os.path.isdir(models_dir):
|
||||
for subdir in os.listdir(models_dir):
|
||||
if os.path.isdir(os.path.join(models_dir, subdir)):
|
||||
models.append(subdir)
|
||||
return gr.update(value=model if model in models else None, choices=models, visible=True)
|
||||
|
||||
refresh_models.click(refresh_all_models, model, model)
|
||||
|
|
|
|||
Loading…
Reference in New Issue