Fix path for windows

pull/101/head
Somdev Sangwan 2023-06-25 08:56:53 +05:30 committed by GitHub
parent cdcd31b164
commit ddc02ee1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import os
import gradio as gr import gradio as gr
import modules.scripts as scripts import modules.scripts as scripts
from modules.upscaler import Upscaler, UpscalerData from modules.upscaler import Upscaler, UpscalerData
@ -18,7 +19,7 @@ import os
def get_models(): def get_models():
models_path = os.path.join(scripts.basedir(), "models/roop/*") models_path = os.path.join(scripts.basedir(), "models" + os.path.sep + "roop" + os.path.sep + "*")
models = glob.glob(models_path) models = glob.glob(models_path)
models = [x for x in models if x.endswith(".onnx") or x.endswith(".pth")] models = [x for x in models if x.endswith(".onnx") or x.endswith(".pth")]
return models return models