mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-25 22:35:43 -03:00
0.73
This commit is contained in:
@@ -1664,15 +1664,15 @@ class CivitAILoraSelectorHunyuan:
|
|||||||
image_extensions = ('.png', '.jpg', '.jpeg', '.gif', '.webp', '.bmp')
|
image_extensions = ('.png', '.jpg', '.jpeg', '.gif', '.webp', '.bmp')
|
||||||
|
|
||||||
# Try NSFW folder first
|
# Try NSFW folder first
|
||||||
nsfw_files = [f"NSFW_lora_hunyuan_video/{f}" for f in folder_paths.get_filename_list("NSFW_lora_hunyuan_video")
|
# nsfw_files = [f"NSFW_lora_hunyuan_video/{f}" for f in folder_paths.get_filename_list("NSFW_lora_hunyuan_video")
|
||||||
if f.lower().endswith(image_extensions)]
|
# if f.lower().endswith(image_extensions)]
|
||||||
|
|
||||||
# If NSFW folder is empty or doesn't exist, try regular folder
|
# If NSFW folder is empty or doesn't exist, try regular folder
|
||||||
if not nsfw_files:
|
# if not nsfw_files:
|
||||||
files = [f"lora_hunyuan_video/{f}" for f in folder_paths.get_filename_list("lora_hunyuan_video")
|
files = [f"lora_hunyuan_video/{f}" for f in folder_paths.get_filename_list("lora_hunyuan_video")
|
||||||
if f.lower().endswith(image_extensions)]
|
if f.lower().endswith(image_extensions)]
|
||||||
else:
|
# else:
|
||||||
files = nsfw_files
|
# files = nsfw_files
|
||||||
|
|
||||||
if not files:
|
if not files:
|
||||||
files = ["none"]
|
files = ["none"]
|
||||||
@@ -1735,10 +1735,11 @@ class CivitAILoraSelectorHunyuan:
|
|||||||
raise ValueError("No image selected")
|
raise ValueError("No image selected")
|
||||||
|
|
||||||
# Try loading NSFW JSON first, fall back to regular JSON if not found
|
# Try loading NSFW JSON first, fall back to regular JSON if not found
|
||||||
nsfw_json_path = os.path.join(parsed_models_path, 'NSFW_parsed_lora_hunyuan_video_loras.json')
|
# nsfw_json_path = os.path.join(parsed_models_path, 'NSFW_parsed_lora_hunyuan_video_loras.json')
|
||||||
regular_json_path = os.path.join(parsed_models_path, 'parsed_lora_hunyuan_video_loras.json')
|
# regular_json_path = os.path.join(parsed_models_path, 'parsed_lora_hunyuan_video_loras.json')
|
||||||
|
json_path = os.path.join(parsed_models_path, 'parsed_lora_hunyuan_video_loras.json')
|
||||||
|
|
||||||
json_path = nsfw_json_path if os.path.exists(nsfw_json_path) else regular_json_path
|
# json_path = nsfw_json_path if os.path.exists(nsfw_json_path) else regular_json_path
|
||||||
hunYuan = "hunyuan_video"
|
hunYuan = "hunyuan_video"
|
||||||
|
|
||||||
with open(json_path, 'r') as f:
|
with open(json_path, 'r') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user