X-Adapter  by showlab

Plugin for diffusion models

Created 1 year ago
766 stars

Top 45.6% on SourcePulse

GitHubView on GitHub
Project Summary

X-Adapter addresses the challenge of adapting existing diffusion model plugins (like ControlNet or LoRA) to newer, upgraded base models without costly retraining. It offers universal compatibility, allowing users to leverage their existing plugin ecosystem with enhanced diffusion models, saving significant time and computational resources.

How It Works

X-Adapter employs a novel adapter mechanism that bridges the architectural differences between older and newer diffusion model versions. By introducing lightweight, trainable adapter modules, it effectively "translates" the conditioning signals from plugins trained on older models to be understood by newer base models. This approach avoids full model retraining, making plugin adaptation efficient and accessible.

Quick Start & Requirements

  • Install: conda create -n xadapter python=3.10, conda activate xadapter, pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116, pip install -r requirements.txt.
  • Prerequisites: CUDA 11.6, PyTorch 1.13.1, Python 3.10. xformers is highly recommended for efficiency.
  • Resources: Requires downloading pre-trained models (Stable Diffusion, ControlNet, LoRA) and placing them in ./checkpoint/X-Adapter.
  • Docs: Tutorial

Highlighted Details

  • Enables plugins pretrained on older diffusion models (e.g., SD1.5) to work with upgraded models (e.g., SDXL).
  • Supports various plugin types including ControlNet, LoRA, and ControlNet-Tile.
  • Inference scripts provided for different plugin types.
  • Official implementation of the CVPR 2024 paper "X-Adapter: Adding Universal Compatibility of Plugins for Upgraded Diffusion Model".

Maintenance & Community

  • Official implementation by the authors of the CVPR 2024 paper.
  • Links to Hugging Face for checkpoint models.

Licensing & Compatibility

  • The repository itself does not explicitly state a license in the provided README. The underlying models (Stable Diffusion, ControlNet, LoRA) have their own licenses.

Limitations & Caveats

The installation requires a specific older version of PyTorch (1.13.1) with CUDA 11.6, which may conflict with other CUDA-dependent projects. The README does not detail compatibility with newer PyTorch versions or CUDA toolkits.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP AI at Vercel; Founder of Turborepo; Author of Formik, TSDX), Søren Bramer Schmidt Søren Bramer Schmidt(Cofounder of Prisma), and
1 more.

opendream by varunshenoy

0%
2k
Web UI for diffusion model workflows
Created 2 years ago
Updated 2 years ago
Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), Hanlin Tang Hanlin Tang(CTO Neural Networks at Databricks; Cofounder of MosaicML), and
1 more.

diffusion by mosaicml

0%
707
Diffusion model training code
Created 2 years ago
Updated 8 months ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
5 more.

ai-toolkit by ostris

0.9%
6k
Training toolkit for finetuning diffusion models
Created 2 years ago
Updated 17 hours ago
Feedback? Help us improve.