forked from fofr/cog-comfyui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathX_Flux_ComfyUI.py
35 lines (30 loc) · 941 Bytes
/
X_Flux_ComfyUI.py
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
from custom_node_helper import CustomNodeHelper
IPADAPTERS = [
"flux-ip-adapter.safetensors",
]
CONTROLNETS = [
"flux-hed-controlnet-v3.safetensors",
"flux-canny-controlnet-v3.safetensors",
"flux-depth-controlnet-v3.safetensors",
]
class X_Flux_ComfyUI(CustomNodeHelper):
@staticmethod
def models():
return IPADAPTERS + CONTROLNETS
@staticmethod
def weights_map(base_url):
ipadapter_map = {
model: {
"url": f"{base_url}/xlabs/ipadapters/{model}.tar",
"dest": "ComfyUI/models/xlabs/ipadapters/",
}
for model in IPADAPTERS
}
controlnet_map = {
model: {
"url": f"{base_url}/xlabs/controlnets/{model}.tar",
"dest": "ComfyUI/models/xlabs/controlnets/",
}
for model in CONTROLNETS
}
return {**ipadapter_map, **controlnet_map}