{"id":10006516,"date":"2022-09-19T15:13:07","date_gmt":"2022-09-19T07:13:07","guid":{"rendered":"https:\/\/ityet.com\/?p=10006516"},"modified":"2022-09-19T15:13:07","modified_gmt":"2022-09-19T07:13:07","slug":"%e7%94%a8colab%e5%85%8d%e8%b4%b9%e9%83%a8%e7%bd%b2%e8%87%aa%e5%b7%b1%e7%9a%84ai%e7%bb%98%e7%94%bb%e4%ba%91%e5%b9%b3%e5%8f%b0-stable-diffusion","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006516","title":{"rendered":"\u7528Colab\u514d\u8d39\u90e8\u7f72\u81ea\u5df1\u7684AI\u7ed8\u753b\u4e91\u5e73\u53f0\u2014\u2014 Stable Diffusion"},"content":{"rendered":"<p>AI\u7ed8\u753b\u95e8\u69db\u53c8\u53c8\u53c8\u964d\u4f4e\u4e86\uff0c\u4ece\u6700\u5f00\u59cb\u9700\u8981\u82b1\u534a\u5929\u65f6\u95f4\u6298\u817e\u7684 Disco-Diffusion \uff0c\u7d27\u63a5\u7740 <strong>Stable Diffusion<\/strong>  \u5728 github \u4e0a\u5f00\u6e90\uff0c\u5404\u5bb6\u5e73\u53f0\u90fd\u63a8\u51fa\u4e86\u4e91\u5e73\u53f0\uff0c\u8ba9\u7528\u6237\u901a\u8fc7\u8f7b\u677e\u7684\u70b9\u51fb\u3001\u9009\u62e9\u3001\u8f93\u5165\u5c31\u80fd\u751f\u6210\u4e00\u5f20\u5f20AI\u56fe\u3002<\/p>\n<p>\u518d\u5230\u73b0\u5728\uff01\uff01\uff01\u4f7f\u7528 webui \u5728 github \u4e0a\u5f00\u6e90\u4e86\uff0c\u4e0d\u4ec5\u6709\u624b\u52a8\u6559\u7a0b\u3001docker \u6559\u7a0b\uff0c\u8fd8\u6709 Colab \u50bb\u74dc\u5f0f\u7684\u96c6\u6210\u65b9\u6848\u3002<\/p>\n<p>webui github \u5730\u5740\uff1a <a href=\"https:\/\/link.segmentfault.com\/?enc=DphaRRPqGJh2HCM8h3XRYQ%3D%3D.CnXFgcPkkX5RPhFTY7xn4F1ediziXQkqAp6%2F0EVpe1NSLF6betQJuqAqOMfenSfn7e4Uzb%2BHn45B1Ji1fUDVdA%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/sd-webui\/stable-diffusion-webui<\/a><\/p>\n<h2>\u5e73\u53f0\u642d\u5efa<\/h2>\n<p>\u4eca\u5929\u5c31\u6765\u4ea4\u5927\u5bb6\u5982\u679c\u6765\u642d\u5efa\u548c\u4f7f\u7528\u8fd9\u4e2a\u4e91\u5e73\u53f0\u3002<\/p>\n<h3>\u7b2c\u4e00\u6b65:  \u6253\u5f00\u94fe\u63a5<\/h3>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=NMfkv5rOisZA%2FeRmISzSIQ%3D%3D.szjj0JpJuMkyKZoVvoBmFQ8jfde2X4KO9OgJAfTd%2FQnOjjk8f39i4tZeHptUNiDg60OkhpToaq5XMkw4H40Rwx21wrk%2F2sEi6S9wTD20QEB82DgnSAnjn58bzE6F0x4RBK5wqvlB09iYetlQ8Y8VjJWOTAh37d6yjk3VUl2nT%2BWN01TxcMy5tr5UfQvgdf5U\" rel=\"nofollow\">https:\/\/colab.research.google.com\/github\/altryne\/sd-webui-colab\/blob\/main\/Stable_Diffusion_WebUi_Altryne.ipynb<\/a><\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509390\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<h3>\u7b2c\u4e8c\u6b65: \u8fde\u63a5\u8fd0\u884c\u65f6<\/h3>\n<p>\u6253\u5f00\u540e\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684<code>\u8fde\u63a5<\/code>\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509391\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u70b9\u51fb<code>\u786e\u5b9a<\/code><\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509392\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u7b49\u8fde\u63a5\u4e0a\u540e\u6211\u4eec\u8fd0\u884c\u7b2c\u4e00\u6bb5\u811a\u672c\uff0c\u5c31\u662f\u67e5\u770b\u5f53\u524d\u4f7f\u7528\u7684\u673a\u5668\u3002\u4e00\u822c\u662f\u4ece K80\u3001T4\u3001P100\u3001V100 \u4e2d\u968f\u673a\u5206\u914d\u4e00\u4e2a\u3002<\/p>\n<h3>\u7b2c\u4e09\u6b65: \u8bbe\u7f6e Token<\/h3>\n<p>\u70b9\u51fb\u8fd9\u4e2a <strong>1 &#8211; Setup stage<\/strong> \u5de6\u8fb9\u7684\u5c0f\u7bad\u5934\u8fdb\u884c\u5c55\u5f00<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509393\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u5212\u5230 <strong>1.4 Connect to Google Drive<\/strong><\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509394\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u52fe\u9009 download_if_missing \uff0c\u7136\u540e\u5230  <a href=\"https:\/\/link.segmentfault.com\/?enc=AqUIwDOrPbyyp18qYN1z0g%3D%3D.Asc25xBEvEYPhpZawEhcFGhCIFZN2LNgUivONvlav%2FBg%2FGfmihCz06TiUxlN2NlR\" rel=\"nofollow\">https:\/\/huggingface.co\/settings\/tokens<\/a>  \u590d\u5236\u4f60\u7684 toekn \u5e76\u586b\u5165\uff0c\u5173\u4e8e huggingface \u5982\u4f55\u6ce8\u518c\uff0c\u53ef\u4ee5\u770b\u6211\u4e0a\u4e00\u7bc7\u6587\u7ae0\u300a<a href=\"https:\/\/link.segmentfault.com\/?enc=Dp%2FSHMl8tiX3aXL0y1ifnQ%3D%3D.haTr5Fb7fdYsDhSG2LJ3a8Jj2gPfMrdFgsFh2VFPraRcWqMIU%2Bg0fy5T3zRAMJFGM38VcIg3y7jfhlKjZ%2BlQT7qlyluLBkmnVyTqApT5afUfKqNNfTCws5ZUM0sIRS5ZxFSHE6hrZGNqnNHZeeZubPBQKLLzb9aES0Ncm0ckjRjyX3ByZ0lBG986x9d2y4y5h6NvQm8z6t9ah3xgv6YEuP2BmOiEmYZG0O0byEV4wae8NpROEzCKPuAoGMs9HWj00cEaXZDJ0PtoEFNjqrJTg4m68Zt4FmJM0%2B8CAfpiAkq2ccWcognqShSSZGo6z126A7kHcygkaASL%2BxdOz1NCSA%3D%3D\" rel=\"nofollow\">AI\u6570\u5b57\u7ed8\u753b stable-diffusion \u4fdd\u59c6\u7ea7\u6559\u7a0b<\/a>\u300b<\/p>\n<h3>\u7b2c\u56db\u6b65: \u8bbe\u7f6e\u5bc6\u7801<\/h3>\n<p>\u5212\u5230 <strong>2 &#8211; Run the Stable Diffusion webui<\/strong> \u90e8\u5206\uff0c\u56e0\u4e3a\u8981\u90e8\u7f72\u4e00\u4e2a\u670d\u52a1\uff0c\u5f53\u7136\u5f97\u8bbe\u7f6e\u4e00\u4e2a\u5bc6\u7801\uff0c\u4e0d\u7136\u4eba\u4eba\u90fd\u53ef\u4ee5\u968f\u610f\u4f7f\u7528\u4f60\u7684\u670d\u52a1\u4e86\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509395\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<h2>\u7b2c\u4e94\u6b65\uff1a\u8fd0\u884c\u670d\u52a1<\/h2>\n<p>\u5c06\u4ed6\u4eec\u6536\u8d77\u6765\uff0c\u4f9d\u6b21\u8fd0\u884c\u4ee5\u4e0b\u6b65\u9aa4<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509396\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<h3>\u7b2c\u516d\u6b65\uff1a \u6253\u5f00 Web \u670d\u52a1<\/h3>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509397\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u8d26\u53f7\u4e3a webui\uff0c\u5bc6\u7801\u5982\u679c\u8bbe\u7f6e\u4e86\u5c31\u662f\u4f60\u8bbe\u7f6e\u7684\u5bc6\u7801\u3002<\/p>\n<h2>\u4f7f\u7528\u6559\u7a0b<\/h2>\n<p>\u6253\u5f00\u540e\u5c31\u662f\u8fd9\u6837\u4e00\u4e2a\u754c\u9762\uff0c\u4e3b\u8981\u5305\u542b\u4e864\u5757\u529f\u80fd\uff0ctext2img\uff0cimg2img\uff0c\u4eba\u8138\u4fee\u590d\u7b97\u6cd5\uff0c\u7167\u7247\u6e05\u6670\u5316\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509398\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<h2>text2img<\/h2>\n<p>\u6211\u4eec\u9996\u5148\u6765\u770b text2img\uff0c\u4e5f\u5c31\u662f\u8f93\u5165\u4e00\u6bb5\u6587\u5b57\u5c31\u53ef\u4ee5\u751f\u6210\u4e00\u5f20\u7167\u7247\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509399\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u7136\u540e\u6765\u770b\u751f\u6210\u7684\u4e00\u4e9b\u6848\u4f8b\u5427<\/p>\n<p>prompt: a girl with lavender hair and black skirt, fairy tale style background, a beautiful half body illustration, top lighting, perfect shadow, soft painting, reduce saturation, leaning towards watercolor, art by hidari and krenz cushart and wenjun lin and akihiko yoshida<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509400\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<pre><code class=\"jsx\">rimuru looking into the camera, beautiful face, ultra realistic, fully clothed, intricate details, highly detailed, 8 k, photorealistic, octane render, unreal engine, photorealistic, portrait<\/code><\/pre>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509401\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>((a point coloration cat by the lakeside)), big face, small ears, play in the snow, sharp focus, illustration, highly detailed, concept art, matte, anime, trending on artstation<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509402\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>prompt:  Cyberpunk, 8k resolution, castle, the rose sea, dream<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509403\" alt=\"yuantu.png\" title=\"yuantu.png\" loading=\"lazy\"><\/p>\n<p>\u6c34\u58a8\u753b\u98ce\u683c<\/p>\n<p>prompt: a watercolor ink painting of a fallen angel with a broken halo wielding a jagged broken blade standing on top of a skyscraper in the style of anti &#8211; art trending on artstation deviantart pinterest detailed realistic hd 8 k high resolution<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509404\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<h2>img2img<\/h2>\n<p>\u8fd9\u4e2a\u529f\u80fd\u5219\u662f\u5229\u7528\u56fe\u7247\u751f\u6210\u56fe\u7247\u7684\u529f\u80fd\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509405\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509406\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u4e0d\u77e5\u9053\u662f\u4e0d\u662f\u6211\u7535\u8111\u7684\u5206\u8fa8\u7387\u95ee\u9898\uff0c\u9ed8\u8ba4\u5bbd\u9ad8\u4e3a 512 \u548c 256\uff0c\u8fd9\u4e2a\u65f6\u5019\u4f1a\u62a5\u4ee5\u4e0b\u9519\u8bef\uff0c\u4f46\u662f\u5c06\u5bbd\u5ea6\u8c03\u6574\u6210 1024 * 512 \u5c31\u6ca1\u6709\u95ee\u9898<\/p>\n<pre><code class=\"jsx\">RuntimeError: The size of tensor a (128) must match the size of tensor b (32) at non-singleton dimension 3<\/code><\/pre>\n<p>\u751f\u6210\u7684\u4e00\u4e9b\u6848\u4f8b\uff1a<\/p>\n<p>A fantasy landscape, trending on artstation<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509407\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>A fantasy landscape, trending on artstation<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509408\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>a nike sneakers<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509409\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<h2>\u4eba\u50cf\u4f18\u5316<\/h2>\n<p>\u76f4\u63a5\u5c06\u8001\u7167\u7247\u62d6\u5165\u6846\u6846\u3002<\/p>\n<p>\u6848\u4f8b\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509410\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<h2>\u6e05\u6670\u5ea6\u4f18\u5316<\/h2>\n<p>\u5982\u679c\u4f60\u89c9\u5f97\u4f60\u751f\u6210\u7684\u56fe\u7247\u8d28\u91cf\u4e0d\u591f\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u529f\u80fd\u8fdb\u884c4\u500d\u56fe\u8fdb\u884c\u653e\u5927\u3002\u8fd9\u4e2a\u529f\u80fd\u751f\u6210\u65f6\u95f4\u6bd4\u8f83\u4e45\uff0c\u9700\u8981\u8010\u5fc3\u7b49\u5f85, \u5927\u7ea65-10\u5206\u949f\uff0c\u6700\u7ec8\u751f\u6210\u7684\u6e05\u6670\u5ea6\u63d0\u5347\u8fd8\u662f\u86ee\u5927\u7684\u3002<\/p>\n<p>\u6848\u4f8b\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509411\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u6700\u540e\u9644\u4e0a\u4e00\u4e2a\u5e38\u89c1\u53c2\u6570\u8bf4\u660e<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509412\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p>\u66f4\u591a\u5185\u5bb9\u8bf7\u67e5\u770b\u6211\u6574\u7406\u7684 Notion \u6587\u6863 <a href=\"https:\/\/link.segmentfault.com\/?enc=AfrAYAD5Teu3mFNHJbzo%2Bg%3D%3D.OX51jHWexVYZ%2BOG5SAAGGj5rNr25akC%2F29EVpBadGi6l%2FmIip%2BbgjzcshzHy5WDzKZe0YbMRhcl1DiOy6qqDoQ%3D%3D\" rel=\"nofollow\">https:\/\/qiufeng.notion.site\/06fab45ec290447ba41c3fd0f6e78fac<\/a>\uff0c \u5305\u542b\u4e86 10+\u4e2a AI \u7ed8\u753b\u5e73\u53f0\uff0cSD \u548c DD \u4f7f\u7528\u6559\u7a0b\uff0c\u8c03\u53c2\u6559\u7a0b\u4ee5\u53ca\u5176\u4ed6\u7684\u6587\u6863\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042509413\" alt=\"Untitled\" title=\"Untitled\" loading=\"lazy\"><\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042509388\">https:\/\/segmentfault.com\/a\/1190000042509388<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AI\u7ed8\u753b\u95e8\u69db\u53c8\u53c8\u53c8\u964d\u4f4e\u4e86\uff0c\u4ece\u6700\u5f00\u59cb\u9700\u8981\u82b1\u534a\u5929\u65f6\u95f4\u6298\u817e\u7684 Disco-Diffusion \uff0c\u7d27\u63a5\u7740 Stable [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006516","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006516"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006516\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}