Skip to content

Commit

Permalink
Install GGUF loader for managed server (but it's optional for custom …
Browse files Browse the repository at this point in the history
…comfy installs)
  • Loading branch information
Acly committed Sep 10, 2024
1 parent 3ce781a commit 3d8c20c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
12 changes: 11 additions & 1 deletion ai_diffusion/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Version identifier for all the resources defined here. This is used as the server version.
# It usually follows the plugin version, but not all new plugin versions also require a server update.
version = "1.23.0"
version = "1.24.0"

comfy_url = "https://github.com/comfyanonymous/ComfyUI"
comfy_version = "cd4955367e4170b88ba839efccb6d2ed0dd963ad"
Expand Down Expand Up @@ -51,6 +51,16 @@ class CustomNode(NamedTuple):
),
]

optional_custom_nodes = [
CustomNode(
"GGUF",
"ComfyUI-GGUF",
"https://github.com/city96/ComfyUI-GGUF",
"454955ead3336322215a206edbd7191eb130bba0",
["UnetLoaderGGUF", "DualCLIPLoaderGGUF"],
)
]


class SDVersion(Enum):
sd15 = "SD 1.5"
Expand Down
2 changes: 1 addition & 1 deletion ai_diffusion/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def _install(self, cb: InternalCB):
if not self.has_comfy:
await try_install(comfy_dir, self._install_comfy, comfy_dir, network, cb)

for pkg in resources.required_custom_nodes:
for pkg in chain(resources.required_custom_nodes, resources.optional_custom_nodes):
dir = comfy_dir / "custom_nodes" / pkg.folder
await install_if_missing(dir, self._install_custom_node, pkg, network, cb)

Expand Down
3 changes: 2 additions & 1 deletion scripts/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import shutil
import requests
from pathlib import Path
from itertools import chain

sys.path.append(str(Path(__file__).parent.parent))
import ai_diffusion
Expand Down Expand Up @@ -47,7 +48,7 @@ def download_repositories():

download_repository(resources.comfy_url, comfy_dir, resources.comfy_version)
download_repository(manager_url, custom_nodes_dir / "ComfyUI-Manager", "main")
for repo in resources.required_custom_nodes:
for repo in chain(resources.required_custom_nodes, resources.optional_custom_nodes):
download_repository(repo.url, custom_nodes_dir / repo.folder, repo.version)


Expand Down

0 comments on commit 3d8c20c

Please sign in to comment.