Skip to content

vsp245/Colab-AutoWebUI-Downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 

Repository files navigation

s_000

What is it and how to use it?

This is the Python script of a simple file manager\downloader with GUI; working with "AUTO111 SD WebUI" in the Google Colab environment.

Usage:
  1. Clone "AUTO111 SD WebUI" from github:
  2. Then copy\past the full content from "Colab_AutoWebUI_Downloader.py" to any cell in your Colab sheet and run this cell.

What can it do?

Downloading files from

  • Google Drive
  • HuggingFace
  • Civitai
  • Mega

Uploading files to

  • Google Drive
  • Mega

File Catalog

  • You can list all your files and models links, group them for flexible access.

File Manager

  • Copying\Moving files within "AUTO111 SD WebUI" and Google Drive.

Download Images

  • A standard feature that just has to be here.
  • Pack all images from a specific folder and download using a browser.
  • Copy images to Google Drive.

Link types

Format of the links that the script understands.

Google Drive

  • link : https://drive.google.com/file/d/xxxxxxxx-33characters-xxxxxxxxxxx/
  • file id : xxxxxxxx-33characters-xxxxxxxxxxx

HuggingFace

  • link : https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt

Civitai

  • link : https://civitai.com/models/12345/some-name-here
    • The latest available "model version" will be downloaded. A file selection menu will popup if needed.

  • link : https://civitai.com/models/12345?modelVersionId=54321
    • Link with specific "model version". A file selection menu will popup if needed.

  • link : https://civitai.com/api/download/models/54321?type=Model&format=PickleTensor
    • Direct download link.

  • model version : 54321
    • This is the number that appears when you hover over the "Download" button on the model page.

Mega

  • link : https://mega.nz/file/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Other stuff

The main interface and features of the script are quite obvious. There are only two things that needs to be explained is the catalog structure and "download to auto" mode.

Catalog

The Catalog is a regular Python dictionary, and its looks like this:
CATALOG = {

    "models":{ # <== "label"
        
        "Analog Diffusion":{ # <== "file name"
            "link": "1344", },
        
        "stable diffusion v1.5":{ # <== "file name"
            "link": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt",
            "add": "ft-mse-840000-ema-pruned",},
    },
    
    "other":{ # <== "label"
    
        "ft-mse-840000-ema-pruned":{ # <== "file name"
            "link": "https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt",
            "dst": "vae", },
    },
    
    "for merge": { # <== "label"
    
        "set for merge №1": { # <== "file name"
            "add": "1344, stable diffusion v1.5",}, # download model from civitai and "stable diffusion v1.5" from "models" label
    },
}

As you can see, the Catalog consists of Labels, which consist of File Names, which can contain three types of fields: "link", "add" and "dst"

In GUI it looks like this:

s_001

Labels
Label is a dropdown menu. Feel free to add your labels and they will also appear in the interface.

    File Names
    This is items in the dropdown menu.

      "link"
      In this field you can specify any link that the script understands.

      "add"
      In this field you can specify other File Names from Catalog or links that will be downloaded next in turn automatically. Must be separated by commas.

      "dst"
      In this field you can specify where to save file in "auto" mode, explained below.

Download to auto

Relative paths to different WebUI folders are written inside the script and have the short name abbreviation.
You can easily add your own paths; for now the following short names available:
models, vae, lora, hypernet, text.inv.

When you download a file, you can choose from paths short names where to save it. Or you can leave the "auto" option. In this case, the following logic will be used:

    If the Label matches the path short name, then everything from this Label will be saved to this path.
    For example, if the Label is named "models" and "auto" mode selected, then all files downloaded from this Label will be saved to "/models/Stable-diffusion" path.
    If the Label is named "text.inv." and "auto" mode selected, then all files downloaded from this Label will be saved to "/embeddings" path.

    If the file is downloaded from civitai.com, and "auto" mode selected, then the script will first try to determine saving path according to civitai classification.

    If the file has "dst" field specified, and "auto" mode selected, then all previous methods will be ignored and the file will be saved in corresponding path.
    For example, whith "dst":"text.inv." and "auto" mode selected, the file will be saved to "/embeddings" path.

    If the path could not be determined, the file will be saved to the WebUI root folder, from where you can easily move it using the file manager features.

In other words "auto" mode is: "dst" field > civitai classification > Label name.

About

Download, Upload, File Manager for "AUTO111 SD WebUI" and Google Colab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages