Git Product home page Git Product logo

stable_diffusion_api_demo's Introduction

使用说明(重要!)

step1: docker打包镜像--sddemo

docker build -t sddemo .

step2: 运行gpu镜像--sddemo

docker run --gpus all -it -p 3000:3000  sddemo

step3: 登录终端启动服务(开两个窗口)(手动)

cd /sd_demo/back_flask
flask --app app run

注:第一次启动服务需要下载模型,约5G左右,有报错,重新执行上述命令即可。

后端启动成功后,新开窗口启动react
cd /sd_demo/front_react
npm start

注:react端口:3000;flask端口:5000

界面UI

title

文件结构

前端:front_react
    reactjs开发交互UI,通过api.js访问后端服务
后端:back_flask
    基于python的web框架-flask,直接调用hugging face提供的pytorch模型。

其他命令

挂载文件开发(测试使用)

docker run -p 3000:3000 `
    --gpus all -it `
    -w /sd_demo --mount type=bind,src="$(pwd)",target=/sd_demo `
    sddemo

stable_diffusion_api_demo's People

Contributors

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