2023-09-22 12:50:05 +08:00
2023-09-26 12:38:25 +08:00
2023-09-01 19:32:49 +08:00
2023-09-18 17:08:25 +08:00
2023-09-18 17:08:25 +08:00
2023-09-26 12:38:25 +08:00
2023-09-01 19:32:49 +08:00
2023-09-26 12:38:25 +08:00
2023-09-01 19:32:49 +08:00
2023-09-18 17:08:25 +08:00

avatar-graph-comfyui

This introduce a custom workflow on top of comfyui built for avatar-graph.

Installation

  1. cd custom_nodes

  2. git clone https://github.com/avatechgg/avatar-graph-comfyui.git

  3. Install deps cd avatar-graph-comfyui && python -m pip install -r requirements.txt

  4. Navigate to in your comfyui installation folder, open comfyui/main.py and add the following lines:

def prompt_worker(q, server):
    e = execution.PromptExecutor(server)

    # This is a workaround since using blender as a python module, the bpy module has to be imported after in the custom thread, otherwise it will cause a segfault if imported in the custom nodes.

    # Add next line
    import global_bpy

    while True:
        item, item_id = q.get()
        # Add next line
        global_bpy.reset_bpy()

if __name__ == "__main__":
    # Add next two lines 
    import sys
    sys.path.append(os.path.join(os.path.dirname(__file__), "custom_nodes", "avatar-graph-comfyui"))


  1. Restart comfyui

  2. Run comfyui with enable-cors-header python main.py --enable-cors-header or (mac)python main.py --force-fp16 --enable-cors-header

Development

For comfyui frontend extension, frontend js located at avatar-graph-comfyui/js

Web stack used: vanjs tailwindcss

Install deps

pnpm i

Run the dev command to start the tailwindcss watcher

pnpm dev

For each changes, simply refresh the comfyui page to see the changes.

p.s. For tailwind autocomplete, add the following to your vscode settings.json.

{
    "tailwindCSS.experimental.classRegex": [
        ["class\\s?:\\s?([\\s\\S]*)", "(?:\"|')([^\"']*)(?:\"|')"]
    ]
}
S
Description
No description provided
Readme
824 KiB
Languages
Python 39.9%
JavaScript 34.1%
CSS 26%