UPD: ReSwapper_128/256 models support

This commit is contained in:
Евгений Гурьев | Eugene Gourieff | 古仁
2025-01-18 16:02:05 +07:00
parent 41cbcd7172
commit fd3acac348
5 changed files with 66 additions and 6 deletions
+12 -4
View File
@@ -24,10 +24,18 @@ import comfy.model_management as model_management
def get_models():
models_path = os.path.join(folder_paths.models_dir,"insightface/*")
models = glob.glob(models_path)
models = [x for x in models if x.endswith(".onnx") or x.endswith(".pth")]
return models
swappers = [
"insightface",
"reswapper"
]
models_list = []
for folder in swappers:
models_folder = folder + "/*"
models_path = os.path.join(folder_paths.models_dir,models_folder)
models = glob.glob(models_path)
models = [x for x in models if x.endswith(".onnx") or x.endswith(".pth")]
models_list.extend(models)
return models_list
class FaceSwapScript(scripts.Script):