Update Storydiffusion_node.py

a'd'd
This commit is contained in:
smthemex
2024-06-27 09:48:59 +08:00
committed by GitHub
parent 2dcb3315ee
commit c1073832cf
+12 -10
View File
@@ -1060,17 +1060,19 @@ class Storydiffusion_Model_Loader:
scheduler_choice = get_scheduler(scheduler)
photomaker_dir = os.path.join(dir_path, "weights")
photomaker_local_path = get_instance_path(os.path.join(photomaker_dir, "photomaker-v1.bin"))
photomaker_local_path = os.path.join(photomaker_dir, "photomaker-v1.bin")
if not os.path.exists(photomaker_local_path):
photomaker_path = hf_hub_download(
repo_id="TencentARC/PhotoMaker",
filename="photomaker-v1.bin",
repo_type="model",
local_dir=photomaker_dir,
)
else:
photomaker_path = photomaker_local_path
if model_type == "img2img":
if not os.path.exists(photomaker_local_path):
photomaker_path = hf_hub_download(
repo_id="TencentARC/PhotoMaker",
filename="photomaker-v1.bin",
repo_type="model",
local_dir=photomaker_dir,
)
else:
photomaker_path = photomaker_local_path
photomaker_path=get_instance_path(photomaker_path)
if lora != "none":
lora_path = folder_paths.get_full_path("loras", lora)