Download + Extract
One dropdown, download + extract included
- extract_dir
Most of the datasets behind the Dive into Deep Learning (d2l) book live in one registry, pre-registered with URLs and checksums. CdlDownloadExtract is the pantry door to all of them: pick a dataset from a dropdown and the node downloads the archive, extracts it, and hands you the folder path - no shelling out, no remembering URLs, no manual unzipping. If ComfyDL's other dataset nodes are the cooking recipes, this is the one that just fetches ingredients.
You'll reach for it when you need the raw data for a workflow that ComfyDL doesn't wrap with a dedicated loader - text corpora for language-model demos, pretrained GloVe embeddings, the English–French translation pair - or when you want to inspect a dataset's file layout yourself before wiring up a custom pipeline.
How it works
The name input is a dropdown built from the pack's DATA_HUB registry - each entry knows its URL and expected SHA1. On execution the node calls download_extract(name): download with cache-checking, then unzip or untar into the same folder the archive landed in. The subfolder input, when set, makes it return a path inside the extracted tree instead of the top-level extraction directory - essential because some archives extract into a nested folder.
Like its sibling CdlDownload, it declares IS_CHANGED on the name + subfolder, so re-running a workflow doesn't re-fetch what's already cached. The heavy lifting is all delegated to the d2l helpers, so behavior matches the textbook exactly.
Inputs and outputs that matter
name- the dataset selector. The dropdown you'll actually see includes (among others)airfoil,hotdog,banana-detection,voc2012,cifar10_tiny,dog_tiny,ptb,glove.6b.50d,glove.6b.100d,glove.42b.300d,wiki.en, andwikitext-2. That's the same registry the pack's text and embedding nodes read from.subfolder(optional) - return a path inside the extracted archive. Check it when the dataset loads from a nested folder.
The extract_dir output is a STRING path to the extracted data, ready to feed into downstream nodes or a text display.
Installing ComfyDL
cd ComfyUI/custom_nodes
git clone https://github.com/Cynthia-lxx/ComfyDL ./ComfyDL
pip install -r ./ComfyDL/requirements.txt
Restart ComfyUI and search "Download + Extract" under Datasets. ComfyDL's own requirements are tiny; the cost here is the data, not the code. If ComfyUI Manager doesn't list "ComfyDL" (young pack), clone instead.
Gotchas
The sizes in that dropdown are wildly uneven, and a couple will surprise you. voc2012 runs to roughly 2 GB and the GloVe 42b.300d embeddings are another heavyweight - both download on first use with no progress bar in the node itself, so a "frozen" graph mid-first-run is usually just a big archive landing. Data goes to the d2l default ../data folder relative to where ComfyUI was launched (again: typically a sibling folder above ComfyUI). And wikitext-2 / ptb are the ones you actually want for the RNN language-model demos - grab those and the vocab/tokenize nodes have real text to chew on.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| name | COMBO | airfoil | 16 options: airfoil, hotdog, banana-detection, voc2012, cifar10_tiny, dog_tiny, +10 |
| subfolderopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| extract_dir | STRING | — |