GithubHelp home page GithubHelp logo

deep-diver / lora-deployment Goto Github PK

View Code? Open in Web Editor NEW
31.0 2.0 6.0 7.69 MB

LoRA fine-tuned Stable Diffusion Deployment

Home Page: https://deep-diver.github.io/LoRA-deployment/

License: Apache License 2.0

Jupyter Notebook 99.88% Python 0.12%
generative-ai serving stable-diffusion huggingface-inference-endpoint

lora-deployment's Introduction

LoRA-deployment

This repository demonstrates how to serve multiple LoRA fine-tuned Stable Diffusions from ๐Ÿงจ Diffusers library on Hugging Face Inference Endpoint. Since only few ~ MB of checkpoint is produced after finetuning with LoRA, we can switch different checkpoint for different fine-tuned Stable Diffusion in super quick, memory efficient, and disk space efficient ways.

For demonstration purpose, I have tested the following Hugging Face Model repositories which has LoRA fine-tuned checkpoint(pytorch_lora_weights.bin ):

Notebook

  • Pilot notebook: shows how to write and test a custom handler for Hugging Face Inference Endpoint in local or Colab environments
  • Inference notebook: shows how to request inference to the custom handler deployed on Hugging Face Inference Endopint
  • Multi-workers inference notebook: shows how to run simultaneous requests to the custom handler deployed on Hugging Face Inference Endpoint in Colab environment

Custom Handler

Script

  • inference.py: standalone Python script to send requests to the custom handler deployed on Hugging Face Inference Endpoint

Reference

lora-deployment's People

Contributors

deep-diver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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