Coder Social home page Coder Social logo

svjack / controllora-chinese Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 5.8 MB

A Light Neural Network To Control Stable Diffusion Spatial Information tuned by Chinese

Python 100.00%
canny canny-edge-detection cc3m clip controlnet diffusers lora pose-estimation stable-diffusion text-image text-to-image transformer

controllora-chinese's Introduction


ControlLoRA-Chinese

使用中文微调的控制Stable Diffusion的空间信息的轻量级网络

In English

简单引述

ControlLoRA是使用LoRA技术可以简单调试stable diffusion来控制其空间信息的工程。一般使用的是简单微小的网络(~7M 参数个数, ~25M 存储)。更多的信息可以从ControlLoRA获得。
这个工程可以看作是ControlLoRA的一个fork。并依据ControlLoRA的方法给出两个中文领域的模型。

模型描述

你可以使用在线的huggingface space,上传你的图片和中文提示文本看输出结果。由于是在cpu上进行部署使用,我推荐你下载这些工程到本地并使用你的gpu进行运行。(由于"is_available"的设定,将会动态根据是否有gpu切换设备)

名称 HuggingFace 模型链接 HuggingFace 空间链接
ControlNet By Canny Chinese 🔪 https://huggingface.co/svjack/canny-control-lora-zh https://huggingface.co/spaces/svjack/ControlNet-Canny-Chinese
ControlNet By Pose Chinese 🏃 https://huggingface.co/svjack/pose-control-lora-zh https://huggingface.co/spaces/svjack/ControlNet-Pose-Chinese

安装和运行

安装

pip install -r requirements.txt

使用gradio部署运行

在安装后,可以cd进入ControlNet-Canny-ChineseControlNet-Pose-Chinese 分别运行

python app.py

打开你的浏览器,进入 http://localhost:7860 在浏览器进行实验。

生成器结果比较

Images
Name Prompt Original Image Backbone Image Transformed Image
ControlNet By Canny Chinese 🔪 表情俏皮的小丑 Girl in a jacket Girl in a jacket Girl in a jacket
ControlNet By Canny Chinese 🔪 满布流星的夜晚 Girl in a jacket Girl in a jacket Girl in a jacket
ControlNet By Canny Chinese 🔪 猫咪吸血鬼 Girl in a jacket Girl in a jacket Girl in a jacket
ControlNet By Pose Chinese 🏃 麦田守望者 Girl in a jacket Girl in a jacket Girl in a jacket
ControlNet By Pose Chinese 🏃 身穿军服的军官 Girl in a jacket Girl in a jacket Girl in a jacket

更多信息和讨论

LoRA: Low-Rank Adaptation of Large Language Models LoRA通过学习秩分解矩阵对并冻结原来的权重减少了训练参数的个数。这极大地减少了大模型对下游任务微调和任务切换的存储限制,开放部署时的推断潜力。LoRA也超过了其它很多调节模型(如:adapter, prefix-tuning, 和 fine-tuning)

在Stable Diffusion领域,我也提供了3个使用Lora进行微调的Stable Diffusion模型。 CC3M数据集由svjack/img2dataset-pq2hf-transform-toolkit进行下载和转换。

自训练的其它 Lora 相关模型展示

名称 HuggingFace模型链接 语言 微调数据集
svjack/pokemon-sd-lora-zh https://huggingface.co/svjack/pokemon-sd-lora-zh Chinese svjack/pokemon-blip-captions-en-zh
svjack/concept-caption-3m-sd-lora-en https://huggingface.co/svjack/concept-caption-3m-sd-lora-en English Conceptual Captions (CC3M)
svjack/concept-caption-3m-sd-lora-zh https://huggingface.co/svjack/concept-caption-3m-sd-lora-zh Chinese Conceptual Captions (CC3M)

你可以通过模型卡片发现如何使用这些模型。

Contact

svjack - [email protected] - [email protected]

Project Link:https://github.com/svjack/ControlLoRA-Chinese

Acknowledgements

controllora-chinese's People

Contributors

svjack avatar

Stargazers

 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.