update to use js folder

This commit is contained in:
BlakeOne
2024-04-10 17:04:17 -07:00
committed by GitHub
parent 27e66a1e29
commit 9bfecd4120
3 changed files with 5 additions and 26 deletions
+3 -3
View File
@@ -6,8 +6,8 @@ Simple node for setting the sigma values directly. Note, for a full denoise the
<BR >
![16_steps_screenshot](https://github.com/BlakeOne/ComfyUI-CustomScheduler/assets/30273164/633bdea4-1093-4055-98b1-3f4e5ed823f5)
<BR >
# Shoutout
[ComfyUI_tinyterraNodes](https://github.com/TinyTerra/ComfyUI_tinyterraNodes) - Based on code from this repo, which showed me how to hide and show widgets :)
# Props
This repo is based on code from [ComfyUI_tinyterraNodes](https://github.com/TinyTerra/ComfyUI_tinyterraNodes), which showed me how to hide and show widgets :)
<BR >
# My other scheduler node
[ComfyUI-SchedulerMixer](https://github.com/BlakeOne/ComfyUI-SchedulerMixer) - Create a custom scheduler from a weighted average of the built-in schedulers
[ComfyUI-SchedulerMixer](https://github.com/BlakeOne/ComfyUI-SchedulerMixer) - Create a custom scheduler from a weighted average of the built-in schedulers
+2 -23
View File
@@ -1,28 +1,7 @@
# Comfy mappings
from .node import CustomScheduler
NODE_CLASS_MAPPINGS = {"CustomScheduler": CustomScheduler}
NODE_DISPLAY_NAME_MAPPINGS = {"CustomScheduler" : "CustomScheduler"}
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
WEB_DIRECTORY = "./js"
# Copy extension to comfy
import folder_paths
import shutil
import os
cwd_path = os.path.dirname(os.path.realpath(__file__))
comfy_path = folder_paths.base_path
web_extension_path = os.path.join(comfy_path, "web", "extensions", "CustomScheduler")
widgets_js_file = os.path.join(cwd_path, "extension.js")
if not os.path.exists(web_extension_path):
os.makedirs(web_extension_path)
else:
try:
shutil.rmtree(web_extension_path)
os.makedirs(web_extension_path)
except:
print("Unable to remove old web extension.")
pass
shutil.copy(widgets_js_file, web_extension_path)
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
View File