{"id":262,"date":"2022-09-04T13:58:37","date_gmt":"2022-09-04T04:58:37","guid":{"rendered":"https:\/\/sheltie-garage.xyz\/tech\/?p=262"},"modified":"2022-09-24T17:11:36","modified_gmt":"2022-09-24T08:11:36","slug":"stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be","status":"publish","type":"post","link":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/","title":{"rendered":"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059"},"content":{"rendered":"\n<p>\u307e\u305f\u307e\u305fStable Diffusion\u30cd\u30bf\u3067\u3059\u3002\u30c9\u306f\u307e\u308a\u3057\u305f\u306e\u3067\u3001\u3057\u3070\u3089\u304f\u306f\u3053\u306e\u8a71\u984c\u306b\u306a\u308a\u305d\u3046\u3067\u3059<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3068\u306f\uff1f<\/h2>\n\n\n\n<p>\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(\u8ee2\u79fb\u5b66\u7fd2)\u3068\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u4e00\u822c\u7684\u306a\u624b\u6cd5\u3067\u3042\u308b\u300e\u6559\u5e2b\u3042\u308a\u5b66\u7fd2\u300f\u306f\u3001\u3042\u3089\u304b\u3058\u3081\u6b63\u89e3\u3092\u4e0e\u3048\u3066\u5b66\u7fd2\u3092\u884c\u3046\u30d5\u30ed\u30fc\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u6b63\u89e3\u3092\u5c0e\u304f\u305f\u3081\u306b\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u304b\u3064\u5b66\u7fd2\u6642\u9593\u3082\u81a8\u5927\u306b\u304b\u304b\u308b\u306e\u304c\u96e3\u70b9\u3067\u3059\u3002<br><\/p><p>\u4e00\u65b9\u3067\u8ee2\u79fb\u5b66\u7fd2\u306f\u3001\u30bf\u30b9\u30af\u306e\u4eee\u8aac\u7acb\u3066\u3092\u884c\u3046\u3046\u3048\u3067\u3001\u5225\u306e\u30bf\u30b9\u30af\u3067\u3059\u3067\u306b\u5b66\u7fd2\u3055\u308c\u305f\u77e5\u8b58\u3092\u8ee2\u7528\u3057\u3001\u4eee\u8aac\u7acb\u3066\u3092\u884c\u308f\u305b\u308b\u624b\u6cd5\u3068\u306a\u308a\u307e\u3059\u3002\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3068\u5b66\u7fd2\u306b\u304b\u304b\u308b\u6642\u9593\u3092\u5927\u5e45\u306b\u524a\u6e1b\u3067\u304d\u308b\u305f\u3081\u3001\u975e\u5e38\u306b\u52b9\u7387\u7684\u306a\u624b\u6cd5\u3068\u3057\u3066\u8a55\u4fa1\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p><cite><a href=\"https:\/\/biz.hipro-job.jp\/column\/corporation\/transfer-learning\/\">\u8ee2\u79fb\u5b66\u7fd2\u3068\u306f\uff1f\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3068\u306e\u9055\u3044\u3084\u6d3b\u7528\u4f8b\u3092\u3054\u7d39\u4ecb &#8211; \u9867\u554f\u3001\u5c02\u9580\u5bb6\u306a\u3069\u306e\u30d7\u30ed\u4eba\u6750\u7d39\u4ecb\u30b5\u30fc\u30d3\u30b9 (hipro-job.jp)<\/a><\/cite><\/blockquote>\n\n\n\n<p>Stable Diffusion\u306e\u5834\u5408\u3001\u6c4e\u7528\u7684\u306a\u30a4\u30e9\u30b9\u30c8\u751f\u6210\u30e2\u30c7\u30eb\u6545\u3001\u7279\u5b9a\u306e\u5206\u91ce\u306e\u30a4\u30e9\u30b9\u30c8\u3092\u751f\u6210\u3057\u3088\u3046\u3068\u3057\u305f\u5834\u5408\u3001\u306a\u304b\u306a\u304b\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u30a2\u30cb\u30e1\u7cfb\u306e\u30a4\u30e9\u30b9\u30c8\u751f\u6210\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p>\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u9ad8\u5ea6\u306a\u30a4\u30e9\u30b9\u30c8\u3092\u751f\u6210\u3067\u304d\u308b\u7279\u5fb4\u3092\u751f\u304b\u3057\u3064\u3064\u3001\u30a2\u30cb\u30e1\u7cfb\u306b\u7279\u5316\u3057\u305f\u30e2\u30c7\u30eb\u3082\u4f5c\u6210\u3067\u304d\u308b\u306e\u3067\u306f\u3068\u601d\u3044\u3001\u5b9f\u9a13\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/birdmanikioishota.blog.fc2.com\/blog-entry-8.html\" target=\"_blank\" rel=\"noreferrer noopener\">\u3059\u3067\u306b\u5b9f\u65bd\u3055\u308c\u3066\u3044\u308b\u65b9\u306e\u30d6\u30ed\u30b0<\/a>\u3067\u306f\u3001\u300c\u3044\u3089\u3059\u3068\u3084\u300d\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u884c\u3044\u3001\u7d50\u679c\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u30b5\u30fc\u30d3\u30b9\u9589\u9396\u3057\u3066\u3057\u307e\u3063\u305f\u300c<a href=\"https:\/\/illustmimic.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">mimic<\/a>\u300d\u3082\u3001\u304a\u305d\u3089\u304f\u540c\u3058\u6280\u8853\u3092\u5229\u7528\u3057\u3066\u30a4\u30e9\u30b9\u30c8\u3092\u751f\u6210\u3057\u3066\u3044\u308b\u3068\u601d\u308f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u65e9\u901f\u3084\u3063\u3066\u307f\u308b<\/h2>\n\n\n\n<p>\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059<br>\u30fbOS:Windows11<br>\u30fb CPU:Corei7 9700K<br>\u30fbGPU:RTX2080 VRAM 8GB<\/p>\n\n\n\n<p class=\"has-vivid-red-color has-text-color has-medium-font-size\"><strong>\u53ef\u80fd\u3067\u3042\u308c\u3070Linux\u74b0\u5883\u3067\u52d5\u304b\u3059\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059<\/strong><\/p>\n\n\n\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u306fUnix\u74b0\u5883\u3067\u3057\u304b\u5229\u7528\u3067\u304d\u306a\u3044\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5229\u7528\u3055\u308c\u3066\u304a\u308a\u3001\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3084\u30a8\u30e9\u30fc\u4fee\u6b63\u3067\u7cbe\u795e\u3092\u524a\u304c\u308c\u307e\u3059<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u3044\u308d\u3044\u308d\u3068\u30d7\u30ed\u30b0\u30e9\u30e0\u4fee\u6b63\u3092\u3057\u306a\u3044\u3068\u52d5\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u5148\u306b\u30da\u30fc\u30b8\u4e0b\u90e8\u306e\u30a8\u30e9\u30fc\u96c6\u3092\u898b\u3066\u304a\u304f\u3068\u3088\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093<\/p>\n\n\n\n<p>\u305d\u308c\u3067\u3082Windows\u3067\u52d5\u304b\u3057\u305f\u3044\u3068\u3044\u3046\u65b9\u306f\u304a\u9032\u307f\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u30fb\u30fb\u30fb<\/p>\n\n\n\n<p>reddit\u306e\u6295\u7a3f\u306b\u3084\u308a\u65b9\u304c\u66f8\u3044\u3066\u3042\u308b\u305f\u3081\u3001\u305d\u308c\u306b\u5f93\u3063\u3066\u9032\u3081\u3066\u3044\u304d\u307e\u3059<br><a href=\"https:\/\/www.reddit.com\/r\/StableDiffusion\/comments\/wvzr7s\/tutorial_fine_tuning_stable_diffusion_using_only\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.reddit.com\/r\/StableDiffusion\/comments\/wvzr7s\/tutorial_fine_tuning_stable_diffusion_using_only\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u74b0\u5883\u69cb\u7bc9<\/h3>\n\n\n\n<p>\u6307\u5b9a\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30ed\u30fc\u30ab\u30eb\u306b\u30af\u30ed\u30fc\u30f3\u3057\u307e\u3059\u3002\u30af\u30ed\u30fc\u30f3\u5f8c\u3001\u30d5\u30a9\u30eb\u30c0\u79fb\u52d5\u3057\u3001conda\u30b3\u30de\u30f3\u30c9\u3067\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u307e\u3059<\/p>\n\n\n\n<p>Windows\u74b0\u5883\u306bAnaconda\u3001Git \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u524d\u63d0\u306a\u306e\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408<a href=\"https:\/\/sheltie-garage.xyz\/tech\/2022\/08\/rtx2080%e6%90%ad%e8%bc%89%e3%81%aewindows11%e3%83%9e%e3%82%b7%e3%83%b3%e3%81%a7stable-diffusion%e3%82%92%e5%8b%95%e3%81%8b%e3%81%99\/\">\u904e\u53bb\u8a18\u4e8b<\/a>\u3082\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>git clone https:\/\/github.com\/rinongal\/textual_inversion.git\ncd textual_inversion\n# conda remove -n ldm --all  # \u3059\u3067\u306bldm\u306e\u4eee\u60f3\u74b0\u5883\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u3044\u3063\u305f\u3093\u524a\u9664\u3059\u308b\nconda env create -f environment.yaml\nconda activate ldm\npip install -e .<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b66\u7fd2\u7528\u753b\u50cf\u306e\u6e96\u5099<\/h2>\n\n\n\n<p>\u624b\u9806\u306b\u3088\u308c\u3070\u300c512px \u00d7 512px\u306e\u753b\u50cf5\u679a\u304c\u5fc5\u8981\u300d\u3068\u306e\u3053\u3068\u3067\u3057\u305f\u3002<br>\u4eca\u56de\u306fmimic\u30af\u30ed\u30fc\u30ba\u30d9\u30fc\u30bf\u306b\u53c2\u52a0\u3055\u308c\u3066\u3044\u305f\u300c<a href=\"https:\/\/twitter.com\/km170\" target=\"_blank\" rel=\"noreferrer noopener\">\u305f\u3093\u305f\u3093\u3081\u3093<\/a>\u300d\u3055\u3093\u306e\u753b\u50cf\u3092\u5229\u7528\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u3001\u5b66\u7fd2\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br>\u304b\u308f\u3044\u3044\u30a4\u30e9\u30b9\u30c8\u304c\u591a\u304f\u3066\u3001\u5b66\u7fd2\u7528\u753b\u50cf\u3092\u9078\u5b9a\u3059\u308b\u306e\u306b\u6642\u9593\u3092\u53d6\u3089\u308c\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u30fb\u30fb\u30fb<\/p>\n\n\n\n<p>\u5b66\u7fd2\u7528\u753b\u50cf\u306f\u3001\u3072\u3068\u307e\u305a\u9854\u306e\u90e8\u5206\u306e\u307f512 \u00d7 512\u306e\u5927\u304d\u3055\u306b\u5207\u308a\u3060\u3057\u3066\u6e96\u5099\u3057\u307e\u3057\u305f<\/p>\n\n\n\n<p>\u753b\u50cf\u306fGimp\u3092\u4f7f\u3063\u3066\u30c8\u30ea\u30df\u30f3\u30b0\u3092\u884c\u3044\u30015\u679a\u306e\u5b66\u7fd2\u7528\u753b\u50cf\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_001-1024x550.png\" alt=\"\" class=\"wp-image-263\" srcset=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_001-1024x550.png 1024w, https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_001-300x161.png 300w, https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_001-768x412.png 768w, https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_001-1536x825.png 1536w, https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_001.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"155\" src=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_002.png\" alt=\"\" class=\"wp-image-264\" srcset=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_002.png 560w, https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_002-300x83.png 300w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/figure>\n\n\n\n<p>\u304a\u5bdf\u3057\u306e\u901a\u308a\u3001\u30b1\u30e2\u30df\u30df\u597d\u304d\u3067\u3059\u30fb\u30fb\u30fb<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u306e\u5b9f\u65bd<\/h3>\n\n\n\n<p>\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u65bd\u3059\u308b\u524d\u306b\u3001\u6e96\u5099\u3092\u3057\u307e\u3059<\/p>\n\n\n\n<p>\u30fb\u6e96\u50991:Stable Diffusion\u30e2\u30c7\u30eb\u306e\u6e96\u5099<br>\u3000StableDiffusion V1.4\u306e\u30e2\u30c7\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002HuggingFace\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3082\u3088\u3044\u3067\u3059\u3057\u3001Stable Diffusion\u306e\u74b0\u5883\u304c\u69cb\u7bc9\u6e08\u307f\u3067\u3042\u308c\u3070\u3001\u30b3\u30d4\u30fc\u3057\u3066\u9069\u5f53\u306a\u30d5\u30a9\u30eb\u30c0\u306b\u4fdd\u5b58\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30fb\u6e96\u50992:initializer_words \u306e\u6e96\u5099<br>\u3000configs\/stable-diffusion\/v1-finetune.yaml \u3092\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u306a\u3069\u3067\u958b\u304d\u3001initializer_words\u306e\u8a2d\u5b9a\u90e8\u5206\u3092\u63a2\u3057\u307e\u3059\u3002<br>\u3000\u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u91cd\u8981\u3067\u3001\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u5185\u5bb9\u3092\u8aac\u660e\u3059\u308b\u7c21\u5358\u306a\u8a9e\u53e5\u306e\u7f85\u5217\u3092\u6307\u5b9a\u3059\u308b\u3088\u3046\u3067\u3001\u8907\u6570\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f2\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u307f\u3001\u30ab\u30f3\u30de\u3067\u533a\u5207\u308b\u3088\u3046\u3067\u3059\u3002\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"661\" height=\"168\" src=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_003.png\" alt=\"\" class=\"wp-image-265\" srcset=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_003.png 661w, https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/20220904_003-300x76.png 300w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/figure>\n\n\n\n<p>\u6e96\u5099\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3092\u884c\u3044\u307e\u3059<br>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u65bd\u3057\u3066\u307f\u307e\u3057\u305f<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>python main.py --base configs\/stable-diffusion\/v1-finetune.yaml -t --actual_resume .\/models\/ldm\/stable-diffusion-v1\/sd-v1-4.ckpt -n tantanmen_train --gpus 1, --data_root .\/LerningImages\/512<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f7f\u3063\u3066\u307f\u308b<\/h2>\n\n\n\n<p>\u4ee5\u4e0a\u3067\u65b0\u3057\u3044\u7279\u5fb4\u3092\u899a\u3048\u305f\u30e2\u30c7\u30eb\u304c\u751f\u6210\u3055\u308c\u305f\u306f\u305a\u306a\u306e\u3067\u3001\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>python scripts\/stable_txt2img.py --ddim_eta 0.0 --n_samples 1 --n_iter 2 --scale 10.0 --ddim_steps 50 --embedding_path .\/logs\/5122022-09-05T08-03-26_tantanmen_train\/checkpoints\/embeddings.pt --ckpt .\/models\/ldm\/stable-diffusion-v1\/sd-v1-4.ckpt --config .\/logs\/5122022-09-05T08-03-26_tantanmen_train\/configs\/5122022-09-05T08-03-26-project.yaml --prompt &quot;anime, girl, japanese, *&quot;<\/code><\/pre><\/div>\n\n\n\n<p>\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5404\u500b\u4eba\u306e\u74b0\u5883\u3067\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u7570\u306a\u3063\u3066\u304f\u308b\u306e\u3067\u3001\u305d\u306e\u3042\u305f\u308a\u306f\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<br>GPU\u30e1\u30e2\u30ea\u4e0d\u8db3\u3067\u3001n_samples\u306b2\u4ee5\u4e0a\u306e\u5024\u3092\u5165\u529b\u3059\u308b\u3068\u30e1\u30e2\u30ea\u4e0d\u8db3\u3067\u843d\u3061\u307e\u3057\u305f\u30fb\u30fb\u30fb<br>n_samples=1\u3067\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u3072\u3068\u307e\u305a\u30a4\u30e9\u30b9\u30c8\u306f\u751f\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u751f\u6210\u3055\u308c\u305f\u30a4\u30e9\u30b9\u30c8<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"513\" height=\"1024\" src=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0000-513x1024.jpg\" alt=\"\" class=\"wp-image-274\" srcset=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0000-513x1024.jpg 513w, https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0000-150x300.jpg 150w, https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0000.jpg 516w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><\/figure>\n\n\n\n<p class=\"has-vivid-red-color has-text-color has-medium-font-size\">\u7d20\u306eStable Diffusion\u3067\u751f\u6210\u3059\u308b\u3088\u308a\u3082\u307e\u3068\u3082\u306a(\u6bd4\u8f03\u7684\u304b\u308f\u3044\u3044)\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u308b\u3051\u3069\u3001\u5165\u529b\u753b\u50cf\u306b\u306f\u7a0b\u9060\u3044\u753b\u50cf\u304c\u51fa\u529b\u3055\u308c\u305f<\/p>\n\n\n\n<p>\u304c\u3001\u3072\u3068\u307e\u305a\u4eca\u56de\u306e\u7d50\u8ad6\u3002<br>\u30d1\u30e9\u30e1\u30fc\u30bf\u306a\u3069\u3044\u3058\u308c\u308c\u3070\u3001\u307e\u305f\u7d50\u679c\u306f\u5909\u308f\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3051\u3069\u3001VRAM8GB\u3067\u306f\u3044\u308d\u3044\u308d\u9650\u754c\u306a\u3093\u3067\u3059\u30fb\u30fb\u30fb<br>\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30ba\u7248\u304c\u51fa\u308b\u304b\u3001\u3064\u3088\u3064\u3088GPU\u3092\u6301\u3063\u3066\u3044\u308b\u65b9\u304c\u3044\u308d\u3044\u308d\u5b9f\u9a13\u3055\u308c\u308b\u306e\u3092\u5f85\u3064\u3053\u3068\u306b\u3057\u307e\u3059\u30fb\u30fb\u30fb<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8ffd\u4f38<\/h2>\n\n\n\n<p>mimic\u3063\u3066\u3001\u3061\u3083\u3093\u3068\u5b66\u7fd2\u753b\u50cf\u306b\u8fd1\u3044\u753b\u50cf\u3092\u751f\u6210\u3067\u304d\u3066\u3044\u305f\u306e\u3067\u3001\u5272\u3068\u9ad8\u5ea6\u306a\u3053\u3068\u3092\u3084\u3063\u3066\u308b\u3093\u3060\u306a\u3041\u3068\u601d\u3063\u305f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30a8\u30e9\u30fc\u96c6<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">Traceback (most recent call last):\n  File \"main.py\", line 762, in &lt;module&gt;\n    ngpu = len(lightning_config.trainer.gpus.strip(\",\").split(','))\nAttributeError: 'int' object has no attribute 'strip'<\/pre>\n\n\n\n<p>main.py 762\u884c\u76ee\u3042\u305f\u308a\u3067ngpu\u306b\u5fc5\u305a1\u3092\u4ee3\u5165\u3059\u308b\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u56de\u907f<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>        if not cpu:\n            # ngpu = len(lightning_config.trainer.gpus.strip(&quot;,&quot;).split(&#39;,&#39;))\n            ngpu = 1\n        else:\n            ngpu = 1<\/code><\/pre><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">Traceback (most recent call last):\n  File \"main.py\", line 800, in &lt;module&gt;\n    signal.signal(signal.SIGUSR1, melk)\nAttributeError: module 'signal' has no attribute 'SIGUSR1'<\/pre>\n\n\n\n<p>main.py 800\u884c\u76ee\u3042\u305f\u308a\u306esignal\u51e6\u7406\u4e00\u5f0f\u3092\u5909\u66f4<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>        import signal\n\n        signal.signal(signal.SIGTERM, melk)\n        signal.signal(signal.SIGTERM, divein)<\/code><\/pre><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">Traceback (most recent call last):\n  File \"main.py\", line 806, in &lt;module&gt;\n    trainer.fit(model, data)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 740, in fit\n    self._call_and_handle_interrupt(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 685, in _call_and_handle_interrupt\n    return trainer_fn(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 777, in _fit_impl\n    self._run(model, ckpt_path=ckpt_path)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1199, in _run\n    self._dispatch()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1279, in _dispatch\n    self.training_type_plugin.start_training(self)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\training_type\\training_type_plugin.py\", line 202, in start_training\n    self._results = trainer.run_stage()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1289, in run_stage\n    return self._run_train()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1311, in _run_train\n    self._run_sanity_check(self.lightning_module)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1375, in _run_sanity_check\n    self._evaluation_loop.run()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\base.py\", line 145, in run    self.advance(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\dataloader\\evaluation_loop.py\", line 110, in advance\n    dl_outputs = self.epoch_loop.run(dataloader, dataloader_idx, dl_max_batches, self.num_dataloaders)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\base.py\", line 145, in run    self.advance(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\epoch\\evaluation_epoch_loop.py\", line 122, in advance\n    output = self._evaluation_step(batch, batch_idx, dataloader_idx)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\epoch\\evaluation_epoch_loop.py\", line 217, in _evaluation_step\n    output = self.trainer.accelerator.validation_step(step_kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\accelerators\\accelerator.py\", line 236, in validation_step\n    return self.training_type_plugin.validation_step(*step_kwargs.values())\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\training_type\\training_type_plugin.py\", line 219, in validation_step\n    return self.model.validation_step(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\autograd\\grad_mode.py\", line 28, in decorate_context\n    return func(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 368, in validation_step\n    _, loss_dict_no_ema = self.shared_step(batch)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 907, in shared_step\n    loss = self(x, c)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 915, in forward\n    c = self.get_learned_conditioning(c)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 594, in get_learned_conditioning    c = self.cond_stage_model.encode(c, embedding_manager=self.embedding_manager)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\encoders\\modules.py\", line 324, in encode\n    return self(text, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\encoders\\modules.py\", line 319, in forward\n    z = self.transformer(input_ids=tokens, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\encoders\\modules.py\", line 297, in transformer_forward\n    return self.text_model(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\encoders\\modules.py\", line 258, in text_encoder_forward\n    hidden_states = self.embeddings(input_ids=input_ids, position_ids=position_ids, embedding_manager=embedding_manager)  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\encoders\\modules.py\", line 180, in embedding_forward\n    inputs_embeds = self.token_embedding(input_ids)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\sparse.py\", line 158, in forward\n    return F.embedding(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\functional.py\", line 2044, in embedding\n    return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)\nRuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper__index_select)<\/pre>\n\n\n\n<p>\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u300c&#8211;gpus 0,\u3000\u2192\u3000&#8211;gpus 1,\u300d\u306b\u5909\u66f4\u3057\u305f\u3089\u3072\u3068\u307e\u305a\u30a8\u30e9\u30fc\u306f\u6d88\u3048\u307e\u3057\u305f<\/p>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\"><strong>\u3053\u3061\u3089\u306f\u5404\u3005\u306e\u74b0\u5883\u3067\u6307\u5b9a\u3059\u308b\u756a\u53f7\u304c\u7570\u306a\u308b\u3088\u3046\u3067\u3059\u306e\u3067\u3001gpu 0,\u3000\u2192\u3000gpu 1,\u3000\u3068\u3044\u3046\u3088\u3046\u306b0\u756a\u304b\u3089\u3057\u3066\u3044\u3066\u3046\u307e\u304f\u52d5\u304f\u756a\u53f7\u3092\u63a2\u308b\u306e\u304c\u3088\u3055\u305d\u3046\u3067\u3059<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Traceback (most recent call last):\n  File \"main.py\", line 806, in &lt;module&gt;\n    trainer.fit(model, data)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 740, in fit\n    self._call_and_handle_interrupt(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 685, in _call_and_handle_interrupt\n    return trainer_fn(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 777, in _fit_impl\n    self._run(model, ckpt_path=ckpt_path)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1137, in _run\n    self.accelerator.setup_environment()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\accelerators\\gpu.py\", line 39, in setup_environment\n    super().setup_environment()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\accelerators\\accelerator.py\", line 83, in setup_environment\n    self.training_type_plugin.setup_environment()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\training_type\\ddp.py\", line 185, in setup_environment\n    self.setup_distributed()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\training_type\\ddp.py\", line 272, in setup_distributed\n    init_dist_connection(self.cluster_environment, self.torch_distributed_backend)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\utilities\\distributed.py\", line 387, in init_dist_connection\n    torch.distributed.init_process_group(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\distributed\\distributed_c10d.py\", line 583, in init_process_group\n    default_pg = _new_process_group_helper(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\distributed\\distributed_c10d.py\", line 708, in _new_process_group_helper\n    raise RuntimeError(\"Distributed package doesn't have NCCL \" \"built in\")\nRuntimeError: Distributed package doesn't have NCCL built in<\/pre>\n\n\n\n<p><a href=\"https:\/\/github.com\/ray-project\/ray_lightning\/issues\/13\" target=\"_blank\" rel=\"noreferrer noopener\">\u3053\u3061\u3089\u306e\u8a18\u4e8b<\/a>\u3092\u53c2\u8003\u306b\u3001main.py\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>if __name__ == &quot;__main__&quot;:\n    # custom parser to specify config files, train, test and debug mode,\n    # postfix, resume.\n    # `--key value` arguments are interpreted as arguments to the trainer.\n    # `nested.key=value` arguments are interpreted as config parameters.\n    # configs are merged from left-to-right followed by command line parameters.\n\n\u3000\u3000\u30fb\u30fb\u30fb\u7701\u7565\u30fb\u30fb\u30fb\n\n    os.environ[&quot;PL_TORCH_DISTRIBUTED_BACKEND&quot;] = &quot;gloo&quot;  \u2190\u3053\u308c\u3092\u8ffd\u52a0\n\n    now = datetime.datetime.now().strftime(&quot;%Y-%m-%dT%H-%M-%S&quot;)\n\n    # add cwd for convenience and to make classes in this file available when\n    # running as `python main.py`\n    # (in particular `main.DataModuleFromConfig`)<\/code><\/pre><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">Traceback (most recent call last):\n  File \"main.py\", line 808, in &lt;module&gt;\n    trainer.fit(model, data)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 740, in fit\n    self._call_and_handle_interrupt(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 685, in _call_and_handle_interrupt\n    return trainer_fn(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 777, in _fit_impl\n    self._run(model, ckpt_path=ckpt_path)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1199, in _run\n    self._dispatch()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1279, in _dispatch\n    self.training_type_plugin.start_training(self)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\training_type\\training_type_plugin.py\", line 202, in start_training\n    self._results = trainer.run_stage()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1289, in run_stage\n    return self._run_train()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1319, in _run_train\n    self.fit_loop.run()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\base.py\", line 145, in run\n    self.advance(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\fit_loop.py\", line 234, in advance\n    self.epoch_loop.run(data_fetcher)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\base.py\", line 145, in run\n    self.advance(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\epoch\\training_epoch_loop.py\", line 193, in advance\n    batch_output = self.batch_loop.run(batch, batch_idx)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\base.py\", line 145, in run\n    self.advance(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\batch\\training_batch_loop.py\", line 88, in advance\n    outputs = self.optimizer_loop.run(split_batch, optimizers, batch_idx)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\base.py\", line 145, in run\n    self.advance(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\optimization\\optimizer_loop.py\", line 215, in advance\n    result = self._run_optimization(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\optimization\\optimizer_loop.py\", line 266, in _run_optimization\n    self._optimizer_step(optimizer, opt_idx, batch_idx, closure)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\optimization\\optimizer_loop.py\", line 378, in _optimizer_step\n    lightning_module.optimizer_step(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\core\\lightning.py\", line 1652, in optimizer_step\n    optimizer.step(closure=optimizer_closure)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\core\\optimizer.py\", line 164, in step\n    trainer.accelerator.optimizer_step(self._optimizer, self._optimizer_idx, closure, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\accelerators\\accelerator.py\", line 336, in optimizer_step\n    self.precision_plugin.optimizer_step(model, optimizer, opt_idx, closure, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\precision\\precision_plugin.py\", line 163, in optimizer_step\n    optimizer.step(closure=closure, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\optim\\optimizer.py\", line 88, in wrapper\n    return func(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\autograd\\grad_mode.py\", line 28, in decorate_context\n    return func(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\optim\\adamw.py\", line 92, in step\n    loss = closure()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\precision\\precision_plugin.py\", line 148, in _wrap_closure\n    closure_result = closure()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\optimization\\optimizer_loop.py\", line 160, in __call__\n    self._result = self.closure(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\optimization\\optimizer_loop.py\", line 142, in closure\n    step_output = self._step_fn()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\optimization\\optimizer_loop.py\", line 435, in _training_step\n    training_step_output = self.trainer.accelerator.training_step(step_kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\accelerators\\accelerator.py\", line 216, in training_step\n    return self.training_type_plugin.training_step(*step_kwargs.values())\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\training_type\\ddp.py\", line 439, in training_step\n    return self.model(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\parallel\\distributed.py\", line 886, in forward\n    output = self.module(*inputs[0], **kwargs[0])\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\overrides\\base.py\", line 81, in forward\n    output = self.module.training_step(*inputs, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 352, in training_step\n    loss, loss_dict = self.shared_step(batch)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 907, in shared_step\n    loss = self(x, c)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 920, in forward\n    return self.p_losses(x, c, t, *args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 1056, in p_losses\n    model_output = self.apply_model(x_noisy, t, cond)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 1028, in apply_model\n    x_recon = self.model(x_noisy, t, **cond)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 1513, in forward\n    out = self.diffusion_model(x, t, context=cc)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\diffusionmodules\\openaimodel.py\", line 732, in forward\n    h = module(h, emb, context)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\diffusionmodules\\openaimodel.py\", line 85, in forward\n    x = layer(x, context)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\attention.py\", line 258, in forward\n    x = block(x, context=context)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\attention.py\", line 209, in forward\n    return checkpoint(self._forward, (x, context), self.parameters(), self.checkpoint)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\diffusionmodules\\util.py\", line 116, in checkpoint\n    return func(*inputs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\attention.py\", line 213, in _forward\n    x = self.attn2(self.norm2(x), context=context) + x\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\modules\\attention.py\", line 175, in forward\n    k = self.to_k(context)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1102, in _call_impl\n    return forward_call(*input, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\modules\\linear.py\", line 103, in forward\n    return F.linear(input, self.weight, self.bias)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\nn\\functional.py\", line 1848, in linear\n    return torch._C._nn.linear(input, weight, bias)\nRuntimeError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 8.00 GiB total capacity; 7.20 GiB already allocated; 0 bytes free; 7.29 GiB reserved in total by PyTorch) If reserved memory is &gt;&gt; allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF<\/pre>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-reddit wp-block-embed-reddit\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oceanwp-oembed-wrap clr\"><div class=\"reddit-embed\" data-embed-media=\"www.redditmedia.com\" data-embed-parent=\"false\" data-embed-live=\"false\" data-embed-uuid=\"8e16b620-321d-11ed-82b3-562974569a88\" data-embed-created=\"2022-09-11T22:03:23.763741+00:00\"><a href=\"https:\/\/www.reddit.com\/r\/StableDiffusion\/comments\/wvzr7s\/tutorial_fine_tuning_stable_diffusion_using_only\/ilin65y\/\">Comment<\/a> from discussion <a href=\"https:\/\/www.reddit.com\/r\/StableDiffusion\/comments\/wvzr7s\/tutorial_fine_tuning_stable_diffusion_using_only\/\">jasoa&#8217;s comment from discussion &quot;[Tutorial] &quot;Fine Tuning&quot; Stable Diffusion using only 5 Images Using Textual Inversion.&quot;<\/a>.<\/div><script async src=\"https:\/\/www.redditstatic.com\/comment-embed.js\"><\/script><\/div>\n<\/div><\/figure>\n\n\n\n<p>\u3067\u66f8\u304b\u308c\u3066\u3044\u308b\u60c5\u5831\u3068<a href=\"https:\/\/twitter.com\/Pajoca_\/status\/1564978000700944385\" target=\"_blank\" rel=\"noreferrer noopener\">twitter\u3092\u53c2\u8003<\/a>\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63<\/p>\n\n\n\n<p>\u4fee\u6b63\u5bfe\u8c61\u306f\u300cconfig\/stable-diffusion\/v1-finetune.yaml\u300d\u3067\u3059<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>data:\n  target: main.DataModuleFromConfig\n  params:\n    batch_size: 1 # 2\n    num_workers: 1 # 2\n    wrap: false\n    train:\n      target: ldm.data.personalized.PersonalizedBase\n      params:\n        size: 256 # 512\n        set: train\n        per_image_tokens: false\n        repeats: 100\n    validation:\n      target: ldm.data.personalized.PersonalizedBase\n      params:\n        size: 256 # 512\n        set: val\n        per_image_tokens: false\n        repeats: 10<\/code><\/pre><\/div>\n\n\n\n<p>\u6a5f\u68b0\u5b66\u7fd2\u306e\u5206\u91ce\u3067\u306fVRAM 8G\u306f\u3088\u308f\u3088\u308fGPU\u306e\u90e8\u985e\u306b\u5165\u308b\u306e\u304b\u30fb\u30fb\u30fb<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Traceback (most recent call last):\n  File \"main.py\", line 810, in &lt;module&gt;\n    trainer.fit(model, data)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 740, in fit\n    self._call_and_handle_interrupt(\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 685, in _call_and_handle_interrupt\n    return trainer_fn(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 777, in _fit_impl\n    self._run(model, ckpt_path=ckpt_path)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1199, in _run\n    self._dispatch()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1279, in _dispatch\n    self.training_type_plugin.start_training(self)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\plugins\\training_type\\training_type_plugin.py\", line 202, in start_training\n    self._results = trainer.run_stage()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1289, in run_stage\n    return self._run_train()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1319, in _run_train\n    self.fit_loop.run()\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\base.py\", line 145, in run\n    self.advance(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\fit_loop.py\", line 234, in advance\n    self.epoch_loop.run(data_fetcher)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\base.py\", line 145, in run\n    self.advance(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\loops\\epoch\\training_epoch_loop.py\", line 216, in advance\n    self.trainer.call_hook(\"on_train_batch_end\", batch_end_outputs, batch, batch_idx, **extra_kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1495, in call_hook\n    callback_fx(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\callback_hook.py\", line 179, in on_train_batch_end\n    callback.on_train_batch_end(self, self.lightning_module, outputs, batch, batch_idx, 0)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\main.py\", line 436, in on_train_batch_end\n    self.log_img(pl_module, batch, batch_idx, split=\"train\")\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\main.py\", line 404, in log_img\n    images = pl_module.log_images(batch, split=split, **self.log_images_kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\torch\\autograd\\grad_mode.py\", line 28, in decorate_context\n    return func(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\models\\diffusion\\ddpm.py\", line 1320, in log_images\n    xc = log_txt_as_img((x.shape[2], x.shape[3]), batch[\"caption\"])\n  File \"F:\\Project\\MachineLerning\\textual_inversion\\ldm\\util.py\", line 25, in log_txt_as_img\n    font = ImageFont.truetype('data\/DejaVuSans.ttf', size=size)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\PIL\\ImageFont.py\", line 844, in truetype\n    return freetype(font)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\PIL\\ImageFont.py\", line 841, in freetype\n    return FreeTypeFont(font, size, index, encoding, layout_engine)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\PIL\\ImageFont.py\", line 193, in __init__\n    self.font = core.getfont(\nOSError: cannot open resource<\/pre>\n\n\n\n<p>DejaVuSans.ttf\u3068\u3044\u3046\u30d5\u30a9\u30f3\u30c8\u304c\u5fc5\u8981\u3089\u3057\u3044\u306e\u3067\u3001<a href=\"https:\/\/github.com\/prawnpdf\/prawn\/blob\/master\/data\/fonts\/DejaVuSans.ttf\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub<\/a>\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066<br>\u300cldm\/data\/\u300d\u306b\u683c\u7d0d\u3057\u307e\u3057\u305f<\/p>\n\n\n\n<p>\u305d\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u30bd\u30fc\u30b9\u3082\u4fee\u6b63\u3057\u307e\u3057\u305f<\/p>\n\n\n\n<p>textual_inversion\/ldm\/util.py<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code># \u300cimport os\u300d\u3092\u30d5\u30a1\u30a4\u30eb\u5148\u982d\u306eimport\u304c\u8a18\u8ff0\u3055\u308c\u3066\u3044\u308b\u90e8\u5206\u306b\u8ffd\u52a0\u3057\u307e\u3059\nfrom inspect import isfunction\nfrom PIL import Image, ImageDraw, ImageFont\nimport os # \u2190\u3053\u3061\u3089\u3092\u8ffd\u8a18\n\n#\u4ee5\u4e0b\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a9\u30f3\u30c8\u306e\u8aad\u307f\u8fbc\u307f\u30d1\u30b9\u3092\u4fee\u6b63\u3057\u307e\u3059\ndef log_txt_as_img(wh, xc, size=10):\n    # wh a tuple of (width, height)\n    # xc a list of captions to plot\n    b = len(xc)\n    txts = list()\n    for bi in range(b):\n        txt = Image.new(&quot;RGB&quot;, wh, color=&quot;white&quot;)\n        draw = ImageDraw.Draw(txt)\n        # font = ImageFont.truetype(&#39;data\/DejaVuSans.ttf&#39;, size=size)\n        print(os.getcwd() + &#39;\/ldm\/data\/DejaVuSans.ttf&#39;)\n        font = ImageFont.truetype(os.getcwd() + &#39;\/ldm\/data\/DejaVuSans.ttf&#39;, size=size)\n\n\u30fb\u30fb\u30fb\u4ee5\u4e0b\u4fee\u6b63\u306a\u3057<\/code><\/pre><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">Traceback (most recent call last):\n  File \"main.py\", line 815, in &lt;module&gt;\n    trainer.test(model, data)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 911, in test\n    return self._call_and_handle_interrupt(self._test_impl, model, dataloaders, ckpt_path, verbose, datamodule)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 685, in _call_and_handle_interrupt\n    return trainer_fn(*args, **kwargs)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 954, in _test_impl\n    results = self._run(model, ckpt_path=self.tested_ckpt_path)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\trainer.py\", line 1128, in _run\n    verify_loop_configurations(self)\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\configuration_validator.py\", line 42, in verify_loop_configurations\n    __verify_eval_loop_configuration(trainer, model, \"test\")\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\pytorch_lightning\\trainer\\configuration_validator.py\", line 186, in __verify_eval_loop_configuration\n    raise MisconfigurationException(f\"No `{loader_name}()` method defined to run `Trainer.{trainer_method}`.\")\npytorch_lightning.utilities.exceptions.MisconfigurationException: No `test_dataloader()` method defined to run `Trainer.test`.<\/pre>\n\n\n\n<p>\u76f4\u3057\u65b9\u304c\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u30c6\u30b9\u30c8\u5b9f\u884c\u90e8\u5206\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u30fb\u30fb\u30fb<br>main.py\u306e814\u884c\u76ee\u3042\u305f\u308a\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>main.py\n\n#        if not opt.no_test and not trainer.interrupted:\n#            trainer.test(model, data)<\/code><\/pre><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">(ldm) PS F:\\Project\\MachineLerning\\stable-diffusion-optimize&gt; python scripts\/txt2img.py --ddim_eta 0.0 --n_samples 8 --n_iter 2 --scale 10.0 --ddim_steps 50 --embedding_path .\/logs\/5122022-09-04T22-55-01_tantanmen_train\/checkpoints\/embeddings_gs-6099.pt --ckpt_path .\/models\/ldm\/text2img-large\/model.ckpt --prompt \"a photo of *\"\nusage: txt2img.py [-h] [--prompt [PROMPT]] [--outdir [OUTDIR]] [--skip_grid] [--skip_save] [--ddim_steps DDIM_STEPS]\n                  [--plms] [--laion400m] [--fixed_code] [--ddim_eta DDIM_ETA] [--n_iter N_ITER] [--H H] [--W W]\n                  [--C C] [--f F] [--n_samples N_SAMPLES] [--n_rows N_ROWS] [--scale SCALE] [--from-file FROM_FILE]\n                  [--config CONFIG] [--ckpt CKPT] [--seed SEED] [--precision {full,autocast}]\ntxt2img.py: error: unrecognized arguments: --embedding_path .\/logs\/5122022-09-04T22-55-01_tantanmen_train\/checkpoints\/embeddings_gs-6099.pt --ckpt_path .\/models\/ldm\/text2img-large\/model.ckpt<\/pre>\n\n\n\n<p>GitHub\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u304c\u9593\u9055\u3048\u3066\u3044\u308b\u30fb\u30fb\u30fb<br>\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u300c&#8211;ckpt_path\u300d\u2192\u300c&#8211;ckpt\u300d\u306b\u4fee\u6b63<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Traceback (most recent call last):\n  File \"scripts\/stable_txt2img.py\", line 287, in &lt;module&gt;\n    main()\n  File \"scripts\/stable_txt2img.py\", line 277, in main\n    Image.fromarray(grid.astype(np.uint8)).save(os.path.join(outpath, f'{prompt.replace(\" \", \"-\")}-{grid_count:04}.jpg'))\n  File \"F:\\Project\\MachineLerning\\Anaconda\\envs\\ldm\\lib\\site-packages\\PIL\\Image.py\", line 2209, in save\n    fp = builtins.open(filename, \"w+b\")\nOSError: [Errno 22] Invalid argument: 'outputs\/txt2img-samples\\\\anime,-girl,-japanese,-*-0000.jpg'<\/pre>\n\n\n\n<p>scripts\/stable_txt2img.py<br>277\u884c\u76ee\u3042\u305f\u308a\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>                   # to image\n                    grid = 255. * rearrange(grid, &#39;c h w -&gt; h w c&#39;).cpu().numpy()\n                    prompt = prompt.replace(&quot;*&quot;, &quot;-&quot;)\n                    Image.fromarray(grid.astype(np.uint8)).save(os.path.join(outpath, f&#39;{prompt.replace(&quot; &quot;, &quot;-&quot;)}-{grid_count:04}.jpg&#39;))\n                    grid_count += 1<\/code><\/pre><\/div>\n\n\n\n<p>\u4eca\u56de\u306e\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001prompt\u306b * \u3092\u5165\u308c\u308b\u5fc5\u8981\u304c\u3042\u308b<br>\u30d5\u30a1\u30a4\u30eb\u540d\u306fprompt\u304b\u3089\u751f\u6210\u3055\u308c\u308b<br>Windows\u3067\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u306b * \u304c\u5229\u7528\u3067\u304d\u306a\u3044<br>\u3068\u3044\u3046\u6d41\u308c\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u3001*\u3092\u7121\u5bb3\u306a\u6587\u5b57\u306b\u5909\u63db\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u751f\u6210\u3057\u307e\u3059<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4ee5\u4e0b\u3001\u5e83\u544a<\/h2>\n\n\n<div id=\"rinkerid259\" class=\"yyi-rinker-contents   yyi-rinker-postid-259 yyi-rinker-no-item\">\n\t<div class=\"yyi-rinker-box\">\n\t\t<div class=\"yyi-rinker-image\"><\/div>\n\t\t<div class=\"yyi-rinker-info\">\n\t\t\t<div class=\"yyi-rinker-title\">\n\t\t\t\t\t\t\t\tZOTAC\uff08\u30be\u30bf\u30c3\u30af\uff09 ZT-A30820F-10PLHR ZOTAC GAMING GeForce RTX 3080 AMP Holo LHR 12GB\uff08LHR\uff09 \/ PCI Express 4.0 \u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u30dc\u30fc\u30c9\t\t\t\t\t\t\t<\/div>\n\n\t\t\t<div class=\"yyi-rinker-detail\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<ul class=\"yyi-rinker-links\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"amazonlink\">\n\t\t\t\t\t\t<a href=\"https:\/\/www.amazon.co.jp\/gp\/search?ie=UTF8&amp;keywords=RTX3080&amp;tag=monodon-22&amp;index=blended&amp;linkCode=ure&amp;creative=6339\" rel=\"nofollow\" class=\"yyi-rinker-link\">Amazon<\/a>\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"rakutenlink\">\n\t\t\t\t\t\t<a href=\"https:\/\/af.moshimo.com\/af\/c\/click?a_id=3394378&amp;p_id=54&amp;pc_id=54&amp;pl_id=616&amp;url=https%3A%2F%2Fsearch.rakuten.co.jp%2Fsearch%2Fmall%2FRTX3080%2F%3Ff%3D1%26grp%3Dproduct\" rel=\"nofollow\" class=\"yyi-rinker-link\">\u697d\u5929\u5e02\u5834<\/a><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.moshimo.com\/af\/i\/impression?a_id=3394378&amp;p_id=54&amp;pc_id=54&amp;pl_id=616\" width=\"1\" height=\"1\" style=\"border:none;\">\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"yahoolink\">\n\t\t\t\t\t\t<a href=\"https:\/\/af.moshimo.com\/af\/c\/click?a_id=3442618&amp;p_id=1225&amp;pc_id=1925&amp;pl_id=18502&amp;url=https%3A%2F%2Fshopping.yahoo.co.jp%2Fsearch%3Fp%3DRTX3080\" rel=\"nofollow\" class=\"yyi-rinker-link\">Yahoo\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0<\/a><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.moshimo.com\/af\/i\/impression?a_id=3442618&amp;p_id=1225&amp;pc_id=1925&amp;pl_id=18502\" width=\"1\" height=\"1\" style=\"border:none;\">\t\t\t\t\t<\/li>\n\t\t\t\t                \t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t<\/div>\n\t<\/div>\n\t<\/div>\n\n<div id=\"rinkerid232\" class=\"yyi-rinker-contents  yyi-rinker-postid-232 yyi-rinker-img-m yyi-rinker-catid-12 \">\n\t<div class=\"yyi-rinker-box\">\n\t\t<div class=\"yyi-rinker-image\">\n\t\t\t\t\t\t\t<a href=\"https:\/\/af.moshimo.com\/af\/c\/click?a_id=3394378&#038;p_id=54&#038;pc_id=54&#038;pl_id=616&#038;url=https%3A%2F%2Fsearch.rakuten.co.jp%2Fsearch%2Fmall%2F%25E6%25A9%259F%25E6%25A2%25B0%25E5%25AD%25A6%25E7%25BF%2592%2F%3Ff%3D1%26grp%3Dproduct\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/thumbnail.image.rakuten.co.jp\/@0_mall\/book\/cabinet\/0074\/9784295010074_1_2.jpg?_ex=128x128\" width=\"128\" height=\"128\" class=\"yyi-rinker-main-img\" style=\"border: none;\"><\/a><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.moshimo.com\/af\/i\/impression?a_id=3394378&amp;p_id=54&amp;pc_id=54&amp;pl_id=616\" width=\"1\" height=\"1\" style=\"border:none;\">\t\t\t\t\t<\/div>\n\t\t<div class=\"yyi-rinker-info\">\n\t\t\t<div class=\"yyi-rinker-title\">\n\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/af.moshimo.com\/af\/c\/click?a_id=3394378&#038;p_id=54&#038;pc_id=54&#038;pl_id=616&#038;url=https%3A%2F%2Fsearch.rakuten.co.jp%2Fsearch%2Fmall%2F%25E6%25A9%259F%25E6%25A2%25B0%25E5%25AD%25A6%25E7%25BF%2592%2F%3Ff%3D1%26grp%3Dproduct\" rel=\"nofollow\">\uff3b\u7b2c3\u7248\uff3dPython\u6a5f\u68b0\u5b66\u7fd2\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u9054\u4eba\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u306b\u3088\u308b\u7406\u8ad6\u3068\u5b9f\u8df5 \uff08top gear\uff09 [ Sebastian Raschka;Vahid Mirjalili ]<\/a><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.moshimo.com\/af\/i\/impression?a_id=3394378&amp;p_id=54&amp;pc_id=54&amp;pl_id=616\" width=\"1\" height=\"1\" style=\"border:none;\">\t\t\t\t\t\t\t<\/div>\n\t\t\t<div class=\"yyi-rinker-detail\">\n\t\t\t\t\t\t\t<div class=\"credit-box\">created by&nbsp;<a href=\"https:\/\/oyakosodate.com\/rinker\/\" rel=\"nofollow noopener\" target=\"_blank\" >Rinker<\/a><\/div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"price-box\">\n\t\t\t\t\t\t\t<span title=\"\" class=\"price\">\u00a54,400<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"price_at\">(2026\/04\/19 19:21:19\u6642\u70b9&nbsp;\u697d\u5929\u5e02\u5834\u8abf\u3079-<\/span><span title=\"\u3053\u306e\u30b5\u30a4\u30c8\u3067\u63b2\u8f09\u3055\u308c\u3066\u3044\u308b\u60c5\u5831\u306f\u5f53\u30b5\u30a4\u30c8\u306e\u4f5c\u6210\u8005\u306b\u3088\u308a\u904b\u55b6\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4fa1\u683c\u3001\u8ca9\u58f2\u53ef\u80fd\u60c5\u5831\u306f\u3001\u5909\u66f4\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u8cfc\u5165\u6642\u306b\u697d\u5929\u5e02\u5834\u5e97\u8217\uff08www.rakuten.co.jp\uff09\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u4fa1\u683c\u304c\u305d\u306e\u5546\u54c1\u306e\u8ca9\u58f2\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002\">\u8a73\u7d30)<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<ul class=\"yyi-rinker-links\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t                    <li class=\"amazonlink\">\n\t\t\t\t\t\t<a href=\"https:\/\/www.amazon.co.jp\/gp\/search?ie=UTF8&amp;keywords=%E6%A9%9F%E6%A2%B0%E5%AD%A6%E7%BF%92&amp;tag=monodon-22&amp;index=blended&amp;linkCode=ure&amp;creative=6339\" rel=\"nofollow\" class=\"yyi-rinker-link\">Amazon<\/a>\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"rakutenlink\">\n\t\t\t\t\t\t<a href=\"https:\/\/af.moshimo.com\/af\/c\/click?a_id=3394378&amp;p_id=54&amp;pc_id=54&amp;pl_id=616&amp;url=https%3A%2F%2Fsearch.rakuten.co.jp%2Fsearch%2Fmall%2F%25E6%25A9%259F%25E6%25A2%25B0%25E5%25AD%25A6%25E7%25BF%2592%2F%3Ff%3D1%26grp%3Dproduct\" rel=\"nofollow\" class=\"yyi-rinker-link\">\u697d\u5929\u5e02\u5834<\/a><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.moshimo.com\/af\/i\/impression?a_id=3394378&amp;p_id=54&amp;pc_id=54&amp;pl_id=616\" width=\"1\" height=\"1\" style=\"border:none;\">\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"yahoolink\">\n\t\t\t\t\t\t<a href=\"https:\/\/af.moshimo.com\/af\/c\/click?a_id=3442618&amp;p_id=1225&amp;pc_id=1925&amp;pl_id=18502&amp;url=https%3A%2F%2Fshopping.yahoo.co.jp%2Fsearch%3Fp%3D%25E6%25A9%259F%25E6%25A2%25B0%25E5%25AD%25A6%25E7%25BF%2592\" rel=\"nofollow\" class=\"yyi-rinker-link\">Yahoo\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0<\/a><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.moshimo.com\/af\/i\/impression?a_id=3442618&amp;p_id=1225&amp;pc_id=1925&amp;pl_id=18502\" width=\"1\" height=\"1\" style=\"border:none;\">\t\t\t\t\t<\/li>\n\t\t\t\t                \t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u307e\u305f\u307e\u305fStable Diffusion\u30cd\u30bf\u3067\u3059\u3002\u30c9\u306f\u307e\u308a\u3057\u305f\u306e\u3067\u3001\u3057\u3070\u3089\u304f\u306f\u3053\u306e\u8a71\u984c\u306b\u306a\u308a\u305d\u3046\u3067\u3059 \u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3068\u306f\uff1f \u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(\u8ee2\u79fb\u5b66\u7fd2)\u3068\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002 \u4e00\u822c\u7684\u306a\u624b\u6cd5\u3067\u3042\u308b\u300e\u6559\u5e2b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":285,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059 - Sheltie Garage Tech<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u8a66\u3059\u304c\u3001\u52d5\u4f5c\u3057\u307e\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059 - Sheltie Garage Tech\" \/>\n<meta property=\"og:description\" content=\"\u307e\u305f\u307e\u305fStable Diffusion\u30cd\u30bf\u3067\u3059\u3002\u30c9\u306f\u307e\u308a\u3057\u305f\u306e\u3067\u3001\u3057\u3070\u3089\u304f\u306f\u3053\u306e\u8a71\u984c\u306b\u306a\u308a\u305d\u3046\u3067\u3059 \u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3068\u306f\uff1f \u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(\u8ee2\u79fb\u5b66\u7fd2)\u3068\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002 \u4e00\u822c\u7684\u306a\u624b\u6cd5\u3067\u3042\u308b\u300e\u6559\u5e2b [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u8a66\u3059\u304c\u3001\u52d5\u4f5c\u3057\u307e\/\" \/>\n<meta property=\"og:site_name\" content=\"Sheltie Garage Tech\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-04T04:58:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-24T08:11:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0001.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"516\" \/>\n\t<meta property=\"og:image:height\" content=\"516\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"monodon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"monodon\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"73\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/\"},\"author\":{\"name\":\"monodon\",\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/#\\\/schema\\\/person\\\/f67942d4a63ae93a823618fc5a09077f\"},\"headline\":\"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059\",\"datePublished\":\"2022-09-04T04:58:37+00:00\",\"dateModified\":\"2022-09-24T08:11:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/\"},\"wordCount\":138,\"commentCount\":4,\"image\":{\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/anime-girl-japanese-0001.jpg\",\"articleSection\":[\"AI\u30fb\u6a5f\u68b0\u5b66\u7fd2\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/\",\"url\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/\",\"name\":\"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059 - Sheltie Garage Tech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/anime-girl-japanese-0001.jpg\",\"datePublished\":\"2022-09-04T04:58:37+00:00\",\"dateModified\":\"2022-09-24T08:11:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/#\\\/schema\\\/person\\\/f67942d4a63ae93a823618fc5a09077f\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/anime-girl-japanese-0001.jpg\",\"contentUrl\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/anime-girl-japanese-0001.jpg\",\"width\":516,\"height\":516},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/2022\\\/09\\\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/#website\",\"url\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/\",\"name\":\"Sheltie Garage Tech\",\"description\":\"\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u95a2\u9023\u306e\u8a71\u984c\u3092\u307e\u3068\u3081\u305f\u30d6\u30ed\u30b0\u3067\u3059\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/#\\\/schema\\\/person\\\/f67942d4a63ae93a823618fc5a09077f\",\"name\":\"monodon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/692645b6204688b4dd631c1af09e3f8290eef390d3a741e60c237b98263fb860?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/692645b6204688b4dd631c1af09e3f8290eef390d3a741e60c237b98263fb860?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/692645b6204688b4dd631c1af09e3f8290eef390d3a741e60c237b98263fb860?s=96&d=mm&r=g\",\"caption\":\"monodon\"},\"sameAs\":[\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\"],\"url\":\"https:\\\/\\\/sheltie-garage.xyz\\\/tech\\\/author\\\/monodon\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059 - Sheltie Garage Tech","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u8a66\u3059\u304c\u3001\u52d5\u4f5c\u3057\u307e\/","og_locale":"ja_JP","og_type":"article","og_title":"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059 - Sheltie Garage Tech","og_description":"\u307e\u305f\u307e\u305fStable Diffusion\u30cd\u30bf\u3067\u3059\u3002\u30c9\u306f\u307e\u308a\u3057\u305f\u306e\u3067\u3001\u3057\u3070\u3089\u304f\u306f\u3053\u306e\u8a71\u984c\u306b\u306a\u308a\u305d\u3046\u3067\u3059 \u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3068\u306f\uff1f \u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(\u8ee2\u79fb\u5b66\u7fd2)\u3068\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002 \u4e00\u822c\u7684\u306a\u624b\u6cd5\u3067\u3042\u308b\u300e\u6559\u5e2b [&hellip;]","og_url":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u8a66\u3059\u304c\u3001\u52d5\u4f5c\u3057\u307e\/","og_site_name":"Sheltie Garage Tech","article_published_time":"2022-09-04T04:58:37+00:00","article_modified_time":"2022-09-24T08:11:36+00:00","og_image":[{"width":516,"height":516,"url":"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0001.jpg","type":"image\/jpeg"}],"author":"monodon","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"monodon","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"73\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/#article","isPartOf":{"@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/"},"author":{"name":"monodon","@id":"https:\/\/sheltie-garage.xyz\/tech\/#\/schema\/person\/f67942d4a63ae93a823618fc5a09077f"},"headline":"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059","datePublished":"2022-09-04T04:58:37+00:00","dateModified":"2022-09-24T08:11:36+00:00","mainEntityOfPage":{"@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/"},"wordCount":138,"commentCount":4,"image":{"@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/#primaryimage"},"thumbnailUrl":"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0001.jpg","articleSection":["AI\u30fb\u6a5f\u68b0\u5b66\u7fd2"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/","url":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/","name":"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059 - Sheltie Garage Tech","isPartOf":{"@id":"https:\/\/sheltie-garage.xyz\/tech\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/#primaryimage"},"image":{"@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/#primaryimage"},"thumbnailUrl":"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0001.jpg","datePublished":"2022-09-04T04:58:37+00:00","dateModified":"2022-09-24T08:11:36+00:00","author":{"@id":"https:\/\/sheltie-garage.xyz\/tech\/#\/schema\/person\/f67942d4a63ae93a823618fc5a09077f"},"breadcrumb":{"@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/#primaryimage","url":"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0001.jpg","contentUrl":"https:\/\/sheltie-garage.xyz\/tech\/wp-content\/uploads\/2022\/09\/anime-girl-japanese-0001.jpg","width":516,"height":516},{"@type":"BreadcrumbList","@id":"https:\/\/sheltie-garage.xyz\/tech\/2022\/09\/stable-diffusion%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%b3%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99%e3%81%8c%e3%80%81%e5%8b%95%e4%bd%9c%e3%81%97%e3%81%be\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/sheltie-garage.xyz\/tech\/"},{"@type":"ListItem","position":2,"name":"Stable Diffusion\u3067\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0(Finetune)\u3092\u8a66\u3059"}]},{"@type":"WebSite","@id":"https:\/\/sheltie-garage.xyz\/tech\/#website","url":"https:\/\/sheltie-garage.xyz\/tech\/","name":"Sheltie Garage Tech","description":"\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u95a2\u9023\u306e\u8a71\u984c\u3092\u307e\u3068\u3081\u305f\u30d6\u30ed\u30b0\u3067\u3059","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sheltie-garage.xyz\/tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/sheltie-garage.xyz\/tech\/#\/schema\/person\/f67942d4a63ae93a823618fc5a09077f","name":"monodon","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/692645b6204688b4dd631c1af09e3f8290eef390d3a741e60c237b98263fb860?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/692645b6204688b4dd631c1af09e3f8290eef390d3a741e60c237b98263fb860?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/692645b6204688b4dd631c1af09e3f8290eef390d3a741e60c237b98263fb860?s=96&d=mm&r=g","caption":"monodon"},"sameAs":["https:\/\/sheltie-garage.xyz\/tech"],"url":"https:\/\/sheltie-garage.xyz\/tech\/author\/monodon\/"}]}},"_links":{"self":[{"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":15,"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":372,"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/posts\/262\/revisions\/372"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/media\/285"}],"wp:attachment":[{"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/categories?post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sheltie-garage.xyz\/tech\/wp-json\/wp\/v2\/tags?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}