ARM架构推理Stable Diffusiond

news2025/6/5 13:41:23

 代码仓库:

https://github.com/siutin/stable-diffusion-webui-docker.git

Docker容器地址:

https://hub.docker.com/r/siutin/stable-diffusion-webui-docker/tags

git clone https://github.com/siutin/stable-diffusion-webui-docker.git
cd stable-diffusion-webui-docker

 准备主机中的目录映射:

创建目录

mkdir -p /MY-DATA-DIR && cd /MY-DATA-DIR
mkdir models outputs
sudo chown 10000:$UID -R models outputs
sudo chmod 775 -R models outputs

使用 CUDA 运行

# With the latest CUDA version
docker run -it --name sdw --gpus all --network host \
  -v $(pwd)/models:/app/stable-diffusion-webui/models \
  -v $(pwd)/outputs:/app/stable-diffusion-webui/outputs \
  --rm siutin/stable-diffusion-webui-docker:latest-cuda \
  bash webui.sh --share


# With specific CUDA version
docker run -it --name sdw --gpus all --network host \
  -v $(pwd)/models:/app/stable-diffusion-webui/models \
  -v $(pwd)/outputs:/app/stable-diffusion-webui/outputs \
  --rm siutin/stable-diffusion-webui-docker:latest-cuda-12.6.2 \
  bash webui.sh --share

 仅使用 CPU 运行

docker run -it --name sdw --network host \
  -v $(pwd)/models:/app/stable-diffusion-webui/models \
  -v $(pwd)/outputs:/app/stable-diffusion-webui/outputs \
  --rm siutin/stable-diffusion-webui-docker:latest-cpu \
  bash webui.sh --skip-torch-cuda-test --use-cpu all --share

构建自定义镜像

# Nvidia CUDA image
nvidia-docker buildx build -f Dockerfile.cuda \
                           --platform linux/amd64 \
                           --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
                           --build-arg BUILD_VERSION=custom-cuda \
                           -t siutin/stable-diffusion-webui-docker:custom-cuda .

# Nvidia CUDA image with specific version
nvidia-docker buildx build -f Dockerfile.cuda \
                           --platform linux/amd64 \
                           --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
                           --build-arg BUILD_VERSION=custom-cuda \
                           --build-arg CUDA_VERSION=12.5.1 \
                           -t siutin/stable-diffusion-webui-docker:custom-cuda-12.5 .

# CPU only image
docker buildx build -f Dockerfile.cpu \
                           --platform linux/arm64 \
                           --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
                           --build-arg BUILD_VERSION=custom-cpu \
                           -t siutin/stable-diffusion-webui-docker:custom-cpu .

docker run -it --name sdw --gpus all --network host \
  -v /home/ai/Project/SD模型/sd-webui
/models:/app/stable-diffusion-webui/models \
  -v /home/ai/Project/SD模型/sd-webui
/outputs:/app/stable-diffusion-webui/outputs \
  --rm siutin/stable-diffusion-webui-docker :cpu-v1.10.1-2025-02-10 \
  bash webui.sh --share

Ubuntu 20.04 focal 版本(适合 ARM 64)

sudo tee /etc/apt/sources.list > /dev/null << EOF
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse

# 安全更新源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse

# Docker 镜像源(arm64)
deb [arch=arm64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu focal stable
# deb-src [arch=arm64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu focal stable
EOF
 

Ubuntu 22.04 jammy 版本(适合 ARM 64)

sudo tee /etc/apt/sources.list > /dev/null << EOF
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse

# 安全更新源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse

# Docker 镜像源(arm64)
deb [arch=arm64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu jammy stable
# deb-src [arch=arm64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu jammy stable
EOF
 

构建镜像

docker buildx build -f Dockerfile.cuda   --platform linux/arm64   --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')   --build-arg BUILD_VERSION=custom-cuda-12.4   --build-arg CUDA_VERSION=12.4.0   -t siutin/stable-diffusion-webui-docker:custom-cuda-12.4 .
 

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2398210.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

仓颉项目调试配置与多文件场景下的问题解析

1. 调试配置指南 在 VS Code 中配置好仓颉开发工具链后&#xff0c;只需按下 F5 或 Fn F5 即可启动调试。 在 CodeArts IDE for Cangjie 中&#xff0c;需先通过右上角的 编辑配置 -> 新增配置项 -> 选择 Cangjie (cjdb) Debug -> 选择 launch 模式 -> 点击 确认…

MySQL 8.0 OCP 英文题库解析(十)

Oracle 为庆祝 MySQL 30 周年&#xff0c;截止到 2025.07.31 之前。所有人均可以免费考取原价245美元的MySQL OCP 认证。 从今天开始&#xff0c;将英文题库免费公布出来&#xff0c;并进行解析&#xff0c;帮助大家在一个月之内轻松通过OCP认证。 本期公布试题81~90 试题81:…

Python Pytest

1.Pytest用例发现规则 1.1 模块名(python文件)名必须以 test_ 开头或 _test 结尾&#xff0c;如 test_case&#xff0c;case_test&#xff0c;下划线都不能少 1.2 模块不能放在 . 开头的隐藏目录或者叫 venv的目录下&#xff0c;virtual environment&#xff0c;叫venv1都可以…

如何轻松删除 Android 上的文件(3 种方法)

Android 手机是非常强大的设备&#xff0c;可让我们存储大量的个人数据&#xff0c;从照片和视频到应用程序和文档。然而&#xff0c;随着时间的推移&#xff0c;您的设备可能会因不再需要的文件而变得混乱。删除这些文件有助于释放空间并提高性能。在本指南中&#xff0c;我们…

[特殊字符] Unity UI 性能优化终极指南 — ScrollRect篇

ScrollRect ManualScrollRect API 我参考了官方最新文档&#xff08;基于UGUI 3.0包&#xff09;&#xff0c;加上实际性能测试经验&#xff0c;直接给你梳理&#xff1a; &#x1f3af; Unity UI 性能优化终极指南 — ScrollRect篇 &#x1f9e9; 什么是 ScrollRect&#xff…

自适应流量调度用于遥操作:面向时间敏感网络的通信与控制协同优化框架

英文标题&#xff1a;Adaptive Flow Scheduling for Teleoperation: A Communication and Control Co-Optimization Framework over Time-Sensitive Networks 中文标题&#xff1a;自适应流量调度用于遥操作&#xff1a;面向时间敏感网络的通信与控制协同优化框架 作者信息 …

阿里云服务器-解决宝塔登录不成功

出现问题&#xff1a; This site can’t be reached XX.XX.XXX.XXX took too long to respond. Try: Checking the connection Checking the proxy and the firewall Running Windows Network Diagnostics ERR_CONNECTION_TIMED_OUT 可能是端口未开放 原因&#xff1a;服务器…

graphviz, dot, Error: lost rA sA edge; 独立的模块

1) 有向图dot文件 digraph R { node [shaperecord]; { ranksame rA sA tA } { ranksame uB vB wB } rA -> sA; sA -> vB; t -> rA; uB -> vB; wB -> u; wB -> tA; } 2&#xff09;出现报警信息 Warning: flat edge between adjacent …

Axure-元件流程图

Axure-02 线框图元件使用 目标 元件基本介绍 基础元件的使用 表单型元件的使用 菜单与表格元件的使用 案例&#xff1a;个人简历表 元件基本介绍 概述 在Axure RP中&#xff0c;元件是构建原型图的基础模块。 将元件从元件库里拖拽到画布中&#xff0c;即可添加元件到你…

Python爬虫解析动态网页:从渲染到数据提取

一、动态网页与静态网页的区别 在开始之前&#xff0c;我们需要理解动态网页与静态网页的区别。静态网页的内容在服务器端是固定的&#xff0c;每次请求都会返回相同的结果&#xff0c;通常以HTML文件的形式存储。而动态网页则不同&#xff0c;其内容是通过JavaScript在客户端…

LLMs之MCP:如何使用 Gradio 构建 MCP 服务器

LLMs之MCP&#xff1a;如何使用 Gradio 构建 MCP 服务器 导读&#xff1a;本文详细介绍了如何使用Gradio构建MCP服务器&#xff0c;包括前提条件、构建方法、关键特性和相关资源。通过一个简单的字母计数示例&#xff0c;演示了如何将Gradio应用转换为LLM可以使用的工具。Gradi…

VBA模拟进度条

在上一章中我跟大家介绍了ProgressBar控件的使用方法&#xff0c;但由于该控件无法在64位版本的Office中运行&#xff0c;为此我们可以采用Lable控件来模拟进度条的变化&#xff0c;以解决在64位版本的Office中无进度条控件的问题。 一、设计思路 添加两个重叠的Lable标签控件…

MySQL强化关键_019_索引优化

目 录 一、最左前缀原则 1.完全使用索引 2.部分使用索引 3.不使用索引 4.效率折损 &#xff08;1&#xff09;使用范围查找 &#xff08;2&#xff09;索引断开 二、索引失效场景 1. 索引列参与运算 2.索引列模糊查询以“%”开始 3.索引列是字符串类型&#xff0c;查…

关于list集合排序的常见方法

目录 1、list.sort() 2、Collections.sort() 3、Stream.sorted() 4、进阶排序技巧 4.1 空值安全处理 4.2 多字段组合排序 4.3. 逆序 5、性能优化建议 5.1 并行流加速 5.2 原地排序 6、最佳实践 7、注意事项 前言 Java中对于集合的排序操作&#xff0c;分别为list.s…

不动产登记区块链系统(Vue3 + Go + Gin + Hyperledger Fabric)

好久没有介绍过新项目的制作了&#xff0c;之前做的一直都是Fisco Bcos的项目&#xff0c;没有介绍过Hyperledger Fabric的项目&#xff0c;这次来给大家分享下。 系统概述 不动产登记与交易平台是一个基于Hyperledger Fabric的综合性管理系统&#xff0c;旨在实现不动产登记…

从 GPT 的发展看大模型的演进

这是一个技术爆炸的时代。一起来看看 GPT 诞生后&#xff0c;与BERT 的角逐。 BERT 和 GPT 是基于 Transformer 模型架构的两种不同类型的预训练语言模型。它们之间的角逐可以从 Transformer 的编码解码结构角度来分析。 BERT&#xff08;Bidirectional Encoder Representatio…

【Qt】构建目录设置

问题 ProjectRoot/├── src/ # 源代码│ ├── project1│ └── project2├── build/ # 构建目录│ ├── build-PCIeDemoApp-Desktop_Qt_5_9_7_MSVC2015_64bit-Debug/│ └── build-PCIeDemoApp-Desktop_Qt_5_9_7_MSVC2015_64bit-Rele…

Web后端快速入门(Maven)

Maven是apche旗下的一个开源项目&#xff0c;是一款用于管理和构建java项目的工具。 开源项目&#xff1a;Welcome to The Apache Software Foundation. Maven的作用&#xff1a; 依赖管理&#xff08;方便快捷的管理项目依赖的资源&#xff0c;避免版本冲突问题&#xff09…

机器学习算法:逻辑回归

1. 基础概念 定义&#xff1a; 逻辑回归&#xff08;Logistic Regression&#xff09;是一种用于解决二分类问题的监督学习算法&#xff0c;通过概率预测样本属于某一类别的可能性。 核心特点&#xff1a;输出是概率值&#xff08;0~1&#xff09;&#xff0c;通过阈值&#…

AI健康小屋+微高压氧舱:科技如何重构我们的健康防线?

目前&#xff0c;随着科技和社会的不断发展&#xff0c;人们的生活水平和方式有了翻天覆地的变化。 从吃饱穿暖到吃好喝好再到健康生活&#xff0c;观念也在逐渐发生改变。 尤其是在21世纪&#xff0c;大家对健康越来越重视&#xff0c;这就不得不提AI健康小屋和氧舱。 一、A…