Giter Site home page Giter Site logo

etherealxx / batchlinks-webui Goto Github PK

View Code? Open in Web Editor NEW
157.0 2.0 61.0 4.49 MB

Download several Huggingface, MEGA, and CivitAI links at once. SD webui extension. For colab.

License: MIT License

Python 97.95% JavaScript 0.54% Shell 0.32% Batchfile 1.19%
colab stable-diffusion stable-diffusion-web-ui stable-diffusion-webui-plugin steble-diffusion-webui batch-download bulk-downloader mass-downloader gradio gradio-interface downloader

batchlinks-webui's Introduction


Logo

BatchLinks Downloader

Batch-downloading models and stuff in stable-diffusion-webui colab made simple and fast.

Report Bug Β· Request Feature

Table of Contents
  1. Installation
  2. About
  3. Example
  4. Syntax
  5. Additional Syntax
  6. Gradio Queue
  7. Other Features
  8. Release Notes
  9. Roadmap
  10. Known Bugs
  11. Contributing
  12. Contact
  13. Acknowledgments

does this repo still maintained?

Installation

Copy this line into your colab installation cell. Or into a new cell if you already launched the webui.

!git clone https://github.com/etherealxx/batchlinks-webui /content/stable-diffusion-webui/extensions/batchlinks-webui

or, you can copy the url of this repo and install it via webui and restart the UI.
Logo
(If gradio no interface is running or bad gateway shows up when restarting the UI, that means you need to restart the cell anyway πŸ˜…)

Using --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.
Logo

You can also run this extension in SDless mode btw.

While it's not recommended to use this extension on your local installation, you can use this extension on Windows. More here.

About

This extension will streamline your downloads on your 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!

Example

Look at this example
Logo

#model
https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3_orangemixs.safetensors
#vae
https://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt
#embed
https://huggingface.co/datasets/Nerfgun3/bad_prompt/resolve/main/bad_prompt_version2.pt
https://huggingface.co/etherealxx/whoseisthis/resolve/main/bad_artist.pt
#lora
https://civitai.com/api/download/models/8840 ##1-mb-lora-trained-in-5-mins-that-does-the-same-thing-as-25-gb-model-but-better
https://civitai.com/api/download/models/6891 ##sans undertale
https://mega.nz/file/gAxTWBAI#uL7EZay-OND5G6ELJlGfUNG0s7Q4TynZKqFdvs0v0tc ##agent8-finetune
https://mega.nz/file/oU43FSTY#vwAfsAb7RKJ4xtsSP7uzrKpWhh1y8BdpIBFurwsVP2o ##agent8-dreambooth
#hypernet
https://cdn.discordapp.com/attachments/1070489470127841381/1070489471964954684/MomopocoV3.pt

This 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

You 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.

When 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

When the download is complete, the downloaded file will be listed
Logo

Syntax

Hashtag

  • 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 for valid hashtags.

    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.

Links

Double Hashtag

  • 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)

Others

  • Other texts will be ignored.

Valid Hashtags

#model, #models, #checkpoint, or #checkpoints will put the downloaded file to /content/stable-diffusion-webui/models/Stable-diffusion

#embedding, #embeddings, #embed, #embeds, #textualinversion, or #ti will put the downloaded file to /content/stable-diffusion-webui/embeddings

#vae or #vaes will put the downloaded file to /content/stable-diffusion-webui/models/VAE

#hypernetwork, #hypernetworks, #hypernet, #hypernets, #hynet, or #hynets will put the downloaded file to /content/stable-diffusion-webui/models/hypernetworks

#lora or #loras will put the downloaded file to /content/stable-diffusion-webui/models/Lora

#addnetlora, #loraaddnet, #additionalnetworks, or #addnet will put the downloaded file to /content/stable-diffusion-webui/extensions/sd-webui-additional-networks/models/lora

#aestheticembedding or #aestheticembed will put the downloaded file to content/stable-diffusion-webui/extensions/stable-diffusion-webui-aesthetic-gradients/aesthetic_embeddings

#controlnet or #cnet will put the downloaded file to /content/stable-diffusion-webui/extensions/sd-webui-controlnet/models

#upscale or #upscaler will put the downloaded file to /content/stable-diffusion-webui/models/ESRGAN

#lycoris, #locon, or #loha will put the downloaded file to /content/stable-diffusion-webui/extensions/sd-webui-additional-networks/models/lora/lycoris

#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

Lycoris/Locon/Loha will works just fine if you use #addnetlora instead, as long as you have both addnet extension and locon extension installed. It's unclear if it's can be loaded by native auto1111 lora. (Tell me if you know more about this.)

Github 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)

How to get the direct links (Important!)

See here

Huggingface's download method

So 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.

Additional Syntax

Rename Downloaded Files

Using > symbol, you can rename files. Take this for example
Log
Mostly catbox file has random name, by using > symbol after the link, you can type the desired name on the right. (Don't forget the extension)

Running Shell Commands

You 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πŸ˜…)
Log Log
You can run many lines at once too!

Extract Everyting (@extract)

You can use @extract to extract every *.7z, *.rar, and *.zip on current directory).

#lora
<example lora .zip link>
@extract
#embed

This 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.

Custom Hashtag Path (@new)

You can use @new <hashtagname> <directory> to make a new usable hashtag and assign a directory path to it.
For example, you type this and press the Download All! button:

@new #private /content/stable-diffusion-webui/outputs
#private
<example model link>

This 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.

Custom Direct Link Download with aria2 (@aria2)

If 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:

@aria2 {link} {path/hashtag} > {filename} 

You can change @aria2 with @aria, both works. Both the path/hashtag and filename is optional. This command was made to avoid hassle writing this:

aria2c --summary-interval=1 --console-log-level=error -c -x 16 -s 16 -k 1M {link} -d {path} -o {filename}

There are several ways to use it. Here i use a 20MB download test file as an example.

@aria2 http://212.183.159.230/20MB.zip

☝️ 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).

@aria2 http://212.183.159.230/20MB.zip #vae

☝️ This will download the file into where #vae points to (which is the vae directory). You can use custom hashtag here as well.

@aria2 http://212.183.159.230/20MB.zip /content/stable-diffusion-webui 

☝️ 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.

@aria2 http://212.183.159.230/20MB.zip /content/stable-diffusion-webui > 20megabytes.zip

☝️ 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.

Gradio Queue

If you use --gradio-queue argument on launch.py, some feature will be activated.

Logging

Enable 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.
Log

Cancel

Pressing 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.
Log

Progress Bar

There will be an additional progress bar that tells you the current activities.
Log

Changes if --gradio-queue is off

Feature listed above will dissapear, and your only option for download is just aria2 (speed is priority).
Note that when you pressed the Download All! button, nothing will shows up on the UI. You need to check the colab console.
checkoff
Another thing to note is your download session will always be cutted every 70 seconds (to prevent hangs/desync).
off
Don'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.
off

Other Features

Notification

This extension will play sound effect when the download process is completed. It's somewhat buggy at the moment though.

Copy From Pastebin

You 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.
off

SDless mode

This mode will run the extension without the need of stable-diffusion-webui. Good for my own purpose of debugging it😁.
off

Copy-paste this on a new colab cell then run it:

from IPython.display import clear_output
!pip3 show virtualenv >/dev/null || pip install -q virtualenv
![ -d gradiovenv ] || virtualenv gradiovenv
!git clone https://github.com/etherealxx/batchlinks-webui \
/content/stable-diffusion-webui/extensions/batchlinks-webui
pip3 show gradio >/dev/null || pip install -q gradio==3.16.2; \
pip3 show tqdm >/dev/null || pip3 install -q tqdm
clear_output(wait=True)
!source gradiovenv/bin/activate; \
python /content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py

or here's the quicker version without venv:

!pip install gradio==3.16.2
!git clone https://github.com/etherealxx/batchlinks-webui /content/stable-diffusion-webui/extensions/batchlinks-webui
!python /content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py

For 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.

This one for MacOS. Tested on Mojave. Create a shell script and give execute access to it.

#!/usr/bin/env bash
pip3 show virtualenv >/dev/null || pip3 install virtualenv
[ -d gradiovenv ] || virtualenv gradiovenv
git clone https://github.com/etherealxx/batchlinks-webui \
$HOME/Downloads/stable-diffusion-webui/extensions/batchlinks-webui
source gradiovenv/bin/activate; \
pip3 show gradio >/dev/null || pip3 install gradio==3.16.2; \
pip3 show tqdm >/dev/null || pip3 install -q tqdm
source gradiovenv/bin/activate; \
python3 $HOME/Downloads/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py

Local Installation Support

This 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). On Windows, this extension will install MEGAcmd for MEGA file download, wget-windows for download using wget, aria2-static-builds for download using aria2, 7zr and 7z for extracting aria2 installation, and for @extract command. MacOS is just partially supported.

Also 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)
python

Debug Mode (Developer only)

By 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).

There are some batchlinks syntax features that only available on debug mode (putting it on the textbox and click Download All!):

@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.

@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.

Release Notes

Moved here. Check it out for latest features & bug fixes.

Roadmap

  • Add checker for downloaded models (so that it won't download again after the model is downloaded)
  • Different UI for mobile
  • Gradio progress bar
  • Integrating refresh button (create_refresh_button) to refresh models etc. all at once
  • Logo change
  • Moving most of the content of this Readme.md to Wiki instead
  • Other download sites (s-ul.eu, gitgud, bunkr.ru, icedrive)
  • Separate 'download' and 'run command' function with a subtab
  • Support download MEGA and Google Drive folder
  • Using yield instead of gradio's every
  • Youtube video (Tutorial)
  • (Crawler) Download every sd-webui related file from a huggingface repo
  • (Crawler) Download every model from a civitai user page
    _
  • aria2 for huggingface download method
  • Cleaning the code from unnecesarry comments
  • Completed download will use the webui's notification.mp3
  • Support customizable hashtag from the UI
  • Supports Windows local installation
  • UI overhaul
  • Using threading/subprocess instead of os.system to download files
  • (Windows) wget & aria2 support

Known Bugs

  • Progress bar (the yellow bar) doesn't progress as expected
  • Sometimes notification sound doesn't play when downloading same file twice in a row
  • Sometimes notification sound shows up when starting download, instead of when the download process is completed.
  • There's still a chance that the UI of non --gradio-queue session and/or onedotsix freezes after a download session
  • Windows: The delay between file is downloaded and the output shows is pretty long, and even sometimes the notification comes at the wrong time.

Known Fixed Bugs

πŸ‘ˆFixed Bugs
    • Links that has bracket in it needs to be 'escaped' (For example, Baka-DiffusionV1(Fp16).safetensors must be typed Baka-DiffusionV1\(Fp16\).safetensors)
      ☝️Fixed in v2.0.0
    • The delay between file is downloaded and the output shows is really long (1min+) on camenduru's v1.6 colab (Gradio related?)
      ☝️Seems like fixed in v1.1.0
    • File 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.
      ☝️Fixed in v1.1.0
    • Sometimes 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.
      ☝️Seems like fixed somewhere on v3.0.0 and after

Contributing

I no longer actively maintain this project. 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.
But still, a star on this project would be nice. Thanks again.

Contact

My Email - [email protected]
My Youtube - MJ Devlog

Acknowledgments

batchlinks-webui's People

Contributors

camenduru avatar etherealxx avatar rti7743 avatar th3k1n91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

batchlinks-webui's Issues

Downloads using civitai always download in the default directories

Downloads using civitai always download in the default directories regardless of any prior commands; eg:

@new #pokemon_loras /content/stable-diffusion-webui/models/Lora/Pokemon
#pokemon_loras
https://civitai.com/models/8243/misty-pokemon-lora-8-mb

This code should create the Pokemon directory and download into it.

Feature Suggestion and Testing

A lot of embeddings and loras are uploaded to catbox.moe and related sites from users on 4ch.

Maybe an edge case, I tend to store my TIs in Discord since its quite convenient.

Since this extension is already utilizing gdown, downloading from Google Drive also?

Maybe add this as a toggleable option since supporting every site will lead to unexpected things.

[MEGA link]: Failed to create socket for registering for state changes. (Using Google Colab)

Hello there. Thank you so much for creating such a useful extension, it's been a life changer. Today, however, I faced a rather peculiar issue:

2023-05-21 23_29_52-nocrypt_colab_remastered ipynb - Colaboratory - Brave

I don't know what this means, but it's only for MEGA links. It had no issues with Drive, CivitAi, and HuggingFace links. You wanna know what's weird about this? I had used a different Colab earlier the same day and that same link (+ one more) had worked! It downloaded them just fine! So I really don't know what or why this is happening.
Any thoughts? Could this be an issue with this particular Colab? If so, why an issue with only MEGA links?

some civitai models do not download (only Model Preview Images are downloaded)

Some models do not download well, only the preview image downloads.
I will give an example with two models, this is just an example but it happens to me with several,
I will give an example of one that is downloaded and another that is not downloaded, and how it looks in the Sagemaker notebook:
This model does not download it for me, it only downloads the preview image
image
On the other hand, this other model does download it completely
image (1)

at first, I thought it was because one model was heavier than the other, so the heavier one wouldn't download properly for me. But then I tried with others, and it happened the other way around: the heavier one would download, but not the lighter one.

Then I think it had to do with the fact that some models seem to have multiple download options. Some have a download button, while others seem to offer several options (sorry for my ignorance, I'm just starting out with this, so I don't know why some models are like this on Civitai). Well, that's not it either.

So, I don't know what it is. Can you please help me? I don't know if it's an error, or if I'm doing something wrong.

I'll leave two links of two other example models, one that downloads fine for me and another that doesn't:
https://civitai.com/models/23521/anime-pastel-dream <-- This model downloads correctly
https://civitai.com/models/90642/animesh <-- this not

Huggingface links : it's downloading nothing at all

I tried to download all controlnet files from the main tree... nothing.
Only way to download... file by file, is to click on a file on huggingface ([control_v11p_sd15_mlsd.pth, etc.), copy the webpage link for that file into your extension, and then it downloads that unique file... in the root of stable diffusion.
This doesn't batch download anything. If one needs to copy paste the download link of 30 files, it's pretty much useless.

Creating a tag without downloading anything into the folder causes error

Creating a custom tag like this without specifying any downloads causes the extension to break until UI restart.
@new #000None /content/stable-diffusion-webui/models/Lora/000None

This does create the empty folder, but breaks for any subsequent downloads.

I do this to create an empty directory that I use as a makeshift filter.
Feel free to delete this if it's not part of the project scope.

Here is the stack trace:

Adding custom path failed! Reason: unexpected EOF while parsing (<string>, line 1)
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py", line 1692, in run
    downloadedfiles = writeall(oldfilesdict, isshell, addedcustompath)
  File "/content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py", line 1116, in writeall
    newdict = trackall()
  File "/content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py", line 1162, in trackall
    exec(f"os.makedirs({x}path, exist_ok=True)")
  File "<string>", line 1
    os.makedirs(000Nonepath, exist_ok=True)
                   ^
SyntaxError: invalid syntax

some model in civitai cannot download

When download this model https://civitai.com/models/10028/neverending-dream, the error code is below:

https://civitai.com/models/10028/neverending-dream
Traceback (most recent call last):
  File "/user/.local/lib/python3.10/site-packages/gradio/routes.py", line 399, in run_predict
    output = await app.get_blocks().process_api(
  File "/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1299, in process_api
    result = await self.call_function(
  File "/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1022, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/user/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/user/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py", line 1607, in run
    civitdown2(currentlink, currentfolder, choosedowner, currenttorename, False, civitdefault, civitpruned, civitvae)
  File "/user/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py", line 801, in civitdown2
    data_index, data_url, data_filename = civitmodeltypechooser(model, isprunedmodel, modeldefaulttype, civitlinkandnames) #@note
ValueError: too many values to unpack (expected 3)

[HELP NEEDED]: FileNotFoundError raised when more than one download process is cancelled

Whenever i tried to download more than 1 link, for example

https://civitai.com/models/10028/neverending-dream
https://civitai.com/models/43331/majicmix-realistic

and i cancel it midway using the cancel button, it'll raise this error

BatchLinks Downloads starting...

https://civitai.com/models/10028/neverending-dream
[#100615 816MiB/3.9GiB(20%) CN:16 DL:165MiB ETA:19s]

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
100615|INPR|   154MiB/s|/content/stable-diffusion-webui/models/Stable-diffusion/neverendingDreamNED_bakedVae.safetensors

Status Legend:
(INPR):download in-progress.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.

Removed incomplete download: /content/stable-diffusion-webui/models/Stable-diffusion/neverendingDreamNED_bakedVae.safetensors.aria2
Removed incomplete download: /content/stable-diffusion-webui/models/Stable-diffusion/neverendingDreamNED_bakedVae.safetensors
Operation Cancelled

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1018, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 956, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "/usr/local/lib/python3.10/dist-packages/gradio/components.py", line 2608, in postprocess
    dataframe = pd.read_csv(y)
  File "/usr/local/lib/python3.10/dist-packages/pandas/util/_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/pandas/util/_decorators.py", line 331, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py", line 950, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py", line 605, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "/usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py", line 1442, in __init__
    self._engine = self._make_engine(f, self.engine)
  File "/usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py", line 1735, in _make_engine
    self.handles = get_handle(
  File "/usr/local/lib/python3.10/dist-packages/pandas/io/common.py", line 856, in get_handle
    handle = open(
FileNotFoundError: [Errno 2] No such file or directory: 'p'

This error doesn't break the gradio UI though, and you can continue to use the UI like before. However this error won't show if only one link is processed on the box. For example:

https://civitai.com/models/10028/neverending-dream

I tried to find the root of the problem, but sadly i can't. Perhaps someone else can, would be very helpful and appreciatedπŸ™

How to change default Directory for saving files ?

I used SDless mode, i tried to change the path in your parameter but it always lead to /content/SD-Webui...
I want to change default location for saving on my google Drive (mounted) how can i do that ? pls help me !

IndentationError: expected an indented block on line 1497

Tested today (Fri Mar 24 11:23:53 CET 2023)
This error prevent the module to be loaded in colab

File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py", line 1497
if everymethod == False:
IndentationError: expected an indented block

additional network not working

No matter the hashtag it populates in the module lora folder and not the additional network folder. However when i use the other Civitai extension in gradio web diffusion it works fine and that LORA downloads in the additional network folder and allows for keywords to trigger it.

error in path with @new

This is an edition of a bug that wasn't, but since I can't delete it, I edit with this other one.

Many of the errors that I receive when downloading the files is for various reasons but it does not clarify it.
Because the final file already exists. (for example the model already exists)
For not being able to download the source file.
it could be corrected by noting that it already exists, or by renaming it to a version like "duplicate".

Thank you
Good job !

Rename failed - webui running with --share

After downloading a model from CivitAI the rename failed.

Is this because the webui is running with --share?

I tried this in a local Mac running webui without any problem.

Running on public URL: https://206221c3xxx.gradio.live

This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces
Startup time: 14.9s (import torch: 0.9s, import gradio: 0.7s, import ldm: 0.5s, other imports: 0.6s, load scripts: 1.1s, load SD checkpoint: 2.3s, create ui: 0.8s, gradio launch: 7.9s).
BatchLinks Downloads starting...



https://civitai.com/api/download/models/46846
Downloading...
From: https://civitai.com/api/download/models/46846
To: /home/hjwang/stable-diffusion-webui/models/Stable-diffusion/46846

100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5.51G/5.51G [21:49<00:00, 4.21MB/s]Rename failed.

BatchLinks Downloads finished!

CivitAI not working somehow

If you guys also found out about the CivitAI problem, please comment down below with the screenshot of your error message. I will find the culprit of this messπŸ™

completely stopped working for me after AUTO1111 webui 1.6

I am on Google Colab, with /models/Lora hard linked to a Google Drive folder, not sure if that matters, but it's always worked just fine with this extension in the past.

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "/content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py", line 1292, in run
    oldfilesdict = trackall()
  File "/content/stable-diffusion-webui/extensions/batchlinks-webui/scripts/batchlinks-downloader.py", line 1210, in trackall
    exec(f"os.makedirs({x}path, exist_ok=True)")
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/content/stable-diffusion-webui/models/Lora'

I'm not sure why it's trying to make a directory that already exists. Is there a mkdir somewhere in here without -p or without a check to see if the directory exists?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.