Giter VIP home page Giter VIP logo

ckpt-to-diffusers's Introduction

CKPT to Diffusers Conversion

This script is used to convert a checkpoint model to a Diffusers model.

Start by cloning the repo and installing the requirements

git clone https://github.com/danbrown/ckpt-to-diffusers.git 
cd ckpt-to-diffusers

chmod +x ./install.sh

You should have the checkpoint downloaded in a ckpt or safetensors, check the format the original file is using, in my case is a safetensors file. wget -O NAMEHERE.safetensors https://civitai.com/api/download/models/29792

⚠️ ATTENTION: both scripts are for diffusion checkpoint models, not LoRAs.

v1 is only compatible with .ckpt format

v2 is compatible with both .ckpt and .safetensors formats, it's the recommended one

v1

For v1, run the ./v1/app.y script with the checkpoint path and the dump path.

python app.py --checkpoint_path="./NAMEHERE.ckpt" --scheduler_type="lms" --dump_path="./out"

v2

For v2, run the ./v2/convert_diffusers20_original_sd.py script with the checkpoint path, the dump path and the reference model.

Check this file if you need more information: convert_diffusers20_original_sd.md

python ./v2/convert_diffusers20_original_sd.py ./NAMEHERE.safetensors ./out --v1 --reference_model runwayml/stable-diffusion-v1-5

Thanks for Kohya and the following links for helping me all this together <3:

If you have any questions, feel free to open an issue here. Thanks!

ckpt-to-diffusers's People

Contributors

danbrown avatar

Stargazers

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