{"id":117,"date":"2026-05-11T16:57:01","date_gmt":"2026-05-11T08:57:01","guid":{"rendered":"http:\/\/blog.thirdbody.cn\/?p=117"},"modified":"2026-05-11T17:04:00","modified_gmt":"2026-05-11T09:04:00","slug":"%e6%96%87%e7%94%9f%e5%9b%be%e6%8a%80%e6%9c%af%e4%ba%8c-%e5%bd%93%e5%89%8d%e7%9a%84%e7%bb%9d%e5%af%b9%e4%b8%bb%e6%b5%81%ef%bc%9a%e6%89%a9%e6%95%a3%e6%a8%a1%e5%9e%8b","status":"publish","type":"post","link":"http:\/\/blog.thirdbody.cn\/index.php\/2026\/05\/11\/%e6%96%87%e7%94%9f%e5%9b%be%e6%8a%80%e6%9c%af%e4%ba%8c-%e5%bd%93%e5%89%8d%e7%9a%84%e7%bb%9d%e5%af%b9%e4%b8%bb%e6%b5%81%ef%bc%9a%e6%89%a9%e6%95%a3%e6%a8%a1%e5%9e%8b\/","title":{"rendered":"\u6587\u751f\u56fe\u6280\u672f(\u4e8c)&#8211;\u5f53\u524d\u7684\u7edd\u5bf9\u4e3b\u6d41\uff1a\u6269\u6563\u6a21\u578b"},"content":{"rendered":"<h3>1. \u6982\u8ff0<\/h3>\n<p><strong>\u4ece\u7406\u89e3\u5230\u751f\u6210<\/strong><\/p>\n<p>\u65e0\u8bba\u662f\u6587\u751f\u56fe\u8fd8\u662f\u6587\u751f\u89c6\u9891\uff0c\u5176\u5e95\u5c42\u90fd\u4f9d\u8d56\u4e8e\u4e24\u5927\u5173\u952e\u6280\u672f\uff1a<strong>\u591a\u6a21\u6001\u5bf9\u9f50<\/strong>\u4e0e<strong>\u5185\u5bb9\u751f\u6210<\/strong>\u3002<\/p>\n<ul>\n<li>\n<p><strong>\u591a\u6a21\u6001\u5bf9\u9f50 (Multimodal Alignment)<\/strong><br \/>\n\u8fd9\u662f\u8ba9AI\u201c\u770b\u61c2\u201d\u6587\u5b57\u7684\u7b2c\u4e00\u6b65\u3002\u6838\u5fc3\u601d\u60f3\u662f\u5c06\u6587\u672c\u548c\u56fe\u50cf\/\u89c6\u9891\u8fd9\u4e24\u79cd\u4e0d\u540c\u6a21\u6001\u7684\u6570\u636e\uff0c\u6620\u5c04\u5230\u540c\u4e00\u4e2a\u9ad8\u7ef4\u8bed\u4e49\u7a7a\u95f4\u4e2d\u3002<\/p>\n<ul>\n<li><strong>\u4ee3\u8868\u6a21\u578b\uff1aCLIP<\/strong>\u3002\u5b83\u901a\u8fc7\u5728\u6d77\u91cf\u56fe\u6587\u5bf9\u6570\u636e\u4e0a\u8fdb\u884c\u5bf9\u6bd4\u5b66\u4e60\u8bad\u7ec3\uff0c\u4f7f\u5f97\u8bed\u4e49\u76f8\u4f3c\u7684\u6587\u672c\u548c\u56fe\u50cf\u5728\u5411\u91cf\u7a7a\u95f4\u4e2d\u7684\u8ddd\u79bb\u66f4\u8fd1\u3002\u5f53\u4f60\u8f93\u5165\u201c\u4e00\u53ea\u5728\u8349\u5730\u4e0a\u5954\u8dd1\u7684\u67ef\u57fa\u201d\u65f6\uff0c\u6587\u672c\u7f16\u7801\u5668\u4f1a\u5c06\u5176\u8f6c\u6362\u4e3a\u4e00\u4e2a\u8bed\u4e49\u5411\u91cf\uff0c\u8fd9\u4e2a\u5411\u91cf\u80fd\u7cbe\u51c6\u5730\u6307\u5411\u89c6\u89c9\u6982\u5ff5\u4e2d\u5bf9\u5e94\u7684\u753b\u9762\u7279\u5f81\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5185\u5bb9\u751f\u6210 (Content Generation)<\/strong><br \/>\n\u5728\u7406\u89e3\u4e86\u6587\u672c\u610f\u56fe\u540e\uff0cAI\u9700\u8981\u4ece\u65e0\u5230\u6709\u5730\u521b\u9020\u51fa\u5339\u914d\u7684\u89c6\u89c9\u5185\u5bb9\u3002\u76ee\u524d\u4e3b\u6d41\u7684\u6280\u672f\u8def\u7ebf\u6709\u4e24\u6761\uff1a<strong>\u6269\u6563\u6a21\u578b (Diffusion Model)<\/strong> \u548c <strong>\u81ea\u56de\u5f52\u6a21\u578b (Autoregressive Model)<\/strong>\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>2. \u6269\u6563(Diffusion) VS \u81ea\u56de\u5f52(<strong>Autoregressive<\/strong>)<\/h3>\n<h4><strong>\u6269\u6563\u6a21\u578b (Diffusion Model) - \u5f53\u524d\u7684\u7edd\u5bf9\u4e3b\u6d41<\/strong><\/h4>\n<p>\u8fd9\u662f\u76ee\u524dMidjourney\u3001Stable Diffusion\u7b49\u4e3b\u6d41\u6a21\u578b\u91c7\u7528\u7684\u6280\u672f\u8def\u5f84\u3002\u5b83\u7684\u7075\u611f\u6765\u6e90\u4e8e\u70ed\u529b\u5b66\uff0c\u6838\u5fc3\u8fc7\u7a0b\u5206\u4e3a\u4e24\u6b65\uff1a<\/p>\n<ul>\n<li><strong>\u6b63\u5411\u6269\u6563\uff08\u52a0\u566a\uff09<\/strong>\uff1a\u5728\u8bad\u7ec3\u9636\u6bb5\uff0c\u6a21\u578b\u5b66\u4e60\u5982\u4f55\u4e00\u6b65\u6b65\u5730\u5411\u4e00\u5f20\u6e05\u6670\u7684\u56fe\u7247\u4e2d\u6dfb\u52a0\u9ad8\u65af\u566a\u58f0\uff0c\u76f4\u5230\u5b83\u53d8\u6210\u7eaf\u7cb9\u7684\u968f\u673a\u566a\u58f0\u3002<\/li>\n<li><strong>\u53cd\u5411\u6269\u6563\uff08\u53bb\u566a\uff09<\/strong>\uff1a\u5728\u751f\u6210\u9636\u6bb5\uff0c\u8fc7\u7a0b\u88ab\u9006\u8f6c\u3002\u6a21\u578b\u4ece\u4e00\u4e2a\u5b8c\u5168\u968f\u673a\u7684\u566a\u58f0\u5f00\u59cb\uff0c\u6839\u636e\u6587\u672c\u63d0\u793a\u8bcd\uff08\u4f5c\u4e3a\u6761\u4ef6\u4fe1\u606f\uff09\u7684\u6307\u5bfc\uff0c\u4e00\u6b65\u6b65\u9884\u6d4b\u5e76\u53bb\u9664\u566a\u58f0\uff0c\u6700\u7ec8\u201c\u663e\u73b0\u201d\u51fa\u4e00\u5f20\u5168\u65b0\u7684\u3001\u7b26\u5408\u63cf\u8ff0\u7684\u56fe\u50cf\u3002<\/li>\n<\/ul>\n<p>\u4e3a\u4e86\u964d\u4f4e\u8ba1\u7b97\u6210\u672c\uff0c\u50cfStable Diffusion\u8fd9\u6837\u7684\u6a21\u578b\u91c7\u7528\u4e86<strong>\u6f5c\u5728\u6269\u6563\u6a21\u578b (Latent Diffusion Model, LDM)<\/strong> \u67b6\u6784\u3002\u5b83\u4e0d\u5728\u539f\u59cb\u7684\u50cf\u7d20\u7a7a\u95f4\u8fdb\u884c\u64cd\u4f5c\uff0c\u800c\u662f\u5728\u4e00\u4e2a\u538b\u7f29\u7684\u3001\u4f4e\u7ef4\u5ea6\u7684\u201c\u6f5c\u7a7a\u95f4 (Latent Space)\u201d\u91cc\u8fdb\u884c\u6269\u6563\u8fc7\u7a0b\uff0c\u6700\u540e\u518d\u901a\u8fc7\u4e00\u4e2a\u89e3\u7801\u5668\u5c06\u7ed3\u679c\u8fd8\u539f\u6210\u9ad8\u6e05\u56fe\u50cf\u3002<\/p>\n<h4><strong>\u81ea\u56de\u5f52\u6a21\u578b (Autoregressive Model) - \u7edf\u4e00\u7684\u672a\u6765\u8303\u5f0f\uff1f<\/strong><\/h4>\n<p>\u8fd9\u662f\u4e00\u79cd\u66f4\u63a5\u8fd1\u5927\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u5de5\u4f5c\u65b9\u5f0f\u7684\u601d\u8def\uff0c\u4ee5\u667a\u6e90\u7814\u7a76\u9662\u7684 <strong>Emu3<\/strong> \u4e3a\u4ee3\u8868\u3002<\/p>\n<ul>\n<li><strong>\u6838\u5fc3\u601d\u60f3<\/strong>\uff1a\u201c\u9884\u6d4b\u4e0b\u4e00\u4e2a\u8bcd\u5143 (Next-token Prediction)\u201d\u3002\u5b83\u5c06\u56fe\u50cf\u4e5f\u770b\u4f5c\u4e00\u79cd\u7279\u6b8a\u7684\u201c\u8bed\u8a00\u201d\uff0c\u901a\u8fc7\u4e00\u4e2a\u5206\u8bcd\u5668\uff08Tokenizer\uff09\u5c06\u56fe\u50cf\u79bb\u6563\u5316\u6210\u4e00\u7cfb\u5217\u7684\u89c6\u89c9\u8bcd\u5143\uff08Visual Tokens\uff09\u3002<\/li>\n<li><strong>\u5de5\u4f5c\u65b9\u5f0f<\/strong>\uff1a\u6a21\u578b\u5c06\u6240\u6709\u89c6\u89c9\u8bcd\u5143\u548c\u6587\u672c\u8bcd\u5143\u653e\u5728\u540c\u4e00\u4e2a\u5e8f\u5217\u4e2d\u8fdb\u884c\u8bad\u7ec3\uff0c\u5b66\u4e60\u5b83\u4eec\u7684\u8054\u5408\u5206\u5e03\u3002\u751f\u6210\u56fe\u50cf\u65f6\uff0c\u5b83\u5c31\u50cf\u5199\u6587\u7ae0\u4e00\u6837\uff0c\u6839\u636e\u4e0a\u6587\uff08\u5df2\u751f\u6210\u7684\u8bcd\u5143\uff09\u6765\u9884\u6d4b\u4e0b\u4e00\u4e2a\u6700\u53ef\u80fd\u51fa\u73b0\u7684\u8bcd\u5143\uff0c\u5982\u6b64\u5faa\u73af\u5f80\u590d\uff0c\u76f4\u5230\u751f\u6210\u5b8c\u6574\u7684\u56fe\u50cf\u5e8f\u5217\u3002<\/li>\n<\/ul>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a\u8fd9\u79cd\u8def\u7ebf\u5177\u6709\u6781\u9ad8\u7684\u901a\u7528\u6027\uff0c\u53ef\u4ee5\u7528\u5355\u4e00\u6a21\u578b\u7edf\u4e00\u5904\u7406\u6587\u672c\u3001\u56fe\u50cf\u3001\u89c6\u9891\u7684\u751f\u6210\u4e0e\u7406\u89e3\u4efb\u52a1\uff0c\u5c55\u73b0\u51fa\u5f3a\u5927\u7684\u6269\u5c55\u6f5c\u529b\u3002<\/p>\n<h3>3. \u6269\u6563\u6a21\u578b(Diffusion Model)<\/h3>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.thirdbody.cn\/blog\/202605\/ldm1.png\" alt=\"\" \/><\/p>\n<h4>3.1 \u591a\u6a21\u6001\u5bf9\u9f50--\u6587\u672c\u7f16\u7801\u5668<\/h4>\n<p>\u8fd9\u662f\u8fde\u63a5\u4eba\u7c7b\u8bed\u8a00\u548c\u673a\u5668\u89c6\u89c9\u7684\u6865\u6881\u3002<\/p>\n<ul>\n<li><strong>\u4f5c\u7528<\/strong>\uff1a\u5c06\u4f60\u8f93\u5165\u7684\u81ea\u7136\u8bed\u8a00\u63d0\u793a\u8bcd\uff08Prompt\uff09\uff0c\u5982\u201c\u4e00\u53ea\u6234\u7740\u793c\u5e3d\u7684\u732b\u201d\uff0c\u8f6c\u6362\u6210\u673a\u5668\u80fd\u591f\u7406\u89e3\u548c\u5904\u7406\u7684\u6570\u5b66\u8868\u793a\u2014\u2014\u4e00\u4e2a\u9ad8\u7ef4\u7684\u8bed\u4e49\u7279\u5f81\u5411\u91cf\u3002<\/li>\n<li><strong>\u5b9e\u73b0<\/strong>\uff1a\u901a\u5e38\u4f7f\u7528\u9884\u8bad\u7ec3\u7684\u591a\u6a21\u6001\u6a21\u578b\uff08\u5982CLIP\u6216OpenCLIP\uff09\u4e2d\u7684\u6587\u672c\u7f16\u7801\u5668\u90e8\u5206\u3002\u8fd9\u4e9b\u7f16\u7801\u5668\u5728\u6d77\u91cf\u56fe\u6587\u5bf9\u4e0a\u8fdb\u884c\u4e86\u8bad\u7ec3\uff0c\u80fd\u591f\u5c06\u8bed\u4e49\u76f8\u8fd1\u7684\u6587\u672c\u548c\u56fe\u50cf\u6620\u5c04\u5230\u540c\u4e00\u8bed\u4e49\u7a7a\u95f4\u4e2d\uff0c\u786e\u4fdd\u6a21\u578b\u80fd\u51c6\u786e\u6355\u6349\u201c\u732b\u201d\u3001\u201c\u793c\u5e3d\u201d\u7b49\u6982\u5ff5\u7684\u89c6\u89c9\u5185\u6db5\u3002<\/li>\n<\/ul>\n<h4>3.2 \u5185\u5bb9\u751f\u6210<\/h4>\n<p>\u5f53\u524d\u6709\u4e24\u79cd\u4e3b\u6d41\u7684\u5185\u5bb9\u751f\u6210\u65b9\u5f0f\uff1a\u57fa\u4e8e\u9690\u7a7a\u95f4\u6269\u6563\u7684\u6280\u672f\u3001\u57fa\u4e8e\u6761\u4ef6\u6d41\u5339\u914d\u7684\u6280\u672f\uff0c\u672c\u6587\u4e2d\u7740\u91cd\u8bb2\u8ff0\u524d\u8005<\/p>\n<p>\u8fd9\u662f\u6a21\u578b\u7684\u6838\u5fc3\uff0c\u8d1f\u8d23\u5b9e\u9645\u7684\u56fe\u50cf\u751f\u6210\u3002\u4e3a\u4e86\u5e73\u8861\u751f\u6210\u8d28\u91cf\u4e0e\u8ba1\u7b97\u6548\u7387\uff0c\u4e3b\u6d41\u6a21\u578b\u666e\u904d\u91c7\u7528<strong>\u6f5c\u7a7a\u95f4\u6269\u6563\u6a21\u578b (Latent Diffusion Model, LDM)<\/strong> \u67b6\u6784\u3002<\/p>\n<ul>\n<li>\n<p><strong>\u4e3a\u4f55\u662f\u201c\u6f5c\u7a7a\u95f4\u201d\uff1f<\/strong> \u76f4\u63a5\u5728\u539f\u59cb\u50cf\u7d20\u7a7a\u95f4\uff08\u4f8b\u5982512x512x3\uff09\u8fdb\u884c\u6269\u6563\u4f1a\u6d88\u8017\u5de8\u5927\u7684\u7b97\u529b\u3002LDM\u901a\u8fc7\u4e00\u4e2a\u9884\u8bad\u7ec3\u7684\u7f16\u7801\u5668\uff08VAE Encoder\uff09\u5c06\u9ad8\u6e05\u56fe\u50cf\u538b\u7f29\u5230\u4e00\u4e2a\u7ef4\u5ea6\u66f4\u4f4e\u3001\u4fe1\u606f\u66f4\u5bc6\u96c6\u7684\u201c\u6f5c\u7a7a\u95f4\u201d\u4e2d\u8fdb\u884c\u64cd\u4f5c\uff0c\u6700\u540e\u518d\u901a\u8fc7\u89e3\u7801\u5668\uff08VAE Decoder\uff09\u8fd8\u539f\u6210\u8089\u773c\u53ef\u89c1\u7684\u56fe\u50cf\u3002\u8fd9\u6781\u5927\u5730\u63d0\u5347\u4e86\u8bad\u7ec3\u548c\u63a8\u7406\u901f\u5ea6\u3002<\/p>\n<\/li>\n<li>\n<p>\u6269\u6563\u4e0e\u53bb\u566a<\/p>\n<p>\uff1a<\/p>\n<ul>\n<li><strong>\u8bad\u7ec3\u9636\u6bb5\uff08\u5b66\u4e60\u53bb\u566a\uff09<\/strong>\uff1a\u6a21\u578b\u5b66\u4e60\u4e00\u4e2a\u53cd\u5411\u8fc7\u7a0b\u3002\u5b83\u4f1a\u62ff\u4e00\u5f20\u771f\u5b9e\u56fe\u50cf\uff0c\u9010\u6b65\u5411\u5176\u6dfb\u52a0\u9ad8\u65af\u566a\u58f0\uff0c\u76f4\u5230\u53d8\u6210\u7eaf\u566a\u58f0\u3002\u7136\u540e\uff0c\u8bad\u7ec3U-Net\u7f51\u7edc(\u73b0\u5728\u6bd4\u8f83\u5148\u8fdb\u7684\u6a21\u578b\u4f7f\u7528ViT\u7f51\u7edc\u4ee3\u66ffU-Net)\u5b66\u4f1a\u9884\u6d4b\u6bcf\u4e00\u6b65\u6240\u6dfb\u52a0\u7684\u566a\u58f0\u3002<\/li>\n<li><strong>\u751f\u6210\u9636\u6bb5\uff08\u4ece\u566a\u58f0\u521b\u4f5c\uff09<\/strong>\uff1a\u4ece\u4e00\u4e2a\u968f\u673a\u7684\u9ad8\u65af\u566a\u58f0\u5f00\u59cb\uff0cU-Net\u5728\u6587\u672c\u6761\u4ef6\u7684\u5f15\u5bfc\u4e0b\uff0c\u4e00\u6b65\u6b65\u9884\u6d4b\u5e76\u51cf\u53bb\u566a\u58f0\uff0c\u6700\u7ec8\u5728\u6f5c\u7a7a\u95f4\u4e2d\u201c\u6d6e\u73b0\u201d\u51fa\u4e00\u4e2a\u4ee3\u8868\u76ee\u6807\u56fe\u50cf\u7684\u6f5c\u53d8\u91cf\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>3.3 \u6761\u4ef6\u6ce8\u5165\u673a\u5236 (Conditioning Mechanism) - AI\u7684\u201c\u6307\u6325\u68d2\u201d<\/h4>\n<p>\u8fd9\u662f\u5b9e\u73b0\u201c\u6587\u751f\u56fe\u201d\u7684\u5173\u952e\uff0c\u51b3\u5b9a\u4e86\u6587\u672c\u5982\u4f55\u6307\u5bfc\u56fe\u50cf\u751f\u6210\u7684\u6bcf\u4e00\u6b65\u3002<\/p>\n<ul>\n<li><strong>\u6838\u5fc3\u6280\u672f\uff1a\u4ea4\u53c9\u6ce8\u610f\u529b (Cross-Attention)<\/strong>\u3002\u5728U-Net\u7684\u6bcf\u4e00\u5c42\u53bb\u566a\u8fc7\u7a0b\u4e2d\uff0c\u90fd\u4f1a\u63d2\u5165\u4ea4\u53c9\u6ce8\u610f\u529b\u6a21\u5757\u3002\u8be5\u6a21\u5757\u8ba9\u56fe\u50cf\u7684\u7279\u5f81\uff08\u4f5c\u4e3aQuery\uff09\u53bb\u201c\u67e5\u8be2\u201d\u6587\u672c\u7684\u7279\u5f81\uff08\u4f5c\u4e3aKey\u548cValue\uff09\u3002<\/li>\n<li><strong>\u5de5\u4f5c\u539f\u7406<\/strong>\uff1a\u8fd9\u4f7f\u5f97\u6a21\u578b\u5728\u751f\u6210\u56fe\u50cf\u7684\u6bcf\u4e00\u4e2a\u5c40\u90e8\u65f6\uff0c\u90fd\u80fd\u52a8\u6001\u5730\u5173\u6ce8\u5230\u6587\u672c\u63d0\u793a\u4e2d\u6700\u76f8\u5173\u7684\u8bcd\u6c47\u3002\u4f8b\u5982\uff0c\u5f53\u751f\u6210\u732b\u7684\u8033\u6735\u533a\u57df\u65f6\uff0c\u6ce8\u610f\u529b\u673a\u5236\u4f1a\u8d4b\u4e88\u201c\u732b\u201d\u8fd9\u4e2a\u8bcd\u66f4\u9ad8\u7684\u6743\u91cd\uff1b\u800c\u5728\u751f\u6210\u5e3d\u5b50\u65f6\uff0c\u5219\u4f1a\u805a\u7126\u4e8e\u201c\u793c\u5e3d\u201d\u8fd9\u4e2a\u8bcd\u3002\u8fd9\u79cd\u673a\u5236\u786e\u4fdd\u4e86\u6587\u672c\u8bed\u4e49\u88ab\u7cbe\u786e\u5730\u878d\u5165\u5230\u56fe\u50cf\u7684\u6bcf\u4e00\u4e2a\u7ec6\u8282\u4e2d\u3002<\/li>\n<\/ul>\n<h4>3.4 \u8bad\u7ec3&amp;\u63a8\u7406\u8fc7\u7a0b<\/h4>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.thirdbody.cn\/blog\/202605\/ldm2.png\" alt=\"\" \/><\/p>\n<h5>3.4.1 \u8bad\u7ec3<\/h5>\n<p>\u8bad\u7ec3\u7684\u76ee\u6807\u4e0d\u662f\u8ba9\u6a21\u578b\u8bb0\u4f4f\u67d0\u5f20\u56fe\uff0c\u800c\u662f\u8ba9\u5b83\u638c\u63e1\u4e00\u4e2a\u901a\u7528\u7684\u80fd\u529b\uff1a<strong>\u7ed9\u5b9a\u4efb\u4f55\u4e00\u5f20\u88ab\u566a\u58f0\u6c61\u67d3\u7684\u56fe\u7247\u548c\u6c61\u67d3\u7a0b\u5ea6\uff0c\u80fd\u51c6\u786e\u9884\u6d4b\u51fa\u5176\u4e2d\u7684\u566a\u58f0\u662f\u4ec0\u4e48<\/strong>\u3002<\/p>\n<p>\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u5206\u89e3\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>\n<p>\u6570\u636e\u51c6\u5907\u4e0e\u7f16\u7801**<\/p>\n<ul>\n<li>\n<p>\u51c6\u5907\u6d77\u91cf\u7684\u201c\u56fe\u50cf-\u6587\u672c\u5bf9\u201d\u6570\u636e\u96c6\uff0c\u4f8b\u5982 LAION-5B\u3002<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u6bcf\u4e00\u5f20\u771f\u5b9e\u56fe\u50cf <code>x\u2080<\/code>\uff0c\u9996\u5148\u901a\u8fc7\u4e00\u4e2a\u9884\u8bad\u7ec3\u7684 VAE \u7f16\u7801\u5668\u5c06\u5176\u538b\u7f29\u5230\u4e00\u4e2a\u66f4\u5c0f\u7684<strong>\u6f5c\u7a7a\u95f4 (Latent Space)<\/strong>\uff0c\u5f97\u5230\u6f5c\u53d8\u91cf <code>z\u2080<\/code>\u3002\u8fd9\u6837\u505a\u662f\u4e3a\u4e86\u5927\u5e45\u964d\u4f4e\u8ba1\u7b97\u6210\u672c\u3002<\/p>\n<\/li>\n<li>\n<p>\u540c\u65f6\uff0c\u56fe\u50cf\u7684\u914d\u5957\u6587\u672c\u63cf\u8ff0\uff08Prompt\uff09\u4f1a\u901a\u8fc7\u4e00\u4e2a\u6587\u672c\u7f16\u7801\u5668\uff08\u5982 CLIP Text Encoder\uff09\u8f6c\u6362\u6210\u4e00\u4e2a<strong>\u6587\u672c\u6761\u4ef6\u5411\u91cf <code>c<\/code><\/strong>\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u968f\u673a\u52a0\u566a (Forward Process)<\/strong><\/p>\n<ul>\n<li>\n<p>\u4ece\u9884\u8bbe\u7684\u65f6\u95f4\u6b65\u5217\u8868\uff08\u6bd4\u5982\u603b\u51711000\u6b65\uff09\u4e2d\uff0c<strong>\u968f\u673a\u91c7\u6837<\/strong>\u4e00\u4e2a\u65f6\u95f4\u6b65 <code>t<\/code>\u3002\u8fd9\u4e2a <code>t<\/code> \u4ee3\u8868\u4e86\u566a\u58f0\u7684\u5f3a\u5ea6\uff0c<code>t=0<\/code> \u4ee3\u8868\u65e0\u566a\u58f0\uff0c<code>t=1000<\/code> \u4ee3\u8868\u7eaf\u566a\u58f0\u3002<\/p>\n<\/li>\n<li>\n<p>\u6839\u636e\u65f6\u95f4\u6b65 <code>t<\/code>\uff0c\u4ece\u4e00\u4e2a\u6807\u51c6\u9ad8\u65af\u5206\u5e03\u4e2d\u91c7\u6837\u4e00\u4efd\u7eaf\u566a\u58f0 <code>\u03b5<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p>\u5c06\u8fd9\u4efd\u566a\u58f0 <code>\u03b5<\/code> \u6309\u7167\u7279\u5b9a\u6bd4\u4f8b\u6dfb\u52a0\u5230\u5e72\u51c0\u7684\u6f5c\u53d8\u91cf <code>z\u2080<\/code> \u4e0a\uff0c\u751f\u6210\u4e00\u5f20\u5e26\u566a\u7684\u6f5c\u53d8\u91cf <code>z\u209c<\/code>\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u7531\u4e00\u4e2a\u56fa\u5b9a\u7684\u6570\u5b66\u516c\u5f0f\u63a7\u5236\uff1a<br \/>\n<code>z\u209c = \u221a\u1fb1\u209c * z\u2080 + \u221a(1-\u1fb1\u209c) * \u03b5<\/code><br \/>\n\uff08\u5176\u4e2d <code>\u1fb1\u209c<\/code> \u662f\u4e00\u4e2a\u9884\u5148\u5b9a\u4e49\u597d\u7684\u3001\u968f <code>t<\/code> \u53d8\u5316\u7684\u7cfb\u6570\uff09<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5b66\u4e60\u4e0e\u4f18\u5316 (Learning &amp; Optimization)<\/strong><\/p>\n<ul>\n<li>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u5c06\u5e26\u566a\u7684\u6f5c\u53d8\u91cf <code>z\u209c<\/code>\u3001\u6587\u672c\u6761\u4ef6 <code>c<\/code> \u548c\u65f6\u95f4\u6b65 <code>t<\/code> \u4e00\u8d77\u8f93\u5165\u7ed9\u6838\u5fc3\u7684 U-Net \u7f51\u7edc\u3002<\/p>\n<\/li>\n<li>\n<p>U-Net \u7684\u4efb\u52a1\u975e\u5e38\u5355\u7eaf\uff1a<strong>\u9884\u6d4b\u6211\u4eec\u521a\u624d\u6dfb\u52a0\u8fdb\u53bb\u7684\u90a3\u4efd\u566a\u58f0 <code>\u03b5<\/code><\/strong>\u3002\u5b83\u4f1a\u8f93\u51fa\u4e00\u4e2a\u9884\u6d4b\u7684\u566a\u58f0 <code>\u03b5_\u03b8<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p>\u901a\u8fc7\u6bd4\u8f83<strong>\u771f\u5b9e\u566a\u58f0 <code>\u03b5<\/code><\/strong> \u548c <strong>\u9884\u6d4b\u566a\u58f0 <code>\u03b5_\u03b8<\/code><\/strong> \u4e4b\u95f4\u7684\u5dee\u5f02\uff08\u901a\u5e38\u4f7f\u7528\u5747\u65b9\u8bef\u5dee\u635f\u5931\u51fd\u6570\uff09\uff0c\u8ba1\u7b97\u51fa\u635f\u5931\u503c\u3002<\/p>\n<\/li>\n<li>\n<p>\u6700\u540e\uff0c\u901a\u8fc7\u53cd\u5411\u4f20\u64ad\u7b97\u6cd5\u66f4\u65b0 U-Net \u7684\u53c2\u6570\uff0c\u8ba9\u5b83\u4e0b\u4e00\u6b21\u9884\u6d4b\u5f97\u66f4\u51c6\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u4e00\u53e5\u8bdd\u603b\u7ed3\u8bad\u7ec3<\/strong>\uff1a\u4e0d\u65ad\u91cd\u590d\u4ee5\u4e0a\u8fc7\u7a0b\uff0c\u8ba9 U-Net \u6210\u4e3a\u4e00\u4e2a\u201c\u53bb\u566a\u4e13\u5bb6\u201d\uff0c\u5b83\u80fd\u6839\u636e\u4efb\u4f55\u7a0b\u5ea6\u7684\u566a\u58f0\u56fe\u548c\u6587\u672c\u63d0\u793a\uff0c\u51c6\u786e\u5730\u6307\u51fa\u201c\u54ea\u4e9b\u90e8\u5206\u662f\u566a\u58f0\u201d\u3002<\/p>\n<h5>3.4.2 \u63a8\u7406<\/h5>\n<p>\u63a8\u7406\u8fc7\u7a0b\u662f\u8bad\u7ec3\u8fc7\u7a0b\u7684\u9006\u5411\u5e94\u7528\u3002\u6b64\u65f6\uff0cU-Net \u7684\u53c2\u6570\u5df2\u7ecf\u56fa\u5b9a\uff0c\u4e0d\u518d\u5b66\u4e60\u3002\u5b83\u7684\u4efb\u52a1\u662f\u4ece\u5934\u5f00\u59cb\u521b\u4f5c\u4e00\u5f20\u65b0\u56fe\u3002<\/p>\n<p>\u8fd9\u4e2a\u8fc7\u7a0b\u540c\u6837\u662f\u8fed\u4ee3\u5f0f\u7684\uff0c\u53ef\u4ee5\u5206\u4e3a\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>\n<p><strong>\u521d\u59cb\u5316\u4e0e\u7f16\u7801<\/strong><\/p>\n<ul>\n<li>\n<p>\u7528\u6237\u8f93\u5165\u4e00\u6bb5\u6587\u672c\u63d0\u793a\u8bcd\uff08Prompt\uff09\u3002<\/p>\n<\/li>\n<li>\n<p>\u6587\u672c\u7f16\u7801\u5668\u5c06 Prompt \u8f6c\u6362\u6210<strong>\u6587\u672c\u6761\u4ef6\u5411\u91cf <code>c<\/code><\/strong>\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u6f5c\u7a7a\u95f4\u4e2d\uff0c\u968f\u673a\u751f\u6210\u4e00\u4e2a\u5b8c\u5168\u7531\u566a\u58f0\u6784\u6210\u7684\u521d\u59cb\u6f5c\u53d8\u91cf <code>z\u209c<\/code>\uff08\u8fd9\u91cc\u7684 <code>t<\/code> \u901a\u5e38\u662f\u6700\u5927\u65f6\u95f4\u6b65\uff0c\u6bd4\u59821000\uff09\u3002\u8fd9\u5c31\u662f\u521b\u4f5c\u7684\u201c\u539f\u6750\u6599\u201d\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u8fed\u4ee3\u53bb\u566a (Reverse Process \/ Sampling)<\/strong><\/p>\n<ul>\n<li>\n<p>\u8fd9\u662f\u4e00\u4e2a\u5faa\u73af\u8fc7\u7a0b\uff0c\u7531\u8c03\u5ea6\u5668\uff08Scheduler\uff09\u63a7\u5236\uff0c\u901a\u5e38\u4f1a\u8fed\u4ee3 N \u6b65\uff08\u4f8b\u5982 20-50 \u6b65\uff09\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u6bcf\u4e00\u6b65\u4e2d\uff0c\u8c03\u5ea6\u5668\u4f1a\u544a\u8bc9 U-Net \u5f53\u524d\u7684\u65f6\u95f4\u6b65 <code>t<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p>U-Net \u63a5\u6536\u4e09\u4e2a\u8f93\u5165\uff1a\u5f53\u524d\u7684\u5e26\u566a\u6f5c\u53d8\u91cf <code>z\u209c<\/code>\u3001\u6587\u672c\u6761\u4ef6 <code>c<\/code> \u548c\u65f6\u95f4\u6b65 <code>t<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p>U-Net \u4f1a\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\uff0c<strong>\u9884\u6d4b\u51fa\u5f53\u524d <code>z\u209c<\/code> \u4e2d\u5305\u542b\u7684\u566a\u58f0 <code>\u03b5_\u03b8<\/code><\/strong>\u3002<\/p>\n<\/li>\n<li>\n<p>\u8c03\u5ea6\u5668\u62ff\u5230\u9884\u6d4b\u7684\u566a\u58f0\u540e\uff0c\u4f1a\u6839\u636e\u7279\u5b9a\u7684\u7b97\u6cd5\uff08\u5982 DDIM, Euler a \u7b49\uff09\u4ece <code>z\u209c<\/code> \u4e2d\u51cf\u53bb\u8fd9\u90e8\u5206\u566a\u58f0\uff0c\u5f97\u5230\u4e00\u4e2a\u201c\u66f4\u5e72\u51c0\u4e00\u70b9\u201d\u7684\u6f5c\u53d8\u91cf <code>z\u209c\u208b\u2081<\/code>\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u89e3\u7801\u4e0e\u8f93\u51fa<\/strong><\/p>\n<ul>\n<li>\n<p>\u5f53\u5faa\u73af\u7ed3\u675f\u65f6\uff0c\u6211\u4eec\u5f97\u5230\u4e86\u4e00\u4e2a\u51e0\u4e4e\u4e0d\u542b\u566a\u58f0\u7684\u3001\u5e72\u51c0\u7684\u6f5c\u53d8\u91cf <code>z\u2080<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p>\u6700\u540e\uff0c\u5c06\u8fd9\u4e2a\u6f5c\u53d8\u91cf <code>z\u2080<\/code> \u8f93\u5165\u5230\u9884\u8bad\u7ec3\u7684 VAE <strong>\u89e3\u7801\u5668 (Decoder)<\/strong> \u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p>VAE \u89e3\u7801\u5668\u4f1a\u5c06\u8fd9\u4e2a\u4f4e\u7ef4\u7684\u6f5c\u53d8\u91cf\u201c\u89e3\u538b\u201d\u5e76\u8fd8\u539f\u6210\u4e00\u5f20\u9ad8\u5206\u8fa8\u7387\u7684\u50cf\u7d20\u56fe\u50cf\uff0c\u8fd9\u5c31\u662f\u6700\u7ec8\u751f\u6210\u7684\u4f5c\u54c1\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u4e00\u53e5\u8bdd\u603b\u7ed3\u63a8\u7406<\/strong>\uff1a\u4ece\u4e00\u56e2\u968f\u673a\u566a\u58f0\u51fa\u53d1\uff0c\u5728\u6587\u672c\u7684\u6307\u5f15\u4e0b\uff0c\u4f9d\u9760\u8bad\u7ec3\u597d\u7684 U-Net \u4e00\u6b65\u6b65\u5730\u201c\u96d5\u523b\u201d\u6389\u591a\u4f59\u7684\u566a\u58f0\uff0c\u6700\u7ec8\u5448\u73b0\u51fa\u6e05\u6670\u7684\u56fe\u50cf\u3002<\/p>\n<p><strong>\u53ef\u4ee5<a href=\"http:\/\/www.thirdbody.cn\/ldm.html\">\u5728\u6b64\u5904<\/a>\u67e5\u770b\u66f4\u52a0\u8be6\u7ec6\u7684\u67b6\u6784\u56fe\u548c\u8bad\u7ec3\u63a8\u7406\u6d41\u7a0b<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u6982\u8ff0 \u4ece\u7406\u89e3\u5230\u751f\u6210 \u65e0\u8bba\u662f\u6587\u751f\u56fe\u8fd8\u662f\u6587\u751f\u89c6\u9891\uff0c\u5176\u5e95\u5c42\u90fd\u4f9d\u8d56\u4e8e\u4e24\u5927\u5173\u952e\u6280\u672f\uff1a\u591a\u6a21\u6001\u5bf9\u9f50\u4e0e\u5185\u5bb9\u751f\u6210\u3002 \u591a\u6a21\u6001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":118,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60],"tags":[65,61,62],"class_list":["post-117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-multi_modal","tag-ldm","tag-61","tag-62"],"_links":{"self":[{"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":3,"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":121,"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/posts\/117\/revisions\/121"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/media\/118"}],"wp:attachment":[{"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.thirdbody.cn\/index.php\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}