update to use js folder
This commit is contained in:
@@ -6,8 +6,8 @@ Simple node for setting the sigma values directly. Note, for a full denoise the
|
||||
<BR >
|
||||

|
||||
<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
@@ -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"]
|
||||
Reference in New Issue
Block a user