{"id":703,"date":"2023-11-28T15:36:14","date_gmt":"2023-11-28T07:36:14","guid":{"rendered":"http:\/\/www.huerpu.cc:7000\/?p=703"},"modified":"2023-11-28T15:37:44","modified_gmt":"2023-11-28T07:37:44","slug":"pve%e4%b8%8bubuntu22-04%e9%83%a8%e7%bd%b2stable-diffusion%e6%95%99%e7%a8%8b%e4%bd%bf%e7%94%a8nvidia-p100%e6%98%be%e5%8d%a1","status":"publish","type":"post","link":"http:\/\/www.huerpu.cc:7000\/?p=703","title":{"rendered":"PVE\u4e0bubuntu22.04\u90e8\u7f72Stable Diffusion\u6559\u7a0b(\u4f7f\u7528NVIDIA P100\u663e\u5361)"},"content":{"rendered":"<h3>PVE\u4e0bubuntu22.04\u90e8\u7f72Stable Diffusion\u6559\u7a0b(\u4f7f\u7528NVIDIA P100\u663e\u5361)<\/h3>\n<h3>\u4e00\u3001\u4e0b\u8f7dStable Diffusion<\/h3>\n<p>B\u7ad9\u5927\u4f6c<a href=\"https:\/\/space.bilibili.com\/12566101?spm_id_from=333.337.search-card.all.click\">\u79cb\u8449aaaki<\/a>\u7684Stable Diffusion\u7248\u672c\uff0c\u4e0d\u4f46\u53ef\u4ee5\u5728Windows11\u4e0a\u90e8\u7f72\uff0c\u5728Ubuntu22.04\u4e0a\u4e5f\u662f\u8d85\u7ea7\u7b80\u5355\u7684\uff0c\u6211\u4e0b\u8f7d\u7684\u7248\u672c\u662fsd-webui-aki-v4.5\uff0c\u6709\u9700\u8981\u53ef\u4ee5\u53bb\u5927\u4f6c\u4e3b\u9875\u4e0b\u8f7d\uff0c\u6216\u8005\u79c1\u804a\u6211\u3002\u672c\u6559\u7a0b\u53c2\u8003\u4e8e<a href=\"https:\/\/www.bilibili.com\/video\/BV1F14y117Rm\/?spm_id_from=333.880.my_history.page.click&vd_source=abf91b9d7b206ea0120ba1a448905f56\">\u963f\u5b81\u660e\u9053<\/a>\u5927\u4f6c\u7684\u6559\u7a0b\u3002<\/p>\n<h3>\u4e8c\u3001\u51c6\u5907Stable Diffusion<\/h3>\n<p>\u628aStable Diffusion\u4e0b\u8f7d\u7684\u538b\u7f29\u5305\u89e3\u538b\u5230\u684c\u9762\uff0c\u56e0\u4e3awin\u548cLinux\u7684\u533a\u522b\uff0c\u6709\u4e9b\u5b57\u7b26\u5b9a\u4e49\u9700\u8981\u8f6c\u6362\u4e00\u4e0b\uff0c\u8fd9\u91cc\u5c31\u91cd\u65b0\u641e\u4e00\u4e0bwebui.sh \u548c webui-user.sh\u4e24\u4e2a\u6587\u4ef6\u3002<\/p>\n<pre><code class=\"language-shell\">#\u5207\u6362\u5230root\u7528\u6237\nsudo su -\n\n#\u6211\u4eec\u7684sd\u8def\u5f84\ncd \/home\/jason\/Desktop\/sd-webui-aki-v4.5\n\ntouch a.sh\nchmod 777 a.sh\nchmod +x a.sh\n\n#\u7136\u540e\u5728\u56fe\u5f62\u9875\u9762\uff0c\u6253\u5f00webui.sh\uff0c\u62f7\u8d1d\u671f\u5185\u5bb9\u5230a.sh\uff0ca.sh\u4e2d\u5185\u5bb9\u5c31\u9002\u5408\u4e8eLinux\u4e86\n\nrm webui.sh\nmv a.sh webui.sh\n\ntouch b.sh\nchmod 777 ba.sh\nchmod +x b.sh\n\n#\u7136\u540e\u5728\u56fe\u5f62\u9875\u9762\uff0c\u6253\u5f00webui-user.sh\uff0c\u62f7\u8d1d\u671f\u5185\u5bb9\u5230b.sh\uff0cb.sh\u4e2d\u5185\u5bb9\u5c31\u9002\u5408\u4e8eLinux\u4e86\n\nrm webui-user.sh\nmv b.sh webui-user.sh<\/code><\/pre>\n<h3>\u4e09\u3001Stable Diffusion\u8fd0\u884c\u73af\u5883\u51c6\u5907<\/h3>\n<h4>3.1 \u5b89\u88c5Tesla P100\u663e\u5361\u9a71\u52a8<\/h4>\n<pre><code class=\"language-shell\"># installation tips\napt update \napt upgrade -y\napt install vim -y\n\napt install g++ gcc make -y\n\n#\u67e5\u770bubuntu-drivers devices\nroot@hep:~# ubuntu-drivers devices\n== \/sys\/devices\/pci0000:00\/0000:00:10.0 ==\nmodalias : pci:v000010DEd000015F8sv000010DEsd0000118Fbc03sc02i00\nvendor   : NVIDIA Corporation\nmodel    : GP100GL [Tesla P100 PCIe 16GB]\ndriver   : nvidia-driver-470-server - distro non-free\ndriver   : nvidia-driver-450-server - distro non-free\ndriver   : nvidia-driver-535-server - distro non-free\ndriver   : nvidia-driver-418-server - distro non-free\ndriver   : nvidia-driver-390 - distro non-free\ndriver   : nvidia-driver-470 - distro non-free\ndriver   : nvidia-driver-525 - distro non-free\ndriver   : nvidia-driver-535 - distro non-free recommended\ndriver   : nvidia-driver-525-server - distro non-free\ndriver   : xserver-xorg-video-nouveau - distro free builtin\nroot@hep:~#\n\n#\u9009\u62e9nvidia-driver-535 - distro non-free recommended\u8fd9\u4e2a\u63a8\u8350\u7684\u9a71\u52a8\u5b89\u88c5\napt install nvidia-driver-535 -y\n\n#\u91cd\u542f\nreboot\n\n#\u67e5\u770b\u9a71\u52a8nvidia-smi\uff0c\u663e\u793a\u5df2\u7ecf\u53ef\u4ee5\u8bc6\u522bP100\u4e86\nroot@hep:~# nvidia-smi\nTue Nov 28 14:17:48 2023\n+---------------------------------------------------------------------------------------+\n| NVIDIA-SMI 535.129.03             Driver Version: 535.129.03   CUDA Version: 12.2     |\n|-----------------------------------------+----------------------+----------------------+\n| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |\n| Fan  Temp   Perf          Pwr:Usage\/Cap |         Memory-Usage | GPU-Util  Compute M. |\n|                                         |                      |               MIG M. |\n|=========================================+======================+======================|\n|   0  Tesla P100-PCIE-16GB           Off | 00000000:00:10.0 Off |                    0 |\n| N\/A   34C    P0              26W \/ 250W |      4MiB \/ 16384MiB |      0%      Default |\n|                                         |                      |                  N\/A |\n+-----------------------------------------+----------------------+----------------------+\n\n+---------------------------------------------------------------------------------------+\n| Processes:                                                                            |\n|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |\n|        ID   ID                                                             Usage      |\n|=======================================================================================|\n|    0   N\/A  N\/A      1243      G   \/usr\/lib\/xorg\/Xorg                            4MiB |\n+---------------------------------------------------------------------------------------+\nroot@hep:~#<\/code><\/pre>\n<h4>3.2 \u51c6\u5907Python\u73af\u5883<\/h4>\n<pre><code class=\"language-shell\">#\u8fdb\u5165sd\u6839\u76ee\u5f55\ncd \/home\/jason\/Desktop\/sd-webui-aki-v4.5\n#\u5b89\u88c5pip &amp;&amp; Python\u865a\u62df\u73af\u5883\napt install git pip -y\napt install python3-venv -y\npython3 -m venv venv\nsource .\/venv\/bin\/activate\n#\u8bbe\u7f6epip\u6e90\u4e3a\u963f\u91cc\u6e90\npip config set global.index-url https:\/\/mirrors.aliyun.com\/pypi\/simple\/\n#\u66f4\u65b0pip\npip install --upgrade pip  -i https:\/\/mirrors.aliyun.com\/pypi\/simple\/\n#\u589e\u52a0git\u76ee\u5f55\ngit config --global --add safe.directory \/home\/jason\/Desktop\/sd-webui-aki-v4.5<\/code><\/pre>\n<h3>\u56db\u3001\u8fd0\u884cStable Diffusion<\/h3>\n<pre><code class=\"language-shell\">#\u8fd0\u884c\u547d\u4ee4\u4f7f\u7528 .\/webui.sh -f \u6216\u8005bash webui.sh -f \uff0c\u5982\u679c\u4e0d\u4f7f\u7528root\u7528\u6237\uff0c\u53ef\u4ee5\u53bb\u6389f\u53c2\u6570\nbash webui.sh -f\n#\u6b64\u65f6\u4f1a\u5b89\u88c5\u5404\u79cd\u4f9d\u8d56\uff0c\u6162\u6162\u7b49\u5f85\u5c31\u597d\n<\/code><\/pre>\n<p>\u82e5\u62a5\u9519\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-console\">OSError: Can&#039;t load tokenizer for &#039;openai\/clip-vit-large-patch14&#039;. If you were trying to load it from &#039;make sure you don&#039;t have a local directory with the same name. Otherwise, make sure &#039;openai\/clip-vit-large-patch14&#039; is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.<\/code><\/pre>\n<p>\u53ef\u4ee5\u53c2\u8003\u8fd9\u4e2a\u5927\u4f6c\u7684\u89e3\u51b3\u529e\u6cd5http:\/\/www.chen-studio.com\/archives\/128.html\uff0c\u5e94\u8be5\u662f\u5899\u7684\u95ee\u9898\u3002<\/p>\n<h3>\u4e94\u3001\u8bbe\u7f6e\u5916\u90e8\u8bbf\u95ee<\/h3>\n<pre><code class=\"language-shell\">#\u5f00\u653e7860\u7aef\u53e3\nufw allow 7860\nufw enable \n\n#\u542f\u52a8\u53c2\u6570\u52a0\u4e0a\u76d1\u542c\n.\/webui.sh --listen <\/code><\/pre>\n<p>\u5728\u5c40\u57df\u7f51\u522b\u7684\u673a\u5668\u4e0a\uff0c\u8f93\u5165Ubuntu\u7684IP\u548c\u7aef\u53e3\u53f7http:\/\/192.168.31.29:7860\/\u5c31\u53ef\u4ee5\u8bbf\u95ee\u4e86\uff0c\u5982\u679c\u9700\u8981\u5916\u7f51\u8bbf\u95ee\u8fd8\u53ef\u4ee5\u505a\u5185\u7f51\u7a7f\u900f\u7b49\u64cd\u4f5c\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2023\/11\/28\/111.png\" alt=\"111\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PVE\u4e0bubuntu22.04\u90e8\u7f72Stable Diffusion\u6559\u7a0b(\u4f7f\u7528NVIDIA P100\u663e\u5361) \u4e00\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-703","post","type-post","status-publish","format-standard","hentry","category-ai"],"_links":{"self":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=703"}],"version-history":[{"count":2,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/703\/revisions"}],"predecessor-version":[{"id":705,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/703\/revisions\/705"}],"wp:attachment":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}