{"id":15638760,"url":"https://github.com/etherealxx/batchlinks-webui","last_synced_at":"2025-04-09T23:17:38.757Z","repository":{"id":66027084,"uuid":"600950577","full_name":"etherealxx/batchlinks-webui","owner":"etherealxx","description":"Download several Huggingface, MEGA, and CivitAI links at once. SD webui extension. For colab.","archived":false,"fork":false,"pushed_at":"2023-12-15T06:27:55.000Z","size":4601,"stargazers_count":176,"open_issues_count":14,"forks_count":61,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T23:17:34.393Z","etag":null,"topics":["batch-download","bulk-downloader","colab","downloader","gradio","gradio-interface","mass-downloader","stable-diffusion","stable-diffusion-web-ui","stable-diffusion-webui-plugin","steble-diffusion-webui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etherealxx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-13T03:14:43.000Z","updated_at":"2025-03-30T12:17:42.000Z","dependencies_parsed_at":"2024-10-23T04:36:48.205Z","dependency_job_id":null,"html_url":"https://github.com/etherealxx/batchlinks-webui","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherealxx%2Fbatchlinks-webui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherealxx%2Fbatchlinks-webui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherealxx%2Fbatchlinks-webui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherealxx%2Fbatchlinks-webui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etherealxx","download_url":"https://codeload.github.com/etherealxx/batchlinks-webui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125593,"owners_count":21051771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch-download","bulk-downloader","colab","downloader","gradio","gradio-interface","mass-downloader","stable-diffusion","stable-diffusion-web-ui","stable-diffusion-webui-plugin","steble-diffusion-webui"],"created_at":"2024-10-03T11:23:01.023Z","updated_at":"2025-04-09T23:17:38.731Z","avatar_url":"https://github.com/etherealxx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/etherealxx/batchlinks-downloader\"\u003e\n    \u003cimg src=\"images/batchlinks_logo.png\" alt=\"Logo\" width=\"528\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003eBatchLinks Downloader\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n    Batch-downloading models and stuff in stable-diffusion-webui colab made simple and fast.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/etherealxx/batchlinks-downloader\"\u003e\u003cstrong\u003e\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/etherealxx/batchlinks-downloader/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/etherealxx/batchlinks-downloader/discussions/new?category=ideas\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\n\u003c/div\u003e\n\n\u003c!-- TOC --\u003e\n\u003c!-- - [Installation](#installation)\n- [About](#about)\n- [Example](#example)\n- [Syntax](#syntax)\n    - [Hashtag](#hashtag)\n    - [Links](#links)\n    - [Double Hashtag](#double-hashtag)\n    - [Others](#others)\n  - [Valid Hashtags](#valid-hashtags)\n  - [How to get the direct links (Important!)](#how-to-get-the-direct-links-important)\n  - [Huggingface's download method](#huggingfaces-download-method)\n- [Additional Syntax](#additional-syntax)\n  - [Rename Downloaded Files](#rename-downloaded-files)\n  - [Running Shell Commands](#running-shell-commands)\n  - [Extract Everyting (`@extract`)](#extract-everyting-extract)\n  - [Custom Hashtag Path (`@new`)](#custom-hashtag-path-new)\n  - [Custom Direct Link Download with `aria2` (`@aria2`)](#custom-direct-link-download-with-aria2-aria2)\n- [Gradio Queue](#gradio-queue)\n  - [Logging](#logging)\n  - [Cancel](#cancel)\n  - [Progress Bar](#progress-bar)\n  - [Changes if `--gradio-queue` is off](#changes-if---gradio-queue-is-off)\n- [Other Features](#other-features)\n  - [Notification](#notification)\n  - [Copy From Pastebin](#copy-from-pastebin)\n  - [SDless mode](#sdless-mode)\n  - [Local Installation Support](#local-installation-support)\n  - [Debug Mode (Developer only)](#debug-mode-developer-only)\n- [Release Notes](#release-notes)\n- [Roadmap](#roadmap)\n- [Known Bugs](#known-bugs)\n  - [Known Fixed Bugs](#known-fixed-bugs)\n- [Contributing](#contributing)\n- [Contact](#contact)\n- [Acknowledgments](#acknowledgments) --\u003e\n\u003c!-- /TOC --\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#about\"\u003eAbout\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#example\"\u003eExample\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#syntax\"\u003eSyntax\u003c/a\u003e\u003c/li\u003e\n        \u003cul\u003e\u003cli\u003e\u003ca href=\"#hashtag\"\u003eHashtag\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n        \u003cul\u003e\u003cli\u003e\u003ca href=\"#links\"\u003eLinks\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n        \u003cul\u003e\u003cli\u003e\u003ca href=\"#double-hashtag\"\u003eDouble Hashtag\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n        \u003cul\u003e\u003cli\u003e\u003ca href=\"#others\"\u003eOthers\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#valid-hashtags\"\u003eValid Hashtags\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#how-to-get-the-direct-links-important\"\u003eHow to get the direct links (Important!)\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#huggingfaces-download-method\"\u003eHuggingface's download method\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#additional-syntax\"\u003eAdditional Syntax\u003c/a\u003e\u003c/li\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#rename-downloaded-files\"\u003eRename Downloaded Files\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#running-shell-commands\"\u003eRunning Shell Commands\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#extract-everyting-extract\"\u003eExtract Everyting (`@extract`)\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#custom-hashtag-path-new\"\u003eCustom Hashtag Path (`@new`)\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#custom-direct-link-download-with-aria2-aria2\"\u003eCustom Direct Link Download with `aria2` (`@aria2`)\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#gradio-queue\"\u003eGradio Queue\u003c/a\u003e\u003c/li\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#logging\"\u003eLogging\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#cancel\"\u003eCancel\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#progress-bar\"\u003eProgress Bar\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#changes-if---gradio-queue-is-off\"\u003eChanges if `--gradio-queue` is off\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#other-features\"\u003eOther Features\u003c/a\u003e\u003c/li\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#notification\"\u003eNotification\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#copy-from-pastebin\"\u003eCopy From Pastebin\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#sdless-mode\"\u003eSDless mode\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#local-installation-support\"\u003eLocal Installation Support\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#debug-mode-developer-only\"\u003eDebug Mode (Developer only)\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#release-notes\"\u003eRelease Notes\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#known-bugs\"\u003eKnown Bugs\u003c/a\u003e\u003c/li\u003e\n      \u003cul\u003e\u003cli\u003e\u003ca href=\"#known-fixed-bugs\"\u003eKnown Fixed Bugs\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n    \u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n[does this repo still maintained?](https://github.com/etherealxx/batchlinks-webui/blob/main/regardingthisrepo.md)\n\n## Installation\n\nCopy this line into your colab installation cell. Or into a new cell if you already launched the webui.\n\n```\n!git clone https://github.com/etherealxx/batchlinks-webui /content/stable-diffusion-webui/extensions/batchlinks-webui\n```\n\nor, you can copy the url of this repo and install it via webui and restart the UI.\u003cbr/\u003e\n\u003cimg src=\"images/ext_installer.jpg\" alt=\"Logo\" width=\"362\"\u003e\u003cbr/\u003e\n(If `gradio no interface is running` or `bad gateway` shows up when restarting the UI, that means you need to restart the cell anyway 😅)\n\n\u003c!--\nor, if your colab use the newer version of webui (gradio version above 3.16.0) you can use this instead (it adds a little progress bar)\n\n```\n!git clone -b gradio-v3-16-2 https://github.com/etherealxx/batchlinks-webui /content/stable-diffusion-webui/extensions/batchlinks-webui\n```\n--\u003e\n\nUsing `--gradio-queue` on the launch.py argument is highly recommended, as it enables this extension to show download progress bar on the UI and a cancel button. The option itself has no negative effect on the webui. [Read more here.](https://github.com/etherealxx/batchlinks-webui#gradio-queue)\u003cbr/\u003e\n\u003cimg src=\"images/queue.jpg\" alt=\"Logo\" width=\"300\"\u003e\u003cbr/\u003e\n\nYou can also run this extension in [SDless mode](https://github.com/etherealxx/batchlinks-webui#sdless-mode) btw.\n\nWhile it's not recommended to use this extension on your local installation, you can use this extension on Windows. [More here.](https://github.com/etherealxx/batchlinks-webui#local-installation-support)\n\n## About\n\nThis extension will streamline your downloads on your [stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) colab session. Paste the links you need to download (or you can upload a txt file containing the links), use the hashstag syntax to choose the download location (see below), and hit the `Download All` button to download them!\n\n## Example\n\nLook at this example\u003cbr/\u003e\n\u003cimg src=\"images/example.jpg\" alt=\"Logo\" width=\"738\"\u003e\u003cbr/\u003e\n\n```\n#model\nhttps://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3_orangemixs.safetensors\n#vae\nhttps://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt\n#embed\nhttps://huggingface.co/datasets/Nerfgun3/bad_prompt/resolve/main/bad_prompt_version2.pt\nhttps://huggingface.co/etherealxx/whoseisthis/resolve/main/bad_artist.pt\n#lora\nhttps://civitai.com/api/download/models/8840 ##1-mb-lora-trained-in-5-mins-that-does-the-same-thing-as-25-gb-model-but-better\nhttps://civitai.com/api/download/models/6891 ##sans undertale\nhttps://mega.nz/file/gAxTWBAI#uL7EZay-OND5G6ELJlGfUNG0s7Q4TynZKqFdvs0v0tc ##agent8-finetune\nhttps://mega.nz/file/oU43FSTY#vwAfsAb7RKJ4xtsSP7uzrKpWhh1y8BdpIBFurwsVP2o ##agent8-dreambooth\n#hypernet\nhttps://cdn.discordapp.com/attachments/1070489470127841381/1070489471964954684/MomopocoV3.pt\n```\n\nThis piece of lines will be read from top to bottom. Every hashtag, it will change the current output directory to said directory (see below). So what this example do is it will download `AOM3` model to the model folder, then it will download the vae and put it to the Vae folder. Next it will download two embed, `bad prompt` and `bad artist`. Next it will download several LoRAs from CivitAI and MEGA, and put it to the Lora folder. Lastly, it changes the directory to hypernet directory, then \n\nYou can also copy that example and paste it to a `.txt` file to use later. You can load a `.txt` file containing that piece of lines directly from the UI.\n\nWhen the items is downloading, you can inspect the running code on the colab cell, or just take a coffee and chill☕. If you activate logging, you can inspect the download progress from the UI, more [here](https://github.com/etherealxx/batchlinks-webui#logging)\n\nWhen the download is complete, the downloaded file will be listed\u003cbr/\u003e\n\u003cimg src=\"images/downloaded.jpg\" alt=\"Logo\" width=\"745\"\u003e\u003cbr/\u003e\n\n## Syntax\n\n#### Hashtag \n- Hashtag means change current output directory to this directory. `#model` means every links below this hashtag, will be downloaded to _/content/stable-diffusion-webui/models/Stable-diffusion_, until it hits another hashtag, which will change the output directory again. See [below](https://github.com/etherealxx/batchlinks-webui#valid-hashtags) for valid hashtags.\n\n  Note: If you use some colab that purposefully uses `sd-webui-additional-networks` extension to load Lora, use `#addnetlora` instead of `#lora`. It will download the lora to where it supposed to be.\n\n#### Links\n- Links are the main things you wants to be downloaded. Current supported links are from:\n  - Huggingface (https://huggingface.co/)\n  - MEGA (https://mega.nz/) {using `mega-cmd`}\n  - CivitAI (https://civitai.com/)\n  - Discord attachments (https://cdn.discordapp.com/attachments/)\n  - catbox (https://files.catbox.moe)\n  - Github (https://github.com or https://raw.githubusercontent.com)\n  - Google Drive (https://drive.google.com) {using `gdown`}\n  - Pixeldrain (https://pixeldrain.com/u/)\n  - Mediafire (https://www.mediafire.com/file) {using `mediafire-dl`}\n  - anonfiles (https://anonfiles.com)\n\n  Every links other than that will be ignored. Keep in mind the only supported links are direct download links (see [here](https://github.com/etherealxx/batchlinks-downloader/blob/main/howtogetthedirectlinks.md)). For Huggingface, Civitai (model page link method), Discord attachments, catbox, pixeldrain, and anonfiles, there will be four different method of downloading offered (see [below](https://github.com/etherealxx/batchlinks-webui#huggingfaces-download-method)). For MEGA, it will use `mega-cmd` to download. For Github, if, the link is a raw file, it will download the file. Else, it will use `git clone`, useful to clone extension repo into the webui extension folder.\n\n  More about CivitAI download method [here](https://github.com/etherealxx/batchlinks-webui#civitais-download-method).\n\n#### Double Hashtag\n- Double hashtag means comment. You can put double hashtag in the same line of the link and it will be ignored (keep in mind to put the link first then the double hashtag)\n\n#### Others\n- Other texts will be ignored.\n\n### Valid Hashtags\n\n`#model`, `#models`, `#checkpoint`, or `#checkpoints` will put the downloaded file to _/content/stable-diffusion-webui/models/Stable-diffusion_\n\n`#embedding`, `#embeddings`, `#embed`, `#embeds`, `#textualinversion`, or `#ti` will put the downloaded file to _/content/stable-diffusion-webui/embeddings_\n\n`#vae` or `#vaes` will put the downloaded file to _/content/stable-diffusion-webui/models/VAE_\n\n`#hypernetwork`, `#hypernetworks`, `#hypernet`, `#hypernets`, `#hynet`, or `#hynets` will put the downloaded file to _/content/stable-diffusion-webui/models/hypernetworks_\n\n`#lora` or `#loras` will put the downloaded file to _/content/stable-diffusion-webui/models/Lora_\n\n`#addnetlora`, `#loraaddnet`, `#additionalnetworks`, or `#addnet` will put the downloaded file to _/content/stable-diffusion-webui/extensions/sd-webui-additional-networks/models/lora_\n\n`#aestheticembedding` or `#aestheticembed` will put the downloaded file to _content/stable-diffusion-webui/extensions/stable-diffusion-webui-aesthetic-gradients/aesthetic_embeddings_\n\n`#controlnet` or `#cnet` will put the downloaded file to _/content/stable-diffusion-webui/extensions/sd-webui-controlnet/models_\n\n`#upscale` or `#upscaler` will put the downloaded file to _/content/stable-diffusion-webui/models/ESRGAN_\n\n`#lycoris`, `#locon`, or `#loha` will put the downloaded file to _/content/stable-diffusion-webui/extensions/sd-webui-additional-networks/models/lora/lycoris_\n\n`#altmodel` or `#altmodels` will put the downloaded file to the path you choose when using `--ckptdir` argument on `launch.py` line. If you didn't use that argument, this hashtag will points to the same directory as `#model`\n\n_Lycoris/Locon/Loha_ will works just fine if you use `#addnetlora` instead, as long as you have both [addnet extension](https://github.com/kohya-ss/sd-webui-additional-networks) and [locon extension](https://github.com/KohakuBlueleaf/a1111-sd-webui-locon) installed. It's unclear if it's can be loaded by native auto1111 lora. (Tell me if you know more about this.)\n\nGithub links (if it does not contain `/raw/` or `/release/download/` in it) doesn't need hashtag. It will always considered as webui extension, and the repository will be cloned to _/content/stable-diffusion-webui/extensions/(reponame)_\n\n### How to get the direct links (Important!)\n\nSee [here](https://github.com/etherealxx/batchlinks-downloader/blob/main/howtogetthedirectlinks.md)\n\n### Huggingface's download method\n\nSo there's four supported method: `gdown`, `wget`, `curl` and `aria2`. Use whatever, really. The difference between them are actually little. Myself love using `gdown` since the output is cleaner than the others. `aria2` has the fastest download speed though.\n\n\u003c!-- ### Civitai's download method\n\nThere are two ways to download links from Civit. The `model page link` method, and the `direct link` method.\n\nThe `model page link` method **will automatically** choose the directory of the saved model without even using hashtag. It will download the default model of a model page. The advantage of this method is you will also get the model preview images that can shows up on the latest version of [stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui). This method will also uses the same download protocol as huggingface's (see above). \u003cbr/\u003eThe `model page link` method's link starts with **https://civitai.com/models/**\n\nThe `direct link` method is the old method, which needs hashtag for the downloaded model to be properly placed, and uses `request` module to download. The advantage of this method is you can choose what model variation you want to download by grabbing the right url. See [here](https://github.com/etherealxx/batchlinks-downloader/blob/main/howtogetthedirectlinks.md) for more.\u003cbr/\u003eThe `direct link` method's link starts with **https://civitai.com/api/download/models/**\n\nHere's the difference of syntax between two methods:\n\nModel page link:\n```\nhttps://civitai.com/models/4823/deliberate\n```\nDirect link:\n```\n#model\nhttps://civitai.com/api/download/models/5616\n```\n\nCheck [this page](https://github.com/etherealxx/batchlinks-downloader/blob/main/howtogetthedirectlinks.md) to learn more on how to get the links for each methods. --\u003e\n\n## Additional Syntax\n### Rename Downloaded Files\nUsing `\u003e` symbol, you can rename files. Take this for example\u003cbr/\u003e\n\u003cimg src=\"images/rename.jpg\" alt=\"Log\" width=\"407\"\u003e\u003cbr/\u003e\nMostly catbox file has random name, by using `\u003e` symbol after the link, you can type the desired name on the right. (Don't forget the extension)\n\n### Running Shell Commands\nYou can run shell commands by using `!` in front of the command you want, just like in google colab cells. Then press the `Download All!` button. (Sure, it doesn't download anything, but, well😅)\u003cbr/\u003e\n\u003cimg src=\"images/shell1.jpg\" alt=\"Log\" width=\"200\"\u003e\n\u003cimg src=\"images/shell2.jpg\" alt=\"Log\" width=\"200\"\u003e\u003cbr/\u003e\nYou can run many lines at once too!\n\n### Extract Everyting (`@extract`)\nYou can use `@extract` to extract every `*.7z`, `*.rar`, and `*.zip` on current directory). \n```\n#lora\n\u003cexample lora .zip link\u003e\n@extract\n#embed\n```\nThis will extract everything on Lora folder, since the code runs from top to bottom, and when the `@extract` executes, the current directory is still on Lora folder.\n\n### Custom Hashtag Path (`@new`)\nYou can use `@new \u003chashtagname\u003e \u003cdirectory\u003e` to make a new usable hashtag and assign a directory path to it.\u003cbr/\u003eFor example, you type this and press the `Download All!` button:\n```\n@new #private /content/stable-diffusion-webui/outputs\n#private\n\u003cexample model link\u003e\n```\nThis will make a new hashtag `#private`, make it points to _/content/stable-diffusion-webui/outputs_, set `#private` as current directory, then download whatever into it. You can check if the new hashtag is assigned successfully by looking at the hashtag table on the right/bottom of the screen.\n\n### Custom Direct Link Download with `aria2` (`@aria2`)\nIf there are other direct links that isn't supported by Batchlinks, you can use `@aria` or `@aria2` custom command to download it. The main syntax is:\n```\n@aria2 {link} {path/hashtag} \u003e {filename} \n```\nYou can change `@aria2` with `@aria`, both works. Both the `path/hashtag` and `filename` is optional. This command was made to avoid hassle writing this:\n```\naria2c --summary-interval=1 --console-log-level=error -c -x 16 -s 16 -k 1M {link} -d {path} -o {filename}\n```\nThere are several ways to use it. Here i use a [20MB download test file](http://212.183.159.230/20MB.zip) as an example.\n```\n@aria2 http://212.183.159.230/20MB.zip\n```\n☝️ This will download the file into the current directory (where the hashtags points to). So if before that line you use `#vae`, it will be downloaded to the vae directory. If there are no hashtags before, it'll be sent to the default `#model` directory. The filename will be the last part of the link (`512MB.zip`).\n```\n@aria2 http://212.183.159.230/20MB.zip #vae\n```\n☝️ This will download the file into where `#vae` points to (which is the vae directory). You can use custom hashtag here as well.\n```\n@aria2 http://212.183.159.230/20MB.zip /content/stable-diffusion-webui \n```\n☝️ This will download the file into the written path, which is _/content/stable-diffusion-webui_. Make sure it is a folder path, not a file path.\n```\n@aria2 http://212.183.159.230/20MB.zip /content/stable-diffusion-webui \u003e 20megabytes.zip\n```\n☝️ This will download the file into the written path and rename the file into `20megabytes.zip`. Remember to make sure to write the extension too.\n\n## Gradio Queue\n\nIf you use --gradio-queue argument on `launch.py`, some feature will be activated.\n\n### Logging\n\n\u003c!-- If you use latest version of [stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui), or webui forks that supports `--gradio-queue` args on launch.py, use it and you will be able to --\u003e\nEnable logging by pressing the `Turn On Logging` radio button, and wait till `Logging activated` shows up and the box is blinking with orange border. Logging will tell you what are you actually downloading right now on the webui. After your download session is completed, it's recommended to turn back off the feature.\u003cbr/\u003e\n\u003cimg src=\"images/logging.jpg\" alt=\"Log\" width=\"407\"\u003e\u003cbr/\u003e\n\n### Cancel \nPressing `cancel` button while download in progress will stops the current session. Useful when at one time the download speeds is too slow. If you're currently downloading a single item, that item will be cancelled, but the other downloaded one will remain intact.\u003cbr/\u003e\n\u003cimg src=\"images/cancel.jpg\" alt=\"Log\" width=\"500\"\u003e\u003cbr/\u003e\n\n### Progress Bar\nThere will be an additional progress bar that tells you the current activities.\u003cbr/\u003e\n\u003cimg src=\"images/progress.jpg\" alt=\"Log\" width=\"500\"\u003e\u003cbr/\u003e\n\n### Changes if `--gradio-queue` is off\nFeature listed above will dissapear, and your only option for download is just `aria2` (speed is priority).\u003cbr/\u003eNote that when you pressed the `Download All!` button, **nothing will shows up on the UI**. You need to check the colab console.\u003cbr/\u003e\n\u003cimg src=\"images/checkconsole1.jpg\" alt=\"check\" width=\"407\"\u003e\u003cimg src=\"images/checkconsole2.jpg\" alt=\"off\" width=\"407\"\u003e\u003cbr/\u003e\nAnother thing to note is your download session will always be cutted every 70 seconds (to prevent hangs/desync).\u003cbr/\u003e\n\u003cimg src=\"images/gradiooff1.jpg\" alt=\"off\" width=\"407\"\u003e\u003cbr/\u003e\nDon't worry, you can continue your session by pressing the `Resume Download` button. It will refresh the links with the one you haven't downloaded yet, then pressing `Download All!` will download the remaining links.\u003cbr/\u003e\n\u003cimg src=\"images/gradiooff2.jpg\" alt=\"off\" width=\"407\"\u003e\u003cbr/\u003e\n\n## Other Features\n\n### Notification\n\nThis extension will play sound effect when the download process is completed. It's somewhat buggy at the moment though.\n\n### Copy From Pastebin\n\nYou can put your links on pastebin (write it the way you wrote on Batchlinks), put the pastebin link (https://pastebin.com/xxxx) on the link input, and press the 'Copy from Pastebin' button. It will copy all the the links on the pastebin to the UI. Useful to avoid hassle copy and pasting a bunch of text while on mobile.\u003cbr/\u003e\n\u003cimg src=\"images/pastebin.png\" alt=\"off\" width=\"400\"\u003e\u003cbr/\u003e\n\n### SDless mode\nThis mode will run the extension without the need of stable-diffusion-webui. Good for my own purpose of debugging it😁.\u003cbr/\u003e\n\u003cimg src=\"images/sdless.png\" alt=\"off\" width=\"450\"\u003e\u003cbr/\u003e\n\nCopy-paste this on a new colab cell then run it:\n```\nfrom IPython.display import clear_output\n!pip3 show virtualenv \u003e/dev/null || pip install -q virtualenv\n![ -d gradiovenv ] || virtualenv gradiovenv\n!git clone https://github.com/etherealxx/batchlinks-webui \\\n/content/stable-diffusion-webui/extensions/batchlinks-webui\npip3 show gradio \u003e/dev/null || pip install -q gradio==3.16.2; \\\npip3 show tqdm \u003e/dev/null || pip3 install -q tqdm\nclear_output(wait=True)\n!source gradiovenv/bin/activate; \\\npython /content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py\n```\nor here's the quicker version without venv:\n```\n!pip install gradio==3.16.2\n!git clone https://github.com/etherealxx/batchlinks-webui /content/stable-diffusion-webui/extensions/batchlinks-webui\n!python /content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py\n```\n\nFor Windows, run the sdless-windows.bat. Make sure you have `python3` and `gradio` package version 3.16.2 or above. It won't use venv.\n\nThis one for MacOS. Tested on Mojave. Create a shell script and give execute access to it.\n```\n#!/usr/bin/env bash\npip3 show virtualenv \u003e/dev/null || pip3 install virtualenv\n[ -d gradiovenv ] || virtualenv gradiovenv\ngit clone https://github.com/etherealxx/batchlinks-webui \\\n$HOME/Downloads/stable-diffusion-webui/extensions/batchlinks-webui\nsource gradiovenv/bin/activate; \\\npip3 show gradio \u003e/dev/null || pip3 install gradio==3.16.2; \\\npip3 show tqdm \u003e/dev/null || pip3 install -q tqdm\nsource gradiovenv/bin/activate; \\\npython3 $HOME/Downloads/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py\n```\n\n### Local Installation Support\n\nThis extension was tested to work on Windows 11. But ultimately, the number one priority for me is colab use, so there's might be bugs on Windows 11 one. Maybe also works on Debian-based linux (but you better inspect the source code first).\nOn Windows, this extension will install [MEGAcmd](https://github.com/meganz/MEGAcmd) for MEGA file download, [wget-windows](https://github.com/webfolderio/wget-windows) for download using `wget`, [aria2-static-builds](https://github.com/q3aql/aria2-static-builds) for download using `aria2`, [7zr and 7z](https://www.7-zip.org) for extracting `aria2` installation, and for `@extract` command.\nMacOS is just partially supported.\n\nAlso remember, in order for this extension to work properly, you need make sure that you tick that `add Python 3.10 to PATH` checkbox when you installed Python (Which is already recommended when installing stable-diffusion-webui)\u003cbr/\u003e\n\u003cimg src=\"images/python.png\" alt=\"python\" width=\"400\"\u003e\u003cbr/\u003e\n\n### Debug Mode (Developer only)\n\nBy manually switching `globaldebug = False` to `True` on the source code, or using `--debug` argument when running the sdless mode, the Debug Mode will be activated. It shows every `print` calls i use to track variables. It will also tracks every files on the models (etc.) paths into a `snapshot.txt` file (if there isn't one).\n\nThere are some batchlinks syntax features that only available on debug mode (putting it on the textbox and click `Download All!`):\n\n`@debugresetdownload` - This command will check every model (etc.) directory, and remove every file that isn't on `snapshot.txt`. Useful for me to removes file quickly when testing. **Be careful using this on your local installation.**\n\n`@debugresetdownload` - This command is (supposed to) download a single link with every method available (gdown, curl, wget, aria2), but now i rarely use this command, and haven't updated since. Might be buggy.\n\n## Release Notes\nMoved [here](https://github.com/etherealxx/batchlinks-webui/blob/main/releasenotes.md). Check it out for latest features \u0026 bug fixes.\n\n## Roadmap\n\n- [ ] Add checker for downloaded models (so that it won't download again after the model is downloaded)\n- [ ] Different UI for mobile\n- [ ] Gradio progress bar\n- [ ] Integrating refresh button (`create_refresh_button`) to refresh models etc. all at once\n- [ ] Logo change\n- [ ] Moving most of the content of this `Readme.md` to Wiki instead\n- [ ] Other download sites (s-ul.eu, gitgud, bunkr.ru, icedrive)\n- [ ] Separate 'download' and 'run command' function with a subtab\n- [ ] Support download MEGA and Google Drive folder\n- [ ] Using `yield` instead of gradio's `every`\n- [ ] Youtube video (Tutorial)\n- [ ] (Crawler) Download every sd-webui related file from a huggingface repo\n- [ ] (Crawler) Download every model from a civitai user page\n\u003cbr/\u003e_\n- [x] aria2 for huggingface download method\n- [x] Cleaning the code from unnecesarry comments\n- [x] Completed download will use the webui's notification.mp3\n- [x] Support customizable hashtag from the UI\n- [x] Supports Windows local installation\n- [x] UI overhaul\n- [x] Using threading/subprocess instead of os.system to download files\n- [x] (Windows) wget \u0026 aria2 support\n\n## Known Bugs\n\n- Progress bar (the yellow bar) doesn't progress as expected\n- Sometimes notification sound doesn't play when downloading same file twice in a row\n- Sometimes notification sound shows up when starting download, instead of when the download process is completed.\n- There's still a chance that the UI of non `--gradio-queue` session and/or onedotsix freezes after a download session\n- Windows: The delay between file is downloaded and the output shows is pretty long, and even sometimes the notification comes at the wrong time.\n\u003cbr/\u003e\n\n### Known Fixed Bugs\n\n\u003cdetails\u003e\n  \u003csummary\u003e👈Fixed Bugs\u003c/summary\u003e\n  \u003col\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003cs\u003eLinks that has bracket in it needs to be 'escaped' (For example, \u003ccode\u003eBaka-DiffusionV1(Fp16).safetensors\u003c/code\u003e must be typed \u003ccode\u003eBaka-DiffusionV1\\(Fp16\\).safetensors\u003c/code\u003e)\u003c/s\u003e\u003cbr/\u003e☝️Fixed in \u003ca href=\"dbb2adb3d07e41654244076b8ef4e851c3bb1f0c\"\u003ev2.0.0\u003c/a\u003e\n      \u003cli\u003e\u003cs\u003eThe delay between file is downloaded and the output shows is really long (1min+) on \u003ca href=\"https://github.com/camenduru/stable-diffusion-webui-colab\"\u003ecamenduru's v1.6 colab\u003c/a\u003e (Gradio related?)\u003c/s\u003e\u003cbr/\u003e☝️Seems like fixed in \u003ca href=\"fe6feafc07fbbe3efd2883b33855f8d66b5f89ea\"\u003ev1.1.0\u003c/a\u003e\n      \u003cli\u003e\u003cs\u003eFile downloaded from MEGA will not listed on the output, as it use different download method. There is some delay between the transfare() function complete until it writes the file. I don't know how long the delay is.\u003c/s\u003e\u003cbr/\u003e☝️Fixed in \u003ca href=\"fe6feafc07fbbe3efd2883b33855f8d66b5f89ea\"\u003ev1.1.0\u003c/a\u003e\n      \u003cli\u003e\u003cs\u003eSometimes colab cannot be shut down with a single click on the stop button. Hitting the button several times will raise a KeyboardInterrupt and forcely stopping the cell.\u003c/s\u003e\u003cbr/\u003e☝️Seems like fixed somewhere on \u003ca href=\"0acffad539179b9f6cf4b76581818b62c93a8551\"\u003ev3.0.0\u003c/a\u003e and after\n    \u003c/ul\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n## Contributing\n\n\u003c!-- I just learned python few months ago, by just looking at other peoples project and sometimes asking ChatGPT. Gradio is new for me. I literally just learn it in one day to make this extension, so expect some bugs. --\u003e\n\n[I no longer actively maintain this project](https://github.com/etherealxx/batchlinks-webui/blob/main/regardingthisrepo.md). if you have a suggestion or code-fixing that would make this better, please notify me in the issue tab, fork the repo and create a pull request. \u003cbr/\u003e\nBut still, a star on this project would be nice. Thanks again.\n\n\u003c!--\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n--\u003e\n\n## Contact\n\nMy Email - gwathon3@gmail.com \u003cbr/\u003e\nMy Youtube - [MJ Devlog](https://www.youtube.com/@mjdevlog)\n\n## Acknowledgments\n\n- [Camenduru's Webui Huggingface](https://github.com/camenduru/stable-diffusion-webui-huggingface) - I use his extension as my base (my gradio skill sucks T.T)\n- [SD Civitai Browser](https://github.com/Vetchems/sd-civitai-browser) - Civit download script\n- [Mega-to-Google-Drive](https://github.com/menukaonline/Mega-to-Google-Drive) - MEGA download script\n- [MEGAcmd](https://github.com/meganz/MEGAcmd)\n- [mediafire-dl](https://github.com/Juvenal-Yescas/mediafire-dl)\n- [Pixeldrain downloader](https://github.com/FayasNoushad/Pixeldrain) - Inspiration for Pixeldrain download method\n- [wget-windows](https://github.com/webfolderio/wget-windows)\n- [aria2-static-builds](https://github.com/q3aql/aria2-static-builds)\n- [7zr, 7z](https://www.7-zip.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetherealxx%2Fbatchlinks-webui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetherealxx%2Fbatchlinks-webui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetherealxx%2Fbatchlinks-webui/lists"}