modelscope / scepter

SCEPTER is an open-source framework used for training, fine-tuning, and inference with generative models.
https://github.com/modelscope/scepter
Apache License 2.0
369 stars 19 forks source link
aigc generative-model lar-gen scedit stylebooth

🪄SCEPTER

🪄SCEPTER is an open-source code repository dedicated to generative training, fine-tuning, and inference, encompassing a suite of downstream tasks such as image generation, transfer, editing. SCEPTER integrates popular community-driven implementations as well as proprietary methods by Tongyi Lab of Alibaba Group, offering a comprehensive toolkit for researchers and practitioners in the field of AIGC. This versatile library is designed to facilitate innovation and accelerate development in the rapidly evolving domain of generative models.

SCEPTER offers 3 core components:

🎉 News

🖼 Gallery for Recent Works

ACE is a unified foundational model framework that supports a wide range of visual generation tasks. By defining CU for unifying multi-modal inputs across different tasks and incorporating long- context CU, we introduce historical contextual information into visual generation tasks, paving the way for ChatGPT-like dialog systems in visual generation.

🛠️ Installation

conda env create -f environment.yaml
conda activate scepter

We recommend installing the specific version of PyTorch and accelerate toolbox xFormers. You can install these recommended version by pip:

pip install -r requirements/recommended.txt
pip install scepter

🧩 Generative Framework

Tutorials

Documentation Key Features
Train DDP / FSDP / FairScale / Xformers
Inference Dynamic load/unload
Dataset Management Local / Http / OSS / Modelscope

📝 Popular Approaches

Currently supported approaches

Tasks Methods Links
Text-to-image generation SD v1.5 Hugging Face Repo
Text-to-image generation SD v2.1 Hugging Face Repo
Text-to-image generation SD-XL Hugging Face Repo
Efficient Tuning LoRA Arxiv   link
Efficient Tuning Res-Tuning(NeurIPS23) Arxiv   link Page link
Controllable image synthesis 🌟SCEdit(CVPR24) Arxiv   link Page link
Image editing 🌟LAR-Gen Arxiv   link Page link
Image editing 🌟StyleBooth Arxiv   link Page link

🖥️ SCEPTER Studio

Launch

To fully experience SCEPTER Studio, you can launch the following command line:

pip install scepter
python -m scepter.tools.webui

or run after clone repo code

git clone https://github.com/modelscope/scepter.git
PYTHONPATH=. python scepter/tools/webui.py --cfg scepter/methods/studio/scepter_ui.yaml

The startup of SCEPTER Studio eliminates the need for manual downloading and organizing of models; it will automatically load the corresponding models and store them in a local directory. Depending on the network and hardware situation, the initial startup usually requires 15-60 minutes, primarily involving the download and processing of SDv1.5, SDv2.1, and SDXL models. Therefore, subsequent startups will become much faster (about one minute) as downloading is no longer required.

Usage Demo

Image Editing Training Model Sharing Model Inference Data Management

Modelscope Studio & Huggingface Space

We deploy a work studio on Modelscope that includes only the inference tab, please refer to ms_scepter_studio and hf_scepter_studio

🔍 Learn More

BibTeX

If our work is useful for your research, please consider citing:

@misc{scepter,
    title = {SCEPTER, https://github.com/modelscope/scepter},
    author = {SCEPTER},
    year = {2023}
}

License

This project is licensed under the Apache License (Version 2.0).

Acknowledgement

Thanks to Stability-AI, SWIFT library and Fooocus for their awesome work.