Giter VIP home page Giter VIP logo

sd-lcm-tpu's Introduction

使用Airbox (BM1684X inside) 实现一秒内图像生成(支持文生图、图生图)

简介

这个项目提供了一个基于 Gradio 的 Web 界面,允许用户通过文本描述或上传图片来生成图像。用户还可自行替换出图模型(使用本项目中的脚本自行转换Civitai等模型checkpoint为bmodel即可)。

  • 文本到图像(Text-to-Image):输入描述性文本,系统将根据文本生成相应的图像。 9000e7dbcee891ba3c90de91b87f7b2

  • 图像到图像(Image-to-Image):上传一张参考图片,系统将结合文本描述生成新的图像。 b39439e55b9191d76fdf0c37ef9edaa

  • 自定义随机种子(Custom Seed):设置一个自定义的随机种子,以获得可复现的生成结果。

  • 去噪控制(Denoising Control):通过滑块调整去噪强度,改善生成图像的质量。

如何使用

  1. 建立模型目录,下载默认模型并安装依赖:在终端中运行 bash prepare.sh
  2. 运行项目:在终端中运行 bash run.sh
  3. 访问界面:在浏览器中打开 http://ip:8999(默认端口为 8999,如果端口被占用,Gradio 会自动选择一个可用端口)。
  4. 输入文本:在文本框中输入你的描述;或者同时给出描述和参考图片。
  5. 调整参数:使用滑块调整去噪强度,输入一个自定义的随机种子(可选)。
  6. 生成图像:点击“生成”按钮,系统将根据你的输入生成图像。

自行选择出图底模并转换

C站等平台有大量优秀的SD1.5模型,参考model_export文件夹中的介绍和脚本,可轻松将任何SD1.5模型转换为LCM版本,一秒出图。

注意事项

  • 如果你遇到GradioUnusedKwargWarning等问题,请检查你的 Gradio 版本是否为最新。
  • 若出现生成图片为黑图,可能是电压问题。
  • 测试中部分随机数下出图效果不佳,为偶发问题,排查中。

changes

0402: support controlnet and x86 platform

TODO

  1. 更便捷的一键转换脚本,带有图形化界面 TT 4.8 4.11 over (图形化界面目前暂不release)
  2. 更方便的lora切换 TT 4.12 4.15
  3. 更多的controlnet TT 4.12 4.15
  4. controlnet和sd的权重做融合 未知
  5. cfg & no cfg 在各个scheduler上验证 TT 4.3 over
  6. 更多的例子
  7. controlnet : my prompt is more important | controlnet is more important 4.12 4.15

sd-lcm-tpu's People

Contributors

zillaru avatar forechoandlook avatar zifeng278 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.