24 Commits
Author SHA1 Message Date
Demis Bellot 40c8468aae Add CheyenneXL 2025-05-09 00:20:59 +08:00
Demis Bellot 8fc30e4f32 Update pyproject.toml 2025-05-08 22:47:21 +08:00
Demis Bellot 973f7df1ce update description 2025-05-08 22:46:08 +08:00
Demis Bellot 270fc6f3d8 Add sdxl-base_refiner_sytan-tiger.json 2025-05-08 15:30:20 +08:00
Demis Bellot 690c4235a0 Update more examples 2025-05-08 15:09:38 +08:00
Demis Bellot 0ef17679a0 Update Wan example 2025-05-08 14:17:24 +08:00
Demis Bellot cb7151a82f don't print downloading if file exists 2025-05-08 14:06:54 +08:00
Demis Bellot 40067d598f Add Wan2.1 workflow 2025-05-08 10:53:24 +08:00
Demis Bellot e9232aaa09 bump to v0.2 2025-05-08 10:47:09 +08:00
Demis Bellot 869f5f96c3 Update README.md 2025-05-08 10:45:02 +08:00
Demis Bellot 97b2512a92 Update README.md 2025-05-08 10:44:27 +08:00
Demis Bellot 4097dc0095 Change display name 2025-05-08 10:43:40 +08:00
Demis Bellot 3967237d8b Merge branch 'main' of https://github.com/ServiceStack/comfy-asset-downloader 2025-05-08 01:31:51 +08:00
Demis Bellot 127fdcbbe1 Update pyproject.toml 2025-05-08 01:31:49 +08:00
Demis Bellot 94068ed488 Merge pull request #1 from ComfyNodePRs/publish
Add Github Action for Publishing to Comfy Registry
2025-05-08 01:31:19 +08:00
Demis Bellot 5a989152e9 Merge pull request #2 from ComfyNodePRs/pyproject
Add pyproject.toml for Custom Node Registry
2025-05-08 01:22:49 +08:00
async () = process.env.GIT_USERNAME || (await ghUser()).email && (await ghUser()).name || DIE("Missing env.GIT_USERNAME") 0d5befb024 chore(pyproject): Add pyproject.toml for Custom Node Registry 2025-05-07 16:59:42 +00:00
async () = process.env.GIT_USERNAME || (await ghUser()).email && (await ghUser()).name || DIE("Missing env.GIT_USERNAME") b8c69c320c chore(publish): Add Github Action for Publishing to Comfy Registry 2025-05-07 16:59:41 +00:00
Demis Bellot 81ff3d8a6b Resolve models_dir from folder_paths and sanitize save_to to ensure it's within models_dir 2025-05-08 00:12:45 +08:00
Demis Bellot 78bee0e18d Update README.md 2025-05-07 16:28:52 +08:00
Demis Bellot 7ea4d3f557 Update README.md 2025-05-07 16:27:43 +08:00
Demis Bellot 1e7baafb50 Update asset_downloader.py 2025-05-07 16:22:00 +08:00
Demis Bellot 8591a0b29b Update README.md 2025-05-07 16:13:51 +08:00
Demis Bellot c8cdc48f6f Update README.md 2025-05-07 15:50:35 +08:00
9 changed files with 6246 additions and 23 deletions
+28
View File
@@ -0,0 +1,28 @@
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
- master
paths:
- "pyproject.toml"
permissions:
issues: write
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'ServiceStack' }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@v1
with:
## Add your own personal access token to your Github Repository secrets and reference it here.
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
+38 -9
View File
@@ -1,4 +1,4 @@
# ComfyUI Asset Downloader
# Comfy Asset Downloader
A ComfyUI custom node that allows you to download models and other assets used in ComfyUI workflows from external sources like Hugging Face and CivitAI directly within your workflows to make it easier to share workflows and save time finding and downloading all the assets needed.
@@ -10,12 +10,23 @@ A ComfyUI custom node that allows you to download models and other assets used i
- Visual progress indicator during downloads
- Embed download nodes directly in your workflows to ensure dependencies are available
[![](./examples/workflow.webp)](https://raw.githubusercontent.com/ServiceStack/comfy-asset-downloader/refs/heads/main/examples/workflow.webp)
## Installation
### Using ComfyUI Manager
Search and install **Comfy Asset Downloader** from [ComfyUI's Manager](https://github.com/Comfy-Org/ComfyUI-Manager) **Custom Nodes Manager**.
### Using Git
```bash
git clone https://github.com/ServiceStack/comfy-asset-downloader ComfyUI/custom_nodes/comfy-asset-downloader
git clone https://github.com/ServiceStack/comfy-asset-downloader \
ComfyUI/custom_nodes/comfy-asset-downloader
```
### Configure Environment Variables (Optional)
To download models and resources from CivitAI or protected Hugging Face repositories we recommend your ComfyUI
instance has these environment variables (e.g. by adding to `~/.profile`):
@@ -39,8 +50,6 @@ For ease of use and security the **token** can be prefixed with `$` to use an en
This will use the value of the `HF_TOKEN` environment variable if it exists.
[![](/examples/workflow.webp)](./examples/hidream-dev-face.png)
### Usage
1. Add an `AssetDownloader` node to your workflow
@@ -57,15 +66,35 @@ Check out the example workflows containing asset dependencies in the `examples`
__(Drag image to ComfyUI)__
- [hidream-dev-face.json](./examples/hidream-dev-face.json): ComfyUI workflow that downloads and uses the leading OSS **HiDream-I1 Dev** model for high quality image generation.
### HiDream
- [hidream-dev-face.json](./examples/hidream-dev-face.json): ComfyUI workflow that downloads and uses the leading OSS **HiDream-I1 Dev** model for high quality image generation
- [hidream-fast-crystalball.json](./examples/hidream-fast-crystalball.json): A workflow that downloads and uses the fast version of **HiDream-I1 Fast** model
### Flux
- [flux1-schnell-cyborg.json](./examples/flux1-schnell-cyborg.json): A workflow using the **FLUX.1-schnell** model from Hugging Face (requires HF_TOKEN)
- [epiCRealismXL-sparrow.json](./examples/epiCRealismXL-sparrow.json): A workflow that downloads the [epiCRealism XL](https://civitai.com/models/277058?modelVersionId=1522905) model from CivitAI (requires CivitAI token) for realistic image generation.
- [dreamshaperXL-forest-woman.json](./examples/dreamshaperXL-forest-woman.json): A workflow using [DreamShaper XL](https://civitai.com/models/112902/dreamshaper-xl) from CivitAI
- [jibMixRealisticXL-hamster.json](jibMixRealisticXL-hamster.json): A workflow that uses [Jib Mix Realistic XL](https://civitai.com/models/194768/jib-mix-realistic-xl) from CivitAI
- [sdxl_lightning-enchantress.json](./examples/sdxl_lightning-enchantress.json): A workflow that downloads **SDXL-Lightning** from Hugging Face for fast image generation using SDXL.
### Stable Diffusion
- [sdxl_lightning-enchantress.json](./examples/sdxl_lightning-enchantress.json): A workflow that downloads **SDXL-Lightning** from Hugging Face for fast image generation using SDXL
- [sdxl_base_refiner-bottle.json](./examples/sdxl_base_refiner-bottle.json): A workflow that downloads **SDXL Base** and **SD XL Refiner** from Hugging Face for an image generation example using a base model with a refiner
- [sdxl-base_refiner_sytan-tiger.json](./examples/sdxl-base_refiner_sytan-tiger.json): A more complex **SDXL Base** and **SD XL Refiner** workflow from [@SytanSD](https://github.com/SytanSD/Sytan-SDXL-ComfyUI)
- [sdxl_turbo1-fox.json](./examples/sdxl_turbo1-fox.json): A workflow that downloads **SDXL Turbo v1.0** from Hugging Face for basic image 512x512 generation
- [sd3.5_large_fp8-spider.json](./examples/sd3.5_large_fp8-spider.json): A workflow that downloads **Stable Diffusion 3.5 Large FP8** model from Hugging Face for a more resource efficient high quality SD 3.5 Large image generation
### CivitAI (requires CIVITAI_TOKEN)
- [epiCRealismXL-sparrow.json](./examples/epiCRealismXL-sparrow.json): A workflow that downloads the [epiCRealism XL](https://civitai.com/models/277058?modelVersionId=1522905) model from CivitAI
- [dreamshaperXL-forest-woman.json](./examples/dreamshaperXL-forest-woman.json): A workflow using [DreamShaper XL](https://civitai.com/models/112902/dreamshaper-xl) from CivitAI
- [jibMixRealisticXL-hamster.json](./examples/jibMixRealisticXL-hamster.json): A workflow that uses [Jib Mix Realistic XL](https://civitai.com/models/194768/jib-mix-realistic-xl) from CivitAI
- [CheyenneXL-samurai.json](./examples/CheyenneXL-samurai.json): A workflow that uses [CHEYENNE v2.2 (VAE Baked)](https://civitai.com/models/198051/cheyenne) from CivitAI
### Wan
- [wan-image-to-video.json](./examples/wan-image-to-video.json.json): A workflow that downloads **Wan2.1** text-to-video model from Hugging Face for generating videos from an initial image and text prompt
## Credits
- [comfyui-model-downloader](https://github.com/ciri/comfyui-model-downloader)
+501
View File
@@ -0,0 +1,501 @@
{
"id": "27b72623-b1e1-419b-b435-885ff40b7474",
"revision": 0,
"last_node_id": 10,
"last_link_id": 9,
"nodes": [
{
"id": 1,
"type": "VAEDecode",
"pos": [
1158.080322265625,
149.46624755859375
],
"size": [
210,
46
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1
},
{
"name": "vae",
"type": "VAE",
"link": 2
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
3
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "VAEDecode"
}
},
{
"id": 2,
"type": "VAELoader",
"pos": [
821.0802001953125,
463.46636962890625
],
"size": [
315,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
2
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "VAELoader"
},
"widgets_values": [
"sdxl_vae.safetensors"
]
},
{
"id": 4,
"type": "AssetDownloader",
"pos": [
-33.70664978027344,
566.6258544921875
],
"size": [
315,
130
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {
"cnr_id": "comfy-asset-downloader",
"ver": "cb7151a82f91ab3da819f469945eafe3ac6ec7f8",
"Node name for S&R": "AssetDownloader"
},
"widgets_values": [
"https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors",
"loras",
"aesthetic_anime_v1s.safetensors",
""
]
},
{
"id": 6,
"type": "PreviewImage",
"pos": [
827.079833984375,
643.466064453125
],
"size": [
515.4545288085938,
492.5455322265625
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 3
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 8,
"type": "EmptyLatentImage",
"pos": [
403.1708984375,
605.375244140625
],
"size": [
315,
106
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
8
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 9,
"type": "KSampler",
"pos": [
812.0802001953125,
147.46624755859375
],
"size": [
315,
262
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 5
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 6
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 7
},
{
"name": "latent_image",
"type": "LATENT",
"link": 8
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
1
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "KSampler"
},
"widgets_values": [
32566606704244,
"randomize",
8,
2,
"dpmpp_sde",
"karras",
1
]
},
{
"id": 3,
"type": "CheckpointLoaderSimple",
"pos": [
-26.51993751525879,
164.26632690429688
],
"size": [
315,
98
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
5
]
},
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 1,
"links": [
4,
9
]
},
{
"name": "VAE",
"type": "VAE",
"slot_index": 2,
"links": []
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"CHEYENNE_v22VAEBaked.safetensors"
]
},
{
"id": 5,
"type": "AssetDownloader",
"pos": [
-33.70664978027344,
381.8258361816406
],
"size": [
315,
130
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {
"cnr_id": "comfy-asset-downloader",
"ver": "cb7151a82f91ab3da819f469945eafe3ac6ec7f8",
"Node name for S&R": "AssetDownloader"
},
"widgets_values": [
"https://civitai.com/api/download/models/1640059?type=Model&format=SafeTensor&size=full&fp=fp16",
"checkpoints",
"CHEYENNE_v22VAEBaked.safetensors",
"$CIVITAI_TOKEN"
]
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
359.8981628417969,
369.37542724609375
],
"size": [
425.27801513671875,
180.6060791015625
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 4
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
7
]
}
],
"title": "CLIP Text Encode (Negative Prompt)",
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"a fantasy underwater village beautiful landscape, early morning, woman, very intricate, very detailed, sharp, bright, colorful, <lora:Hand v2:0.5> <lora:Anti-Blur:1><lora:Insane Detail Slider:0.25> <lora:flux.1_lora_flyway_Epic-detail_v2:0.3> <lora:fluxenhancer:0.25> <lora:ROWER:0.8> <lora:Anime art - Variant 2:0.6>"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 10,
"type": "CLIPTextEncode",
"pos": [
359.8981628417969,
148.1935272216797
],
"size": [
422.84503173828125,
164.31304931640625
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 9
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
6
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"A lone samurai stands before a crumbling red torii gate under a massive blood moon, his shadow stretching long across the ground. He wears a fearsome samurai kabuto helmet with a horned crest, the metal scarred from battle. In his hands, a single katana catches the moon’s crimson glow, its edge gleaming like a sliver of ice.\n\nBehind him, the gate’s peeling paint reveals ancient wood, and the sky pulses with an eerie red light. The air is thick with drifting cherry blossoms—some frozen mid-fall, others clinging to his armor like spectral hands. The ground is cracked, as if the earth itself recoils from his presence.\n\nUltra-detailed fantasy realism, blending historical samurai aesthetics with dark mythology. The blood moon’s light bathes everything in a surreal red hue, turning the scene into a waking nightmare"
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
1,
9,
0,
1,
0,
"LATENT"
],
[
2,
2,
0,
1,
1,
"VAE"
],
[
3,
1,
0,
6,
0,
"IMAGE"
],
[
4,
3,
1,
7,
0,
"CLIP"
],
[
5,
3,
0,
9,
0,
"MODEL"
],
[
6,
10,
0,
9,
1,
"CONDITIONING"
],
[
7,
7,
0,
9,
2,
"CONDITIONING"
],
[
8,
8,
0,
9,
3,
"LATENT"
],
[
9,
3,
1,
10,
0,
"CLIP"
]
],
"groups": [
{
"id": 1,
"title": "Download Dependencies",
"bounding": [
-55.43706512451172,
293.4106750488281,
351.9045715332031,
424.4669494628906
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 1.2100000000000002,
"offset": [
-8.070376893921567,
-32.97371345273165
]
},
"frontendVersion": "1.17.11"
},
"version": 0.4
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+600
View File
@@ -0,0 +1,600 @@
{
"id": "1eff9aba-0ffd-4679-b933-a45421d6b78d",
"revision": 0,
"last_node_id": 28,
"last_link_id": 54,
"nodes": [
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
352,
176
],
"size": [
425.27801513671875,
180.6060791015625
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 39
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
20
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"text, watermark"
]
},
{
"id": 14,
"type": "KSamplerSelect",
"pos": [
452,
-144
],
"size": [
315,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "SAMPLER",
"type": "SAMPLER",
"links": [
18
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "KSamplerSelect"
},
"widgets_values": [
"euler_ancestral"
]
},
{
"id": 5,
"type": "EmptyLatentImage",
"pos": [
462,
398
],
"size": [
315,
106
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
23
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
512,
512,
1
]
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1183,
-66
],
"size": [
210,
46
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 28
},
{
"name": "vae",
"type": "VAE",
"link": 40
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
53,
54
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 25,
"type": "PreviewImage",
"pos": [
1213,
93
],
"size": [
501.69647216796875,
541.9198608398438
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 53
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 22,
"type": "SDTurboScheduler",
"pos": [
452,
-248
],
"size": [
315,
82
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 45
}
],
"outputs": [
{
"name": "SIGMAS",
"type": "SIGMAS",
"slot_index": 0,
"links": [
49
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "SDTurboScheduler"
},
"widgets_values": [
1,
1
]
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
351,
-45
],
"size": [
422.84503173828125,
164.31304931640625
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 38
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
19
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"beautiful landscape scenery glass bottle with a galaxy inside cute fennec fox snow HDR sunset"
]
},
{
"id": 27,
"type": "SaveImage",
"pos": [
1843,
-154
],
"size": [
466.7873840332031,
516.8289794921875
],
"flags": {},
"order": 10,
"mode": 2,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 54
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30"
},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 13,
"type": "SamplerCustom",
"pos": [
800,
-66
],
"size": [
355.20001220703125,
230
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 41
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 19
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 20
},
{
"name": "sampler",
"type": "SAMPLER",
"link": 18
},
{
"name": "sigmas",
"type": "SIGMAS",
"link": 49
},
{
"name": "latent_image",
"type": "LATENT",
"link": 23
}
],
"outputs": [
{
"name": "output",
"type": "LATENT",
"slot_index": 0,
"links": [
28
]
},
{
"name": "denoised_output",
"type": "LATENT",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "SamplerCustom"
},
"widgets_values": [
true,
0,
"fixed",
1
]
},
{
"id": 20,
"type": "CheckpointLoaderSimple",
"pos": [
-75.47877502441406,
-68.37560272216797
],
"size": [
343.69647216796875,
98
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
41,
45
]
},
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 1,
"links": [
38,
39
]
},
{
"name": "VAE",
"type": "VAE",
"slot_index": 2,
"links": [
40
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"sd_xl_turbo_1.0_fp16.safetensors"
]
},
{
"id": 28,
"type": "AssetDownloader",
"pos": [
-61.070255279541016,
174.04393005371094
],
"size": [
315,
130
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {
"cnr_id": "comfy-asset-downloader",
"ver": "cb7151a82f91ab3da819f469945eafe3ac6ec7f8",
"Node name for S&R": "AssetDownloader"
},
"widgets_values": [
"https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0_fp16.safetensors",
"checkpoints",
"sd_xl_turbo_1.0_fp16.safetensors",
""
]
}
],
"links": [
[
18,
14,
0,
13,
3,
"SAMPLER"
],
[
19,
6,
0,
13,
1,
"CONDITIONING"
],
[
20,
7,
0,
13,
2,
"CONDITIONING"
],
[
23,
5,
0,
13,
5,
"LATENT"
],
[
28,
13,
0,
8,
0,
"LATENT"
],
[
38,
20,
1,
6,
0,
"CLIP"
],
[
39,
20,
1,
7,
0,
"CLIP"
],
[
40,
20,
2,
8,
1,
"VAE"
],
[
41,
20,
0,
13,
0,
"MODEL"
],
[
45,
20,
0,
22,
0,
"MODEL"
],
[
49,
22,
0,
13,
4,
"SIGMAS"
],
[
53,
8,
0,
25,
0,
"IMAGE"
],
[
54,
8,
0,
27,
0,
"IMAGE"
]
],
"groups": [
{
"id": 1,
"title": "Unmute (CTRL-M) if you want to save images.",
"bounding": [
1808,
-260,
536,
676
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"id": 2,
"title": "Download Dependencies",
"bounding": [
-81.37516021728516,
86.32585906982422,
354.3413391113281,
240.09622192382812
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.9849732675807631,
"offset": [
512.2500146686709,
441.40419468806715
]
},
"frontendVersion": "1.17.11"
},
"version": 0.4
}
+905
View File
@@ -0,0 +1,905 @@
{
"id": "5408edec-ec0f-4cc6-904f-2dd4ae4034d2",
"revision": 0,
"last_node_id": 58,
"last_link_id": 111,
"nodes": [
{
"id": 8,
"type": "VAEDecode",
"pos": [
1210,
190
],
"size": [
210,
46
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 35
},
{
"name": "vae",
"type": "VAE",
"link": 76
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
56,
93
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 39,
"type": "VAELoader",
"pos": [
866.3932495117188,
499.18597412109375
],
"size": [
306.36004638671875,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
76,
99
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "VAELoader"
},
"widgets_values": [
"wan_2.1_vae.safetensors"
]
},
{
"id": 28,
"type": "SaveAnimatedWEBP",
"pos": [
1460,
190
],
"size": [
870.8511352539062,
643.7430419921875
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 56
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30"
},
"widgets_values": [
"ComfyUI",
16,
false,
90,
"default"
]
},
{
"id": 47,
"type": "SaveWEBM",
"pos": [
2367.213134765625,
193.6114959716797
],
"size": [
315,
130
],
"flags": {},
"order": 17,
"mode": 4,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 93
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "SaveWEBM"
},
"widgets_values": [
"ComfyUI",
"vp9",
24,
32
]
},
{
"id": 50,
"type": "WanImageToVideo",
"pos": [
673.0507202148438,
627.272705078125
],
"size": [
342.5999755859375,
210
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 97
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 98
},
{
"name": "vae",
"type": "VAE",
"link": 99
},
{
"name": "clip_vision_output",
"shape": 7,
"type": "CLIP_VISION_OUTPUT",
"link": 107
},
{
"name": "start_image",
"shape": 7,
"type": "IMAGE",
"link": 106
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
101
]
},
{
"name": "negative",
"type": "CONDITIONING",
"slot_index": 1,
"links": [
102
]
},
{
"name": "latent",
"type": "LATENT",
"slot_index": 2,
"links": [
103
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "WanImageToVideo"
},
"widgets_values": [
512,
512,
33,
1
]
},
{
"id": 3,
"type": "KSampler",
"pos": [
863,
187
],
"size": [
315,
262
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 111
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 101
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 102
},
{
"name": "latent_image",
"type": "LATENT",
"link": 103
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
35
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "KSampler"
},
"widgets_values": [
1043061006049488,
"randomize",
20,
6,
"uni_pc",
"simple",
1
]
},
{
"id": 49,
"type": "CLIPVisionLoader",
"pos": [
40.18779754638672,
812.57470703125
],
"size": [
315,
58
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP_VISION",
"type": "CLIP_VISION",
"slot_index": 0,
"links": [
94
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPVisionLoader"
},
"widgets_values": [
"clip_vision_h.safetensors"
]
},
{
"id": 52,
"type": "LoadImage",
"pos": [
40.18779754638672,
932.5743408203125
],
"size": [
315,
314
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
106,
109
]
},
{
"name": "MASK",
"type": "MASK",
"slot_index": 1,
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"flux_dev_example.png",
"image"
]
},
{
"id": 54,
"type": "ModelSamplingSD3",
"pos": [
510,
70
],
"size": [
315,
58
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 110
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
111
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "ModelSamplingSD3"
},
"widgets_values": [
8
]
},
{
"id": 51,
"type": "CLIPVisionEncode",
"pos": [
380.18817138671875,
812.57470703125
],
"size": [
253.60000610351562,
78
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "clip_vision",
"type": "CLIP_VISION",
"link": 94
},
{
"name": "image",
"type": "IMAGE",
"link": 109
}
],
"outputs": [
{
"name": "CLIP_VISION_OUTPUT",
"type": "CLIP_VISION_OUTPUT",
"slot_index": 0,
"links": [
107
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPVisionEncode"
},
"widgets_values": [
"none"
]
},
{
"id": 57,
"type": "AssetDownloader",
"pos": [
-243.1000213623047,
604.3241577148438
],
"size": [
289.6023254394531,
130
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {
"cnr_id": "comfy-asset-downloader",
"ver": "78bee0e18db8917c5ea0ebddb592e13d3caa5472",
"Node name for S&R": "AssetDownloader",
"aux_id": "ServiceStack/comfy-asset-downloader"
},
"widgets_values": [
"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors",
"clip_vision",
"clip_vision_h.safetensors",
""
]
},
{
"id": 37,
"type": "UNETLoader",
"pos": [
29.76833152770996,
40.69501495361328
],
"size": [
346.7470703125,
82
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
110
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "UNETLoader"
},
"widgets_values": [
"wan2.1_i2v_480p_14B_fp16.safetensors",
"default"
]
},
{
"id": 38,
"type": "CLIPLoader",
"pos": [
-11.909887313842773,
191.3024444580078
],
"size": [
390,
106
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 0,
"links": [
74,
75
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPLoader"
},
"widgets_values": [
"umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"wan",
"default"
]
},
{
"id": 58,
"type": "AssetDownloader",
"pos": [
67.1648941040039,
603.0263671875
],
"size": [
289.6023254394531,
130
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {
"cnr_id": "comfy-asset-downloader",
"ver": "78bee0e18db8917c5ea0ebddb592e13d3caa5472",
"Node name for S&R": "AssetDownloader",
"aux_id": "ServiceStack/comfy-asset-downloader"
},
"widgets_values": [
"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors",
"vae",
"wan_2.1_vae.safetensors",
""
]
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
415,
186
],
"size": [
422.84503173828125,
164.31304931640625
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 74
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
97
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"a cute anime girl with massive fennec ears and a big fluffy tail wearing a maid outfit turning around"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 56,
"type": "AssetDownloader",
"pos": [
-243.1000213623047,
412.86444091796875
],
"size": [
289.60235595703125,
130
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {
"cnr_id": "comfy-asset-downloader",
"ver": "78bee0e18db8917c5ea0ebddb592e13d3caa5472",
"Node name for S&R": "AssetDownloader",
"aux_id": "ServiceStack/comfy-asset-downloader"
},
"widgets_values": [
"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_i2v_480p_14B_fp16.safetensors",
"diffusion_models",
"wan2.1_i2v_480p_14B_fp16.safetensors",
""
]
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
413,
389
],
"size": [
425.27801513671875,
180.6060791015625
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 75
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
98
]
}
],
"title": "CLIP Text Encode (Negative Prompt)",
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.30",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 55,
"type": "AssetDownloader",
"pos": [
64.27653503417969,
412.86444091796875
],
"size": [
294.1608581542969,
130
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {
"cnr_id": "comfy-asset-downloader",
"ver": "78bee0e18db8917c5ea0ebddb592e13d3caa5472",
"Node name for S&R": "AssetDownloader",
"aux_id": "ServiceStack/comfy-asset-downloader"
},
"widgets_values": [
"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"text_encoders",
"umt5_xxl_fp8_e4m3fn_scaled.safetensors",
""
]
}
],
"links": [
[
35,
3,
0,
8,
0,
"LATENT"
],
[
56,
8,
0,
28,
0,
"IMAGE"
],
[
74,
38,
0,
6,
0,
"CLIP"
],
[
75,
38,
0,
7,
0,
"CLIP"
],
[
76,
39,
0,
8,
1,
"VAE"
],
[
93,
8,
0,
47,
0,
"IMAGE"
],
[
94,
49,
0,
51,
0,
"CLIP_VISION"
],
[
97,
6,
0,
50,
0,
"CONDITIONING"
],
[
98,
7,
0,
50,
1,
"CONDITIONING"
],
[
99,
39,
0,
50,
2,
"VAE"
],
[
101,
50,
0,
3,
1,
"CONDITIONING"
],
[
102,
50,
1,
3,
2,
"CONDITIONING"
],
[
103,
50,
2,
3,
3,
"LATENT"
],
[
106,
52,
0,
50,
4,
"IMAGE"
],
[
107,
51,
0,
50,
3,
"CLIP_VISION_OUTPUT"
],
[
109,
52,
0,
51,
1,
"IMAGE"
],
[
110,
37,
0,
54,
0,
"MODEL"
],
[
111,
54,
0,
3,
0,
"MODEL"
]
],
"groups": [
{
"id": 1,
"title": "Download Dependencies",
"bounding": [
-261.3348083496094,
325.6006774902344,
639.4381713867188,
420.1655578613281
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 1.2284597357367768,
"offset": [
127.22499890886877,
12.866606851886118
]
},
"frontendVersion": "1.17.11"
},
"version": 0.4
}
+13 -10
View File
@@ -5,14 +5,10 @@ import shutil
import hashlib
from tqdm import tqdm
from server import PromptServer
def models_dir():
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.dirname(os.path.dirname(os.path.dirname(current_dir)))
return os.path.join(base_dir, 'models')
from folder_paths import models_dir
def model_folders():
return immediate_folders(models_dir())
return immediate_folders(models_dir)
def immediate_folders(directory_path):
"""
@@ -22,13 +18,13 @@ def immediate_folders(directory_path):
for d in os.listdir(directory_path):
if os.path.isdir(os.path.join(directory_path, d)):
name = os.path.basename(d)
if name.startswith('.') or len(name) > 30:
if name.startswith('.'):
continue
folders.append(d)
for sd in os.listdir(os.path.join(directory_path, d)):
if os.path.isdir(os.path.join(directory_path, d, sd)):
name = os.path.basename(sd)
if name.startswith('.') or len(name) > 30:
if name.startswith('.'):
continue
folders.append(os.path.join(d, sd))
return folders
@@ -64,9 +60,16 @@ class AssetDownloader:
if not url or not save_to or not filename:
print(f"AssetDownloader: Missing required values: url='{url}', save_to='{save_to}', filename='{filename}'")
return ()
# Sanitize save_to to ensure it's within models_dir
safe_save_to = os.path.normpath(os.path.join(models_dir, save_to))
if not safe_save_to.startswith(models_dir):
print(f"AssetDownloader: Invalid save_to path. Must be within {models_dir}")
return ()
save_to = os.path.relpath(safe_save_to, models_dir)
relative_path = os.path.join(save_to, filename)
save_path = os.path.join(models_dir(), relative_path)
save_path = os.path.join(models_dir, relative_path)
if os.path.exists(save_path):
print(f"AssetDownloader: File already exists: {relative_path}")
return ()
@@ -111,6 +114,7 @@ class AssetDownloader:
})
shutil.move(temp_path, save_path)
print(f"Complete! {filename} saved to {save_path}")
return save_path
except Exception as e:
@@ -119,4 +123,3 @@ class AssetDownloader:
raise e
return ()
+4 -4
View File
@@ -1,7 +1,7 @@
[project]
name = "comfy-asset-downloader"
description = ""
version = "0.1"
description = "This node allows downloading models and other resources used within a ComfyUI workflow making it easier to resolve referenced assets and share workflows from HuggingFace, CivitAI and other sources."
version = "0.4"
license = {file = "LICENSE"}
[project.urls]
@@ -9,6 +9,6 @@ Repository = "https://github.com/ServiceStack/comfy-asset-downloader"
# Used by Comfy Registry https://comfyregistry.org
[tool.comfy]
PublisherId = "ServiceStack"
DisplayName = "comfy-asset-downloader"
PublisherId = "servicestack"
DisplayName = "Comfy Asset Downloader"
Icon = ""