{"id":17660943,"url":"https://github.com/soulteary/docker-stable-diffusion-taiyi","last_synced_at":"2025-04-30T15:49:11.264Z","repository":{"id":118268544,"uuid":"576277494","full_name":"soulteary/docker-stable-diffusion-taiyi","owner":"soulteary","description":"带 Web UI 的 Docker taiyi (太乙)，中文 Stable Diffusion WebUI 一键运行环境。","archived":false,"fork":false,"pushed_at":"2022-12-09T16:53:06.000Z","size":357,"stargazers_count":92,"open_issues_count":2,"forks_count":18,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-09T23:04:35.430Z","etag":null,"topics":["docker","pytorch","stable-diffusion","taiyi","webui"],"latest_commit_sha":null,"homepage":"https://soulteary.com/2022/12/09/use-docker-to-quickly-get-started-with-the-chinese-stable-diffusion-model-taiyi.html","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soulteary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-09T12:47:08.000Z","updated_at":"2025-01-04T08:59:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab06af1b-ba97-43fb-8f5f-65efb8509f4f","html_url":"https://github.com/soulteary/docker-stable-diffusion-taiyi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fdocker-stable-diffusion-taiyi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fdocker-stable-diffusion-taiyi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fdocker-stable-diffusion-taiyi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fdocker-stable-diffusion-taiyi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soulteary","download_url":"https://codeload.github.com/soulteary/docker-stable-diffusion-taiyi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235222561,"owners_count":18955330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","pytorch","stable-diffusion","taiyi","webui"],"created_at":"2024-10-23T17:09:47.106Z","updated_at":"2025-01-23T03:47:45.466Z","avatar_url":"https://github.com/soulteary.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Stable Diffusion Taiyi\n\n为中文 Stable Diffusion Taiyi(太乙) 准备的容器运行环境，内置 Web UI，干净透明，开箱即用。\n\n![](assets/preview.jpg)\n\n## 快速上手\n\n如果你本地已经准备好了运行 `Docker` 的环境，并且有一张显存在 4G 到 8G 之间的显卡，可以尝试使用下面这个镜像，镜像在 DockerHub 上的尺寸为 8GB（官方镜像 10G+）\n\n如果你手头没有显卡，也不想使用云主机，**那么可以等等后续不需要 GPU 的“模型把玩”文章**，或者翻阅之前有关模型的文章 :D\n\n```bash\ndocker pull soulteary/stable-diffusion:taiyi-0.1\n```\n\n想运行“太乙”，除了需要下载“模型游乐场”镜像之外，我们还需要获取“太乙模型”文件：\n\n```bash\ngit clone https://huggingface.co/IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1\n```\n\n整个仓库尺寸比较大（大概有 18GB），需要花费一些时间：\n\n```bash\nCloning into 'Taiyi-Stable-Diffusion-1B-Chinese-v0.1'...\nremote: Enumerating objects: 157, done.\nremote: Counting objects: 100% (157/157), done.\nremote: Compressing objects: 100% (155/155), done.\nremote: Total 157 (delta 77), reused 0 (delta 0), pack-reused 0\nReceiving objects: 100% (157/157), 3.06 MiB | 22.25 MiB/s, done.\nResolving deltas: 100% (77/77), done.\nFiltering content: 100% (5/5), 8.92 GiB | 11.48 MiB/s, done.\n```\n\n原始项目启用了 `git lfs`，所以添加不添加 `--depth` 参数没有差别，耐心等待模型下载完毕之后，我们编写一个容器编排文件，来启动模型应用：\n\n```yaml\nversion: \"2\"\nservices:\n\n  taiyi:\n    image: soulteary/stable-diffusion:taiyi-0.1\n    container_name: taiyi\n    restart: always\n    runtime: nvidia\n    ipc: host\n    ports:\n      - \"7860:7860\"\n    volumes:\n      - ./Taiyi-Stable-Diffusion-1B-Chinese-v0.1:/stable-diffusion-webui/models/Taiyi-Stable-Diffusion-1B-Chinese-v0.1\n```\n\n将上面的内容保存为 `docker-compose.yml` 之后，执行 `docker compose up -d`，稍等片刻，在浏览器访问启动服务的 IP 地址和对应端口，比如：`http://localhost:7860`，就能够正常使用啦。\n\n![支持太乙模型的 Stable Diffusion Web 控制台](assets/web-console.jpg)\n\n模型运行起来，当然是要玩一把了，我使用博客首页的古诗“醉里不知天在水，满船清梦压星河”为主题，尝试生成了一张图，看起来效果还不错：\n\n![干净透明、详尽的构建日志](assets/generate.jpg)\n\n想要快速上手中文 Stable Diffusion 模型的同学，看到这里就可以啦。\n\n如果你想了解如何从零开始配置 GPU 云服务器环境，或者想了解这个 Stable Diffusion 容器运行环境是如何构建的，可以继续阅读[这篇文章](https://soulteary.com/2022/12/09/use-docker-to-quickly-get-started-with-the-chinese-stable-diffusion-model-taiyi.html)。\n\n## 相关项目\n\n- [“封神榜”模型](https://github.com/IDEA-CCNL/Fengshenbang-LM)\n- [“太乙”的 Web UI](https://github.com/IDEA-CCNL/stable-diffusion-webui)\n- [Huggingface 项目页面](https://huggingface.co/IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulteary%2Fdocker-stable-diffusion-taiyi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoulteary%2Fdocker-stable-diffusion-taiyi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulteary%2Fdocker-stable-diffusion-taiyi/lists"}