forked from yondonfu/comfystream
-
Notifications
You must be signed in to change notification settings - Fork 6
feat(docker): add nodes config build arg for custom workers #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d500b7b
feat: add support for custom nodes config in Docker build
eliteprox f9e69a4
feat(models): add support for HuggingFace directory downloads and new…
eliteprox ba79679
refactor: replace nodes-minimal.yaml with nodes-streamdiffusion.yaml …
eliteprox 4db6bd8
add sd1.5 ipadapter models
eliteprox 9594fc4
add workflow dispatch option for nodes config
eliteprox d461176
fix model paths
eliteprox d7d1642
Remove huggingface_hub dependency from requirements.txt
eliteprox 049c950
Revert "add workflow dispatch option for nodes config"
eliteprox 601edf4
chore:adhere to latest streamdiffusion nodes trt engine building (#573)
RUFFY-369 b00eee8
Merge branch 'main' into feat/custom-nodes-config
eliteprox b0c4727
Fix:streamdiffusion custom node build, dependencies conflict issue (#…
RUFFY-369 11131c7
chore(devcontainer): update devcontainer.json to use build context an…
eliteprox 9c09d05
feat:Enhance entrypoint.sh with custom node checks for Depth Anything…
eliteprox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Quick Reference: Model Configuration | ||
|
|
||
| ## Single File vs Directory Download | ||
|
|
||
| ### Single File (Default) | ||
| ```yaml | ||
| my-model: | ||
| name: "My Model" | ||
| url: "https://huggingface.co/user/repo/resolve/main/file.safetensors" | ||
| path: "loras/model.safetensors" | ||
| ``` | ||
|
|
||
| ### Directory (Add `is_directory: true`) | ||
| ```yaml | ||
| my-directory: | ||
| name: "My Directory" | ||
| url: "https://huggingface.co/user/repo/tree/main/folder" | ||
| path: "models/folder" | ||
| is_directory: true # ← Add this! | ||
| ``` | ||
|
|
||
| ## URL Patterns | ||
|
|
||
| | Download Type | URL Pattern | Example | | ||
| |---------------|-------------|---------| | ||
| | **Single File** | `/resolve/` | `https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors` | | ||
| | **Directory** | `/tree/` | `https://huggingface.co/h94/IP-Adapter/tree/main/models/image_encoder` | | ||
|
|
||
| ## Common Model Paths | ||
|
|
||
| | Model Type | Path Pattern | | ||
| |------------|--------------| | ||
| | Checkpoints | `checkpoints/SD1.5/` | | ||
| | LoRAs | `loras/SD1.5/` | | ||
| | ControlNet | `controlnet/` | | ||
| | VAE | `vae/` or `vae_approx/` | | ||
| | IP-Adapter | `ipadapter/` | | ||
| | Text Encoders | `text_encoders/CLIPText/` | | ||
| | TensorRT/ONNX | `tensorrt/` | | ||
|
|
||
| ## IP-Adapter Example | ||
|
|
||
| ```yaml | ||
| models: | ||
| # Single file - IP-Adapter model | ||
| ip-adapter-sd15: | ||
| name: "IP Adapter SD15" | ||
| url: "https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors" | ||
| path: "ipadapter/ip-adapter_sd15.safetensors" | ||
|
|
||
| # Directory - CLIP image encoder | ||
| clip-image-encoder: | ||
| name: "CLIP Image Encoder" | ||
| url: "https://huggingface.co/h94/IP-Adapter/tree/main/models/image_encoder" | ||
| path: "ipadapter/models/image_encoder" | ||
| is_directory: true | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| # Use a config | ||
| python src/comfystream/scripts/setup_models.py --config my-config.yaml | ||
|
|
||
| # Use default config (models.yaml) | ||
| python src/comfystream/scripts/setup_models.py | ||
| ``` | ||
|
|
||
| ## See Also | ||
|
|
||
| - [DIRECTORY_DOWNLOADS.md](../DIRECTORY_DOWNLOADS.md) - Detailed directory download guide | ||
| - [models-ipadapter-example.yaml](models-ipadapter-example.yaml) - Complete working example | ||
| - [README.md](README.md) - Full configuration reference | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # build_targets.yaml | ||
| # Maps node names to their build scripts and config files. | ||
| # Add new nodes as needed. | ||
|
|
||
| streamdiffusion: | ||
| script: /workspace/ComfyUI/custom_nodes/ComfyUI-StreamDiffusion/scripts/build_tensorrt_engines.py | ||
| configs: | ||
| - /workspace/ComfyUI/custom_nodes/ComfyUI-StreamDiffusion/configs/sd15_singlecontrol.yaml | ||
| - /workspace/ComfyUI/custom_nodes/ComfyUI-StreamDiffusion/configs/sdturbo_multicontrol.yaml | ||
| folder: /workspace/ComfyUI/custom_nodes/ComfyUI-StreamDiffusion/scripts | ||
|
|
||
| # Example for another node: | ||
| # depthanything: | ||
| # script: /workspace/ComfyUI/custom_nodes/ComfyUI-DepthAnything/scripts/build_depthanything_engine.py | ||
| # configs: | ||
| # - /workspace/ComfyUI/custom_nodes/ComfyUI-DepthAnything/configs/depthanything.yaml | ||
| # folder: /workspace/ComfyUI/custom_nodes/ComfyUI-DepthAnything/scripts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| models: | ||
| # Example: IP-Adapter setup with directory download | ||
|
|
||
| # Single file download (regular) | ||
| ip-adapter-plus-sd15: | ||
| name: "IP Adapter SD15" | ||
| url: "https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus_sd15.safetensors" | ||
| path: "ipadapter/ip-adapter-plus_sd15.safetensors" | ||
| type: "ipadapter" | ||
| extra_files: | ||
| - url: "https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus_sd15.bin" | ||
| path: "ipadapter/ip-adapter-plus_sd15.bin" | ||
|
|
||
| clip-image-encoder: | ||
| name: "CLIP Image Encoder" | ||
| url: "https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors" | ||
| path: "ipadapter/image_encoder/model.safetensors" | ||
| type: "image_encoder" | ||
| extra_files: | ||
| - url: "https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/config.json" | ||
| path: "ipadapter/image_encoder/config.json" | ||
|
|
||
| # Base model | ||
| sd-turbo: | ||
| name: "SD-Turbo" | ||
| url: "https://huggingface.co/stabilityai/sd-turbo/resolve/main/sd_turbo.safetensors" | ||
| path: "checkpoints/SD1.5/sd_turbo.safetensors" | ||
| type: "checkpoint" | ||
|
|
||
| PixelArtRedmond15V-PixelArt-PIXARFK.safetensors: | ||
| name: "PixelArtRedmond15V-PixelArt-PIXARFK" | ||
| url: "https://huggingface.co/artificialguybr/pixelartredmond-1-5v-pixel-art-loras-for-sd-1-5/resolve/ab43d9e2cf8c9240189f01e9cdc4ca341362500c/PixelArtRedmond15V-PixelArt-PIXARFK.safetensors" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Models download uses |
||
| path: "loras/SD1.5/PixelArt.safetensors" | ||
| type: "lora" | ||
|
|
||
| # TAESD for fast VAE | ||
| taesd: | ||
| name: "TAESD" | ||
| url: "https://huggingface.co/madebyollin/taesd/resolve/main/taesd_decoder.safetensors" | ||
| path: "vae_approx/taesd_decoder.safetensors" | ||
| type: "vae_approx" | ||
| extra_files: | ||
| - url: "https://huggingface.co/madebyollin/taesd/resolve/main/taesd_encoder.safetensors" | ||
| path: "vae_approx/taesd_encoder.safetensors" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| nodes: | ||
| # Minimal node configuration for faster builds | ||
| comfyui-tensorrt: | ||
| name: "ComfyUI TensorRT" | ||
| url: "https://github.com/yondonfu/ComfyUI_TensorRT.git" | ||
| branch: "quantization_with_controlnet_fixes" | ||
| type: "tensorrt" | ||
| dependencies: | ||
| - "tensorrt==10.12.0.36" | ||
|
|
||
| comfyui-streamdiffusion: | ||
| name: "ComfyUI StreamDiffusion" | ||
| url: "https://github.com/muxionlabs/ComfyUI-StreamDiffusion" | ||
| branch: "main" | ||
| type: "tensorrt" | ||
|
|
||
| comfyui-torch-compile: | ||
| name: "ComfyUI Torch Compile" | ||
| url: "https://github.com/yondonfu/ComfyUI-Torch-Compile" | ||
| type: "tensorrt" | ||
|
|
||
| comfyui_controlnet_aux: | ||
| name: "ComfyUI ControlNet Auxiliary" | ||
| url: "https://github.com/Fannovel16/comfyui_controlnet_aux" | ||
| type: "controlnet" | ||
|
|
||
| comfyui-stream-pack: | ||
| name: "ComfyUI Stream Pack" | ||
| url: "https://github.com/livepeer/ComfyUI-Stream-Pack" | ||
| branch: "main" | ||
| type: "utility" | ||
|
|
||
| rgthree-comfy: | ||
| name: "rgthree Comfy" | ||
| url: "https://github.com/rgthree/rgthree-comfy.git" | ||
| type: "utility" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with comments here to allow for quick editing to test images other than
livepeer/comfyui-base:latestThis was needed because devcontainer build failed with
livepeer/comfyui-base:streamdiffusionas theBASE_IMAGEname.