-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscript.py
More file actions
38 lines (22 loc) · 780 Bytes
/
script.py
File metadata and controls
38 lines (22 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import user_data.extensions.skdv_comfyui.ui.main as comfyui
from user_data.extensions.skdv_comfyui.config.dir_manager import DirManager
params = {
"display_name": "ComfyUI",
"is_tab": True,
}
dir_manager = DirManager()
def load_skdv_comfyui_resource(file: str):
with dir_manager.get_from_web(file).open("r", encoding="utf-8") as f:
f = f.read()
return f
def custom_css():
return load_skdv_comfyui_resource("skdv_comfyui_styles.css")
def custom_js():
return load_skdv_comfyui_resource("skdv_comfyui.js")
mount_for_tab = True
def ui():
global mount_for_tab
comfyui.mount_ui(mount_for_tab)
if mount_for_tab: # Made to mount both as Tab and in Extension Block
mount_for_tab = False
params["is_tab"] = False