Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SageMakerでもAUTOMATIC1111したい

 SageMakerでもAUTOMATIC1111したい

BedrockにStability AI社のStable Diffusionも含まれてますが、わたしが欲しいのはStable Diffusion Web UI。ということで普段はColabを使ってますが今回はSgaeMaker Studioを使ってStable Diffusion Web UI、通称「AUTOMATIC1111」を動かすために工夫した部分の記録です。

吉田真吾

April 18, 2023
Tweet

More Decks by 吉田真吾

Other Decks in Technology

Transcript

  1. AWS Serverless Hero n p Oracle SA p 113 /

    pAWS n ( ) CTO p SaaS ( ) pAWS DevOps n pAWS (2012 ) pAWS Samurai 2014 / 2016 pAWS Serverless Hero AWS AWS Lambda Amazon S3 ChillOutMix
  2. 4UBCMF%JGGVTJPO8FC6* ඇެࣜ  "650."5*$ "650."5*$·ΘΓ • ࣮࣭σϑΝΫτ • ͜ΕͰྲྀߦͨ͠ •

    4UBCMF%JGGVTJPO • ରԠͯ͠ΔϞσϧ͕ଟ͍ • ͨͩ͠όʔδϣϯݹ͍ • ݱࡏ͕࠷৽044ެ։ • 4UBCMF"*͕ࣾΤίγεςϜ ෆ׳Ε • ਂ௡͞ΜͷΞυόΠβϦͰࠓޙ ͷൃలʹ஫໨ ແݶϧʔϓͷ᠘  ૂ͍Ͳ͓ΓͷεΫϦϓςΟϯά  େྔग़ྗˠ࢓෼͚ˠϋΠϨκԽ  (16͕ཉ͍͠  ϋΠϨκԽ·ͰҰؾʹόονԽ  (16͕ཉ͍͠  $POUSPM/FU ϙʔδϯά੍ޚ ˠ όονॲཧऴΘΒͳ͍  (16͕ཉ͍͠
  3. Ϋϥ΢υͰ"650."5*$ • 359͸ߴͯ͘ख͕Ͱͳ͍ • جຊతͳΫϥ΢υΞϓϩʔν • खݩͰ؀ڥηοτΞοϓˠ$6%"ͳ͠Ͱ΋.."9Ͱಈ͘ • 1/(*OGPˠUYUJNBHFɺ UYUJNBHFͷεΫϦϓτɺ7"&ɺ4BNQMJOH

    .FUIPEɺεέʔϧɺ&YUFOTJPOTɺ$POUSPM/FU͕҆ఆͨ͠ΒΫϥ΢υ Ͱେྔόονॲཧ • Ϋϥ΢υ • (PPHMF$PMBCPMBUPSZɿਖ਼௚Ұ൪ϥΫɺφϨοδ΋ଟ͍ɻແྉ൛͸ ૣʑʹ࢖͍Ռͨ͢ͷͰ1MVTܖ໿͕٢ʲ.POFZJT1PXFSʳ • 4BHF.BLFS 4UVEJPɿ4BHF.BLFS 4UVEJP-BC͕Ӭٱແྉ͕ͩɺ(16 ϥϯλΠϜ͸࣌ؒத͔࣌ؒ͠࢖͑ͳ͍ɺ͞ΒʹςϨϗλΠϜతʹ ਓؾͷ࣌ؒଳ͸(16ͷׂΓ౰ͯʹࣦഊ͕ͪ͠ ˠ4BHF.BLFS 4UVEJPͰΦϯσϚϯυͳ(16ϚγϯΛׂΓ౰ͯͯ΍Γ ·͠ΐ͏ɻʲ.POFZJT1PXFSʳ
  4. 4BHF.BLFS 4UVEJPͰ"650."5*$ • 4BHF.BLFS 4UVEJP-BC༻ʹΧελϚΠζ͞Εͨ"650."5*$ • ͢Ͱʹແޮͳ63- 7"&΍$IFDLQPJOUϑΝΠϧ ͕͋ΔͷͰΑ͠ͳʹमਖ਼͢Δ •

    ্ݶ؇࿨ਃ੥ • $6%"͕ཁΔͷͰɺ1΍(ܥΠϯελϯε (16 ͷ্ݶ؇࿨ਃ੥ ˠ 4UVEJP,FSOFM(BUFXBZ "QQTSVOOJOHPONMQYMBSHFJOTUBODF • JQZXJEHFUT͕ೖͬͯͳ͚Ε͹ೖΕΔ • 8FCαʔόʔ • 4BHF.BLFS 4UVEJP͸σϑΥϧτͰ֎෦8FCެ։͞Εͳ͍ • (SBEJPΛOHSPLʹஔ͖׵͑ͯɺOHSPLͷΞΫηετʔΫϯΛൃߦ͢Δ • Πϯελϯεͷىಈͬ͠ͺͳ͠ʹ஫ҙ͢Δ ϚδͰʂ • (PPHMF$PMBCͷΑ͏ʹࣗಈతʹηογϣϯλΠϜΞ΢τ γϟοτμ΢ϯ ͠ͳ͍ https://gist.github.com/ShMcK/d14d90abea1437fdc9cfe8ecda864b06 !pip install ipywidgets
  5. ղܾࡦ • Ϛ΢ϯτީิΛߟ͑Δ • (PPHMF %SJWFͷϚ΢ϯτͷ··Ͱ͍͚Δʁ • &'4΍&#4͸௚઀͞ΘΕͳ͍͔Β"NB[PO4ΛHPPGZTͰϚ΢ϯτ͠ ͯ$ZCFSEVDLͰϩʔΧϧͱಉظ͢Δ͔ʁ •

    "NB[PO8PSL%PDT %SJWF • ݁Ռ • (PPHMF%SJWF ˠ HPPHMFDPMBCϞδϡʔϧ͕ͳ͍ͨΊ࢖͑ͳ͍ • "NB[PO4ˠ HPPGZTͰϚ΢ϯτઌʹॻ͖ग़ͯ͠Τϥʔ͕ൃੜͨ͠ Βͱͯ΋൵͍͠ ˠ ηογϣϯ׬ྃޙʹBXT TTZODͯ͠$ZCFSEVDL ˠ ݱ࣌఺Ͱे෼ͳ69Λ֬อͰ͖Δ֎෦Ϛ΢ϯτํ๏͸ͳͦ͞͏ ˠ όοΫΞοϓ΍ڞ༗࡞ۀσΟεΫͱͯ͠ͷ&'4΍&#4͸໰୊ͳ͍ ˠ"84͞ΜϚδͰࣗಈγϟοτμ΢ϯ͓ئ͍͠·͢ !aws s3 sync /root/stable-diffusion-webui/outputs s3://sd-outputs
  6. ݁࿦  (16χʔζ͸Ϋϥ΢υͰղܾՄೳɻͨͩ͠4BHF.BLFS 4UVEJP ͷ8FC6*χʔζ͸΄΅૝ఆ͞Εͯͳ͍ɻ  Ϋϥ΢υ্ͷϑΝΠϧͷͱΓ·Θ͠ʹ44ZOD͸ສೳɻ  աڈͷͰ͖͝ͱ΍൴ঁͱͷೃΕॳΊγʔϯͳͲɺը૾͕ଘࡏ͠ͳ ͍Ͱ͖͝ͱͷը૾ੜ੒ʹ#FESPDLܦ༝ͷ4UBCMF%JGGVTJPO͕׆

    ༻Մೳ͔΋͠Εͳ͍ɻͱ͔͔ͬΓʹ"650."5*$͸Θ͔Γ ΍͍͢ɻ  ࡢ೔ͷෆศ͸ɺࠓ೔ͷΠϊϕʔγϣϯɺ໌೔ͷ͋ͨΓ·͑ "84͞Μʹ͓ئ͍  Χʔωϧ ϥϯλΠϜ ͷηογϣϯλΠϜΞ΢τ  HPPHMFDPMBCϥΠϒϥϦͷΑ͏ͳ4 ͳͲ Ϛ΢ϯτϥΠϒϥϦ