Giter Club home page Giter Club logo

fetch-configs's Introduction

Create a Dataset of Configs for diffusers Model Components

Setup Dependencies

pip install -r requirements.txt

Download Configs

This script will download the configs for a diffusers model component, e.g. UNet and save them to a configs. It will also load in the config into a UNet model and save the config in the latest format as config_updated.json

python fetch_configs.py

Should the fetching process be interrupted, the script also creates a cache of configs already downloaded so that it doesn't have to download them again.

python fetch_configs.py --cache cache.json

Any errors will be written to a fetch_configs.log file.

Build Dataset

Once the configs have been downloaded, we can build a dataset of configs for a model component. This script will create a csv file containing metadata for each config. The csv file contains the following columns:

'org_id'
'model_name'
'downloads'
'likes'
'class_name' # UNet model class
'config_hash' # hash of the config string in the latest diffusers format
'updated_config_path' # path to the config json in the latest diffusers format
'pipeline' # pipeline that uses this class

Some example rows.

    org_id                model_name  ...                                updated_config_path                 pipeline
0     5w4n  deliberate-v2-inpainting  ...  configs/5w4n/deliberate-v2-inpainting/unet/con...  StableDiffusionPipeline
1  CompVis     stable-diffusion-v1-4  ...  configs/CompVis/stable-diffusion-v1-4/unet/con...  StableDiffusionPipeline
2  EK12317           Ekmix-Diffusion  ...  configs/EK12317/Ekmix-Diffusion/unet/config_up...  StableDiffusionPipeline
3    Lykon               DreamShaper  ...  configs/Lykon/DreamShaper/unet/config_updated....  StableDiffusionPipeline
4    Meina              MeinaMix_V10  ...  configs/Meina/MeinaMix_V10/unet/config_updated...  StableDiffusionPipeline

Link to example dataset

This metatdata.csv file and all the downloaded configs and converted configs can up uploaded to a dataset repo by passing in a repo id.

python build_dataset.py --input_path <path to dowloaded configs folder> --repo_id <repo_id>

If no repo id is passed in, the script will just create the metadata.csv file.

fetch-configs's People

Contributors

dn6 avatar

Watchers

 avatar

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.