import{S as Rl,i as vl,s as Xl,e as f,k as d,w as E,t as r,M as Wl,c as m,d as e,m as T,a as c,x as I,h as o,b as J,G as l,g as n,y as Z,q as R,o as v,B as X,v as Bl,L as Ue}from"../../chunks/vendor-hf-doc-builder.js";import{T as xl}from"../../chunks/Tip-hf-doc-builder.js";import{I as Oe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as st}from"../../chunks/CodeBlock-hf-doc-builder.js";import{F as Zl,M as be}from"../../chunks/Markdown-hf-doc-builder.js";function Gl(C){let s,u;return{c(){s=f("p"),u=r("text-to-image \uD30C\uC778\uD29C\uB2DD \uC2A4\uD06C\uB9BD\uD2B8\uB294 experimental \uC0C1\uD0DC\uC785\uB2C8\uB2E4. \uACFC\uC801\uD569\uD558\uAE30 \uC27D\uACE0 \uCE58\uBA85\uC801\uC778 \uB9DD\uAC01\uACFC \uAC19\uC740 \uBB38\uC81C\uC5D0 \uBD80\uB52A\uD788\uAE30 \uC27D\uC2B5\uB2C8\uB2E4. \uC790\uCCB4 \uB370\uC774\uD130\uC14B\uC5D0\uC11C \uCD5C\uC0C1\uC758 \uACB0\uACFC\uB97C \uC5BB\uC73C\uB824\uBA74 \uB2E4\uC591\uD55C \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uD0D0\uC0C9\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.")},l(a){s=m(a,"P",{});var h=c(s);u=o(h,"text-to-image \uD30C\uC778\uD29C\uB2DD \uC2A4\uD06C\uB9BD\uD2B8\uB294 experimental \uC0C1\uD0DC\uC785\uB2C8\uB2E4. \uACFC\uC801\uD569\uD558\uAE30 \uC27D\uACE0 \uCE58\uBA85\uC801\uC778 \uB9DD\uAC01\uACFC \uAC19\uC740 \uBB38\uC81C\uC5D0 \uBD80\uB52A\uD788\uAE30 \uC27D\uC2B5\uB2C8\uB2E4. \uC790\uCCB4 \uB370\uC774\uD130\uC14B\uC5D0\uC11C \uCD5C\uC0C1\uC758 \uACB0\uACFC\uB97C \uC5BB\uC73C\uB824\uBA74 \uB2E4\uC591\uD55C \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uD0D0\uC0C9\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4."),h.forEach(e)},m(a,h){n(a,s,h),l(s,u)},d(a){a&&e(s)}}}function Fl(C){let s,u,a,h,w,b,rt,z,A,k,y,G,$,Q,L,P,F,q,j,O,g,K,Y,D,tt,V,H,W,et,B,lt;return k=new st({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBkYXRhc2V0X25hbWUlM0QlMjJsYW1iZGFsYWJzJTJGcG9rZW1vbi1ibGlwLWNhcHRpb25zJTIyJTBBJTBBYWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluX3RleHRfdG9faW1hZ2UucHklMjAlNUMlMEElMjAlMjAtLXByZXRyYWluZWRfbW9kZWxfbmFtZV9vcl9wYXRoJTNEJTI0TU9ERUxfTkFNRSUyMCU1QyUwQSUyMCUyMC0tZGF0YXNldF9uYW1lJTNEJTI0ZGF0YXNldF9uYW1lJTIwJTVDJTBBJTIwJTIwLS11c2VfZW1hJTIwJTVDJTBBJTIwJTIwLS1yZXNvbHV0aW9uJTNENTEyJTIwLS1jZW50ZXJfY3JvcCUyMC0tcmFuZG9tX2ZsaXAlMjAlNUMlMEElMjAlMjAtLXRyYWluX2JhdGNoX3NpemUlM0QxJTIwJTVDJTBBJTIwJTIwLS1ncmFkaWVudF9hY2N1bXVsYXRpb25fc3RlcHMlM0Q0JTIwJTVDJTBBJTIwJTIwLS1ncmFkaWVudF9jaGVja3BvaW50aW5nJTIwJTVDJTBBJTIwJTIwLS1taXhlZF9wcmVjaXNpb24lM0QlMjJmcDE2JTIyJTIwJTVDJTBBJTIwJTIwLS1tYXhfdHJhaW5fc3RlcHMlM0QxNTAwMCUyMCU1QyUwQSUyMCUyMC0tbGVhcm5pbmdfcmF0ZSUzRDFlLTA1JTIwJTVDJTBBJTIwJTIwLS1tYXhfZ3JhZF9ub3JtJTNEMSUyMCU1QyUwQSUyMCUyMC0tbHJfc2NoZWR1bGVyJTNEJTIyY29uc3RhbnQlMjIlMjAtLWxyX3dhcm11cF9zdGVwcyUzRDAlMjAlNUMlMEElMjAlMjAtLW91dHB1dF9kaXIlM0QlMjJzZC1wb2tlbW9uLW1vZGVsJTIyJTIw",highlighted:`<span class="hljs-built_in">export</span> MODEL_NAME=<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>
<span class="hljs-built_in">export</span> dataset_name=<span class="hljs-string">&quot;lambdalabs/pokemon-blip-captions&quot;</span>

accelerate launch train_text_to_image.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span> \\
  --dataset_name=<span class="hljs-variable">$dataset_name</span> \\
  --use_ema \\
  --resolution=512 --center_crop --random_flip \\
  --train_batch_size=1 \\
  --gradient_accumulation_steps=4 \\
  --gradient_checkpointing \\
  --mixed_precision=<span class="hljs-string">&quot;fp16&quot;</span> \\
  --max_train_steps=15000 \\
  --learning_rate=1e-05 \\
  --max_grad_norm=1 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> --lr_warmup_steps=0 \\
  --output_dir=<span class="hljs-string">&quot;sd-pokemon-model&quot;</span> `}}),B=new st({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBUUkFJTl9ESVIlM0QlMjJwYXRoX3RvX3lvdXJfZGF0YXNldCUyMiUwQWV4cG9ydCUyME9VVFBVVF9ESVIlM0QlMjJwYXRoX3RvX3NhdmVfbW9kZWwlMjIlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwdHJhaW5fdGV4dF90b19pbWFnZS5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTVDJTBBJTIwJTIwLS10cmFpbl9kYXRhX2RpciUzRCUyNFRSQUlOX0RJUiUyMCU1QyUwQSUyMCUyMC0tdXNlX2VtYSUyMCU1QyUwQSUyMCUyMC0tcmVzb2x1dGlvbiUzRDUxMiUyMC0tY2VudGVyX2Nyb3AlMjAtLXJhbmRvbV9mbGlwJTIwJTVDJTBBJTIwJTIwLS10cmFpbl9iYXRjaF9zaXplJTNEMSUyMCU1QyUwQSUyMCUyMC0tZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTNENCUyMCU1QyUwQSUyMCUyMC0tZ3JhZGllbnRfY2hlY2twb2ludGluZyUyMCU1QyUwQSUyMCUyMC0tbWl4ZWRfcHJlY2lzaW9uJTNEJTIyZnAxNiUyMiUyMCU1QyUwQSUyMCUyMC0tbWF4X3RyYWluX3N0ZXBzJTNEMTUwMDAlMjAlNUMlMEElMjAlMjAtLWxlYXJuaW5nX3JhdGUlM0QxZS0wNSUyMCU1QyUwQSUyMCUyMC0tbWF4X2dyYWRfbm9ybSUzRDElMjAlNUMlMEElMjAlMjAtLWxyX3NjaGVkdWxlciUzRCUyMmNvbnN0YW50JTIyJTIwLS1scl93YXJtdXBfc3RlcHMlM0QwJTIwJTVDJTBBJTIwJTIwLS1vdXRwdXRfZGlyJTNEJTI0JTdCT1VUUFVUX0RJUiU3RA==",highlighted:`<span class="hljs-built_in">export</span> MODEL_NAME=<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>
<span class="hljs-built_in">export</span> TRAIN_DIR=<span class="hljs-string">&quot;path_to_your_dataset&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path_to_save_model&quot;</span>

accelerate launch train_text_to_image.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span> \\
  --train_data_dir=<span class="hljs-variable">$TRAIN_DIR</span> \\
  --use_ema \\
  --resolution=512 --center_crop --random_flip \\
  --train_batch_size=1 \\
  --gradient_accumulation_steps=4 \\
  --gradient_checkpointing \\
  --mixed_precision=<span class="hljs-string">&quot;fp16&quot;</span> \\
  --max_train_steps=15000 \\
  --learning_rate=1e-05 \\
  --max_grad_norm=1 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> --lr_warmup_steps=0 \\
  --output_dir=<span class="hljs-variable">\${OUTPUT_DIR}</span>`}}),{c(){s=f("p"),u=r("\uB2E4\uC74C\uACFC \uAC19\uC774 "),a=f("a"),h=r("Pok\xE9mon BLIP \uCEA1\uC158"),w=r(" \uB370\uC774\uD130\uC14B\uC5D0\uC11C \uD30C\uC778\uD29C\uB2DD \uC2E4\uD589\uC744 \uC704\uD574 "),b=f("a"),rt=r("PyTorch \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8"),z=r("\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4:"),A=d(),E(k.$$.fragment),y=d(),G=f("p"),$=r("\uC790\uCCB4 \uB370\uC774\uD130\uC14B\uC73C\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uB824\uBA74 \u{1F917} "),Q=f("a"),L=r("Datasets"),P=r("\uC5D0\uC11C \uC694\uAD6C\uD558\uB294 \uD615\uC2DD\uC5D0 \uB530\uB77C \uB370\uC774\uD130\uC14B\uC744 \uC900\uBE44\uD558\uC138\uC694. "),F=f("a"),q=r("\uB370\uC774\uD130\uC14B\uC744 \uD5C8\uBE0C\uC5D0 \uC5C5\uB85C\uB4DC"),j=r("\uD558\uAC70\uB098 [\uD30C\uC77C\uB4E4\uC774 \uC788\uB294 \uB85C\uCEEC \uD3F4\uB354\uB97C \uC900\uBE44](https ://huggingface.co/docs/datasets/image_dataset#imagefolder)\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),O=d(),g=f("p"),K=r("\uC0AC\uC6A9\uC790 \uCEE4\uC2A4\uD140 loading logic\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC218\uC815\uD558\uC2ED\uC2DC\uC624. \uB3C4\uC6C0\uC774 \uB418\uB3C4\uB85D \uCF54\uB4DC\uC758 \uC801\uC808\uD55C \uC704\uCE58\uC5D0 \uD3EC\uC778\uD130\uB97C \uB0A8\uACBC\uC2B5\uB2C8\uB2E4. \u{1F917} \uC544\uB798 \uC608\uC81C \uC2A4\uD06C\uB9BD\uD2B8\uB294 "),Y=f("code"),D=r("TRAIN_DIR"),tt=r("\uC758 \uB85C\uCEEC \uB370\uC774\uD130\uC14B\uC73C\uB85C\uB97C \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uACFC "),V=f("code"),H=r("OUTPUT_DIR"),W=r("\uC5D0\uC11C \uBAA8\uB378\uC744 \uC800\uC7A5\uD560 \uC704\uCE58\uB97C \uBCF4\uC5EC\uC90D\uB2C8\uB2E4:"),et=d(),E(B.$$.fragment),this.h()},l(_){s=m(_,"P",{});var M=c(s);u=o(M,"\uB2E4\uC74C\uACFC \uAC19\uC774 "),a=m(M,"A",{href:!0,rel:!0});var N=c(a);h=o(N,"Pok\xE9mon BLIP \uCEA1\uC158"),N.forEach(e),w=o(M," \uB370\uC774\uD130\uC14B\uC5D0\uC11C \uD30C\uC778\uD29C\uB2DD \uC2E4\uD589\uC744 \uC704\uD574 "),b=m(M,"A",{href:!0,rel:!0});var at=c(b);rt=o(at,"PyTorch \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8"),at.forEach(e),z=o(M,"\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4:"),M.forEach(e),A=T(_),I(k.$$.fragment,_),y=T(_),G=m(_,"P",{});var p=c(G);$=o(p,"\uC790\uCCB4 \uB370\uC774\uD130\uC14B\uC73C\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uB824\uBA74 \u{1F917} "),Q=m(p,"A",{href:!0,rel:!0});var U=c(Q);L=o(U,"Datasets"),U.forEach(e),P=o(p,"\uC5D0\uC11C \uC694\uAD6C\uD558\uB294 \uD615\uC2DD\uC5D0 \uB530\uB77C \uB370\uC774\uD130\uC14B\uC744 \uC900\uBE44\uD558\uC138\uC694. "),F=m(p,"A",{href:!0,rel:!0});var pt=c(F);q=o(pt,"\uB370\uC774\uD130\uC14B\uC744 \uD5C8\uBE0C\uC5D0 \uC5C5\uB85C\uB4DC"),pt.forEach(e),j=o(p,"\uD558\uAC70\uB098 [\uD30C\uC77C\uB4E4\uC774 \uC788\uB294 \uB85C\uCEEC \uD3F4\uB354\uB97C \uC900\uBE44](https ://huggingface.co/docs/datasets/image_dataset#imagefolder)\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),p.forEach(e),O=T(_),g=m(_,"P",{});var S=c(g);K=o(S,"\uC0AC\uC6A9\uC790 \uCEE4\uC2A4\uD140 loading logic\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC218\uC815\uD558\uC2ED\uC2DC\uC624. \uB3C4\uC6C0\uC774 \uB418\uB3C4\uB85D \uCF54\uB4DC\uC758 \uC801\uC808\uD55C \uC704\uCE58\uC5D0 \uD3EC\uC778\uD130\uB97C \uB0A8\uACBC\uC2B5\uB2C8\uB2E4. \u{1F917} \uC544\uB798 \uC608\uC81C \uC2A4\uD06C\uB9BD\uD2B8\uB294 "),Y=m(S,"CODE",{});var ot=c(Y);D=o(ot,"TRAIN_DIR"),ot.forEach(e),tt=o(S,"\uC758 \uB85C\uCEEC \uB370\uC774\uD130\uC14B\uC73C\uB85C\uB97C \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uACFC "),V=m(S,"CODE",{});var nt=c(V);H=o(nt,"OUTPUT_DIR"),nt.forEach(e),W=o(S,"\uC5D0\uC11C \uBAA8\uB378\uC744 \uC800\uC7A5\uD560 \uC704\uCE58\uB97C \uBCF4\uC5EC\uC90D\uB2C8\uB2E4:"),S.forEach(e),et=T(_),I(B.$$.fragment,_),this.h()},h(){J(a,"href","https://huggingface.co/datasets/lambdalabs/pokemon-blip-captions"),J(a,"rel","nofollow"),J(b,"href","https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image.py"),J(b,"rel","nofollow"),J(Q,"href","https://huggingface.co/docs/datasets/index"),J(Q,"rel","nofollow"),J(F,"href","https://huggingface.co/docs/datasets/image_dataset#upload-dataset-to-the-hub"),J(F,"rel","nofollow")},m(_,M){n(_,s,M),l(s,u),l(s,a),l(a,h),l(s,w),l(s,b),l(b,rt),l(s,z),n(_,A,M),Z(k,_,M),n(_,y,M),n(_,G,M),l(G,$),l(G,Q),l(Q,L),l(G,P),l(G,F),l(F,q),l(G,j),n(_,O,M),n(_,g,M),l(g,K),l(g,Y),l(Y,D),l(g,tt),l(g,V),l(V,H),l(g,W),n(_,et,M),Z(B,_,M),lt=!0},p:Ue,i(_){lt||(R(k.$$.fragment,_),R(B.$$.fragment,_),lt=!0)},o(_){v(k.$$.fragment,_),v(B.$$.fragment,_),lt=!1},d(_){_&&e(s),_&&e(A),X(k,_),_&&e(y),_&&e(G),_&&e(O),_&&e(g),_&&e(et),X(B,_)}}}function Cl(C){let s,u;return s=new be({props:{$$slots:{default:[Fl]},$$scope:{ctx:C}}}),{c(){E(s.$$.fragment)},l(a){I(s.$$.fragment,a)},m(a,h){Z(s,a,h),u=!0},p(a,h){const w={};h&2&&(w.$$scope={dirty:h,ctx:a}),s.$set(w)},i(a){u||(R(s.$$.fragment,a),u=!0)},o(a){v(s.$$.fragment,a),u=!1},d(a){X(s,a)}}}function Nl(C){let s,u,a,h,w,b,rt,z,A,k,y,G,$,Q,L,P,F,q,j,O,g,K,Y,D,tt,V,H,W,et,B,lt,_,M,N,at;return A=new st({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwLXIlMjByZXF1aXJlbWVudHNfZmxheC50eHQ=",highlighted:"pip install -U -r requirements_flax.txt"}}),F=new st({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBZXhwb3J0JTIwZGF0YXNldF9uYW1lJTNEJTIybGFtYmRhbGFicyUyRnBva2Vtb24tYmxpcC1jYXB0aW9ucyUyMiUwQSUwQXB5dGhvbiUyMHRyYWluX3RleHRfdG9faW1hZ2VfZmxheC5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTVDJTBBJTIwJTIwLS1kYXRhc2V0X25hbWUlM0QlMjRkYXRhc2V0X25hbWUlMjAlNUMlMEElMjAlMjAtLXJlc29sdXRpb24lM0Q1MTIlMjAtLWNlbnRlcl9jcm9wJTIwLS1yYW5kb21fZmxpcCUyMCU1QyUwQSUyMCUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUzRDElMjAlNUMlMEElMjAlMjAtLW1heF90cmFpbl9zdGVwcyUzRDE1MDAwJTIwJTVDJTBBJTIwJTIwLS1sZWFybmluZ19yYXRlJTNEMWUtMDUlMjAlNUMlMEElMjAlMjAtLW1heF9ncmFkX25vcm0lM0QxJTIwJTVDJTBBJTIwJTIwLS1vdXRwdXRfZGlyJTNEJTIyc2QtcG9rZW1vbi1tb2RlbCUyMiUyMA==",highlighted:`<span class="hljs-built_in">export</span> MODEL_NAME=<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
<span class="hljs-built_in">export</span> dataset_name=<span class="hljs-string">&quot;lambdalabs/pokemon-blip-captions&quot;</span>

python train_text_to_image_flax.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span> \\
  --dataset_name=<span class="hljs-variable">$dataset_name</span> \\
  --resolution=512 --center_crop --random_flip \\
  --train_batch_size=1 \\
  --max_train_steps=15000 \\
  --learning_rate=1e-05 \\
  --max_grad_norm=1 \\
  --output_dir=<span class="hljs-string">&quot;sd-pokemon-model&quot;</span> `}}),N=new st({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMmR1b25nbmElMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQtZmxheCUyMiUwQWV4cG9ydCUyMFRSQUlOX0RJUiUzRCUyMnBhdGhfdG9feW91cl9kYXRhc2V0JTIyJTBBJTBBcHl0aG9uJTIwdHJhaW5fdGV4dF90b19pbWFnZV9mbGF4LnB5JTIwJTVDJTBBJTIwJTIwLS1wcmV0cmFpbmVkX21vZGVsX25hbWVfb3JfcGF0aCUzRCUyNE1PREVMX05BTUUlMjAlNUMlMEElMjAlMjAtLXRyYWluX2RhdGFfZGlyJTNEJTI0VFJBSU5fRElSJTIwJTVDJTBBJTIwJTIwLS1yZXNvbHV0aW9uJTNENTEyJTIwLS1jZW50ZXJfY3JvcCUyMC0tcmFuZG9tX2ZsaXAlMjAlNUMlMEElMjAlMjAtLXRyYWluX2JhdGNoX3NpemUlM0QxJTIwJTVDJTBBJTIwJTIwLS1taXhlZF9wcmVjaXNpb24lM0QlMjJmcDE2JTIyJTIwJTVDJTBBJTIwJTIwLS1tYXhfdHJhaW5fc3RlcHMlM0QxNTAwMCUyMCU1QyUwQSUyMCUyMC0tbGVhcm5pbmdfcmF0ZSUzRDFlLTA1JTIwJTVDJTBBJTIwJTIwLS1tYXhfZ3JhZF9ub3JtJTNEMSUyMCU1QyUwQSUyMCUyMC0tb3V0cHV0X2RpciUzRCUyMnNkLXBva2Vtb24tbW9kZWwlMjI=",highlighted:`<span class="hljs-built_in">export</span> MODEL_NAME=<span class="hljs-string">&quot;duongna/stable-diffusion-v1-4-flax&quot;</span>
<span class="hljs-built_in">export</span> TRAIN_DIR=<span class="hljs-string">&quot;path_to_your_dataset&quot;</span>

python train_text_to_image_flax.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span> \\
  --train_data_dir=<span class="hljs-variable">$TRAIN_DIR</span> \\
  --resolution=512 --center_crop --random_flip \\
  --train_batch_size=1 \\
  --mixed_precision=<span class="hljs-string">&quot;fp16&quot;</span> \\
  --max_train_steps=15000 \\
  --learning_rate=1e-05 \\
  --max_grad_norm=1 \\
  --output_dir=<span class="hljs-string">&quot;sd-pokemon-model&quot;</span>`}}),{c(){s=f("p"),u=f("a"),a=r("@duongna211"),h=r("\uC758 \uAE30\uC5EC\uB85C, Flax\uB97C \uC0AC\uC6A9\uD574 TPU \uBC0F GPU\uC5D0\uC11C Stable Diffusion \uBAA8\uB378\uC744 \uB354 \uBE60\uB974\uAC8C \uD559\uC2B5\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uB294 TPU \uD558\uB4DC\uC6E8\uC5B4\uC5D0\uC11C \uB9E4\uC6B0 \uD6A8\uC728\uC801\uC774\uC9C0\uB9CC GPU\uC5D0\uC11C\uB3C4 \uD6CC\uB96D\uD558\uAC8C \uC791\uB3D9\uD569\uB2C8\uB2E4. Flax \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB294 gradient checkpointing\uB098 gradient accumulation\uACFC \uAC19\uC740 \uAE30\uB2A5\uC744 \uC544\uC9C1 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uBA54\uBAA8\uB9AC\uAC00 30GB \uC774\uC0C1\uC778 GPU \uB610\uB294 TPU v3\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."),w=d(),b=f("p"),rt=r("\uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD558\uAE30 \uC804\uC5D0 \uC694\uAD6C \uC0AC\uD56D\uC774 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624:"),z=d(),E(A.$$.fragment),k=d(),y=f("p"),G=r("\uADF8\uB7EC\uBA74 \uB2E4\uC74C\uACFC \uAC19\uC774 "),$=f("a"),Q=r("Flax \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8"),L=r("\uB97C \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),P=d(),E(F.$$.fragment),q=d(),j=f("p"),O=r("\uC790\uCCB4 \uB370\uC774\uD130\uC14B\uC73C\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uB824\uBA74 \u{1F917} "),g=f("a"),K=r("Datasets"),Y=r("\uC5D0\uC11C \uC694\uAD6C\uD558\uB294 \uD615\uC2DD\uC5D0 \uB530\uB77C \uB370\uC774\uD130\uC14B\uC744 \uC900\uBE44\uD558\uC138\uC694. "),D=f("a"),tt=r("\uB370\uC774\uD130\uC14B\uC744 \uD5C8\uBE0C\uC5D0 \uC5C5\uB85C\uB4DC"),V=r("\uD558\uAC70\uB098 [\uD30C\uC77C\uB4E4\uC774 \uC788\uB294 \uB85C\uCEEC \uD3F4\uB354\uB97C \uC900\uBE44](https ://huggingface.co/docs/datasets/image_dataset#imagefolder)\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),H=d(),W=f("p"),et=r("\uC0AC\uC6A9\uC790 \uCEE4\uC2A4\uD140 loading logic\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC218\uC815\uD558\uC2ED\uC2DC\uC624. \uB3C4\uC6C0\uC774 \uB418\uB3C4\uB85D \uCF54\uB4DC\uC758 \uC801\uC808\uD55C \uC704\uCE58\uC5D0 \uD3EC\uC778\uD130\uB97C \uB0A8\uACBC\uC2B5\uB2C8\uB2E4. \u{1F917} \uC544\uB798 \uC608\uC81C \uC2A4\uD06C\uB9BD\uD2B8\uB294 "),B=f("code"),lt=r("TRAIN_DIR"),_=r("\uC758 \uB85C\uCEEC \uB370\uC774\uD130\uC14B\uC73C\uB85C\uB97C \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4:"),M=d(),E(N.$$.fragment),this.h()},l(p){s=m(p,"P",{});var U=c(s);u=m(U,"A",{href:!0,rel:!0});var pt=c(u);a=o(pt,"@duongna211"),pt.forEach(e),h=o(U,"\uC758 \uAE30\uC5EC\uB85C, Flax\uB97C \uC0AC\uC6A9\uD574 TPU \uBC0F GPU\uC5D0\uC11C Stable Diffusion \uBAA8\uB378\uC744 \uB354 \uBE60\uB974\uAC8C \uD559\uC2B5\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uB294 TPU \uD558\uB4DC\uC6E8\uC5B4\uC5D0\uC11C \uB9E4\uC6B0 \uD6A8\uC728\uC801\uC774\uC9C0\uB9CC GPU\uC5D0\uC11C\uB3C4 \uD6CC\uB96D\uD558\uAC8C \uC791\uB3D9\uD569\uB2C8\uB2E4. Flax \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB294 gradient checkpointing\uB098 gradient accumulation\uACFC \uAC19\uC740 \uAE30\uB2A5\uC744 \uC544\uC9C1 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uBA54\uBAA8\uB9AC\uAC00 30GB \uC774\uC0C1\uC778 GPU \uB610\uB294 TPU v3\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."),U.forEach(e),w=T(p),b=m(p,"P",{});var S=c(b);rt=o(S,"\uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD558\uAE30 \uC804\uC5D0 \uC694\uAD6C \uC0AC\uD56D\uC774 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624:"),S.forEach(e),z=T(p),I(A.$$.fragment,p),k=T(p),y=m(p,"P",{});var ot=c(y);G=o(ot,"\uADF8\uB7EC\uBA74 \uB2E4\uC74C\uACFC \uAC19\uC774 "),$=m(ot,"A",{href:!0,rel:!0});var nt=c($);Q=o(nt,"Flax \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8"),nt.forEach(e),L=o(ot,"\uB97C \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ot.forEach(e),P=T(p),I(F.$$.fragment,p),q=T(p),j=m(p,"P",{});var x=c(j);O=o(x,"\uC790\uCCB4 \uB370\uC774\uD130\uC14B\uC73C\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uB824\uBA74 \u{1F917} "),g=m(x,"A",{href:!0,rel:!0});var ut=c(g);K=o(ut,"Datasets"),ut.forEach(e),Y=o(x,"\uC5D0\uC11C \uC694\uAD6C\uD558\uB294 \uD615\uC2DD\uC5D0 \uB530\uB77C \uB370\uC774\uD130\uC14B\uC744 \uC900\uBE44\uD558\uC138\uC694. "),D=m(x,"A",{href:!0,rel:!0});var vt=c(D);tt=o(vt,"\uB370\uC774\uD130\uC14B\uC744 \uD5C8\uBE0C\uC5D0 \uC5C5\uB85C\uB4DC"),vt.forEach(e),V=o(x,"\uD558\uAC70\uB098 [\uD30C\uC77C\uB4E4\uC774 \uC788\uB294 \uB85C\uCEEC \uD3F4\uB354\uB97C \uC900\uBE44](https ://huggingface.co/docs/datasets/image_dataset#imagefolder)\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),x.forEach(e),H=T(p),W=m(p,"P",{});var ht=c(W);et=o(ht,"\uC0AC\uC6A9\uC790 \uCEE4\uC2A4\uD140 loading logic\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC218\uC815\uD558\uC2ED\uC2DC\uC624. \uB3C4\uC6C0\uC774 \uB418\uB3C4\uB85D \uCF54\uB4DC\uC758 \uC801\uC808\uD55C \uC704\uCE58\uC5D0 \uD3EC\uC778\uD130\uB97C \uB0A8\uACBC\uC2B5\uB2C8\uB2E4. \u{1F917} \uC544\uB798 \uC608\uC81C \uC2A4\uD06C\uB9BD\uD2B8\uB294 "),B=m(ht,"CODE",{});var _t=c(B);lt=o(_t,"TRAIN_DIR"),_t.forEach(e),_=o(ht,"\uC758 \uB85C\uCEEC \uB370\uC774\uD130\uC14B\uC73C\uB85C\uB97C \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4:"),ht.forEach(e),M=T(p),I(N.$$.fragment,p),this.h()},h(){J(u,"href","https://github.com/duongna21"),J(u,"rel","nofollow"),J($,"href","https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_flax.py"),J($,"rel","nofollow"),J(g,"href","https://huggingface.co/docs/datasets/index"),J(g,"rel","nofollow"),J(D,"href","https://huggingface.co/docs/datasets/image_dataset#upload-dataset-to-the-hub"),J(D,"rel","nofollow")},m(p,U){n(p,s,U),l(s,u),l(u,a),l(s,h),n(p,w,U),n(p,b,U),l(b,rt),n(p,z,U),Z(A,p,U),n(p,k,U),n(p,y,U),l(y,G),l(y,$),l($,Q),l(y,L),n(p,P,U),Z(F,p,U),n(p,q,U),n(p,j,U),l(j,O),l(j,g),l(g,K),l(j,Y),l(j,D),l(D,tt),l(j,V),n(p,H,U),n(p,W,U),l(W,et),l(W,B),l(B,lt),l(W,_),n(p,M,U),Z(N,p,U),at=!0},p:Ue,i(p){at||(R(A.$$.fragment,p),R(F.$$.fragment,p),R(N.$$.fragment,p),at=!0)},o(p){v(A.$$.fragment,p),v(F.$$.fragment,p),v(N.$$.fragment,p),at=!1},d(p){p&&e(s),p&&e(w),p&&e(b),p&&e(z),X(A,p),p&&e(k),p&&e(y),p&&e(P),X(F,p),p&&e(q),p&&e(j),p&&e(H),p&&e(W),p&&e(M),X(N,p)}}}function kl(C){let s,u;return s=new be({props:{$$slots:{default:[Nl]},$$scope:{ctx:C}}}),{c(){E(s.$$.fragment)},l(a){I(s.$$.fragment,a)},m(a,h){Z(s,a,h),u=!0},p(a,h){const w={};h&2&&(w.$$scope={dirty:h,ctx:a}),s.$set(w)},i(a){u||(R(s.$$.fragment,a),u=!0)},o(a){v(s.$$.fragment,a),u=!1},d(a){X(s,a)}}}function Vl(C){let s,u;return s=new st({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBbW9kZWxfcGF0aCUyMCUzRCUyMCUyMnBhdGhfdG9fc2F2ZWRfbW9kZWwlMjIlMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX3BhdGglMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlM0QlMjJ5b2RhJTIyKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJ5b2RhLXBva2Vtb24ucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

model_path = <span class="hljs-string">&quot;path_to_saved_model&quot;</span>
pipe = StableDiffusionPipeline.from_pretrained(model_path, torch_dtype=torch.float16)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

image = pipe(prompt=<span class="hljs-string">&quot;yoda&quot;</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;yoda-pokemon.png&quot;</span>)`}}),{c(){E(s.$$.fragment)},l(a){I(s.$$.fragment,a)},m(a,h){Z(s,a,h),u=!0},p:Ue,i(a){u||(R(s.$$.fragment,a),u=!0)},o(a){v(s.$$.fragment,a),u=!1},d(a){X(s,a)}}}function Sl(C){let s,u;return s=new be({props:{$$slots:{default:[Vl]},$$scope:{ctx:C}}}),{c(){E(s.$$.fragment)},l(a){I(s.$$.fragment,a)},m(a,h){Z(s,a,h),u=!0},p(a,h){const w={};h&2&&(w.$$scope={dirty:h,ctx:a}),s.$set(w)},i(a){u||(R(s.$$.fragment,a),u=!0)},o(a){v(s.$$.fragment,a),u=!1},d(a){X(s,a)}}}function Al(C){let s,u;return s=new st({props:{code:"aW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBZnJvbSUyMGZsYXguamF4X3V0aWxzJTIwaW1wb3J0JTIwcmVwbGljYXRlJTBBZnJvbSUyMGZsYXgudHJhaW5pbmcuY29tbW9uX3V0aWxzJTIwaW1wb3J0JTIwc2hhcmQlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRmxheFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBbW9kZWxfcGF0aCUyMCUzRCUyMCUyMnBhdGhfdG9fc2F2ZWRfbW9kZWwlMjIlMEFwaXBlJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9wYXRoJTJDJTIwZHR5cGUlM0RqYXgubnVtcHkuYmZsb2F0MTYpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyeW9kYSUyMHBva2Vtb24lMjIlMEFwcm5nX3NlZWQlMjAlM0QlMjBqYXgucmFuZG9tLlBSTkdLZXkoMCklMEFudW1faW5mZXJlbmNlX3N0ZXBzJTIwJTNEJTIwNTAlMEElMEFudW1fc2FtcGxlcyUyMCUzRCUyMGpheC5kZXZpY2VfY291bnQoKSUwQXByb21wdCUyMCUzRCUyMG51bV9zYW1wbGVzJTIwKiUyMCU1QnByb21wdCU1RCUwQXByb21wdF9pZHMlMjAlM0QlMjBwaXBlbGluZS5wcmVwYXJlX2lucHV0cyhwcm9tcHQpJTBBJTBBJTIzJTIwc2hhcmQlMjBpbnB1dHMlMjBhbmQlMjBybmclMEFwYXJhbXMlMjAlM0QlMjByZXBsaWNhdGUocGFyYW1zKSUwQXBybmdfc2VlZCUyMCUzRCUyMGpheC5yYW5kb20uc3BsaXQocHJuZ19zZWVkJTJDJTIwamF4LmRldmljZV9jb3VudCgpKSUwQXByb21wdF9pZHMlMjAlM0QlMjBzaGFyZChwcm9tcHRfaWRzKSUwQSUwQWltYWdlcyUyMCUzRCUyMHBpcGVsaW5lKHByb21wdF9pZHMlMkMlMjBwYXJhbXMlMkMlMjBwcm5nX3NlZWQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTJDJTIwaml0JTNEVHJ1ZSkuaW1hZ2VzJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUubnVtcHlfdG9fcGlsKG5wLmFzYXJyYXkoaW1hZ2VzLnJlc2hhcGUoKG51bV9zYW1wbGVzJTJDKSUyMCUyQiUyMGltYWdlcy5zaGFwZSU1Qi0zJTNBJTVEKSkpJTBBaW1hZ2Uuc2F2ZSglMjJ5b2RhLXBva2Vtb24ucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> jax
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">from</span> flax.jax_utils <span class="hljs-keyword">import</span> replicate
<span class="hljs-keyword">from</span> flax.training.common_utils <span class="hljs-keyword">import</span> shard
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxStableDiffusionPipeline

model_path = <span class="hljs-string">&quot;path_to_saved_model&quot;</span>
pipe, params = FlaxStableDiffusionPipeline.from_pretrained(model_path, dtype=jax.numpy.bfloat16)

prompt = <span class="hljs-string">&quot;yoda pokemon&quot;</span>
prng_seed = jax.random.PRNGKey(<span class="hljs-number">0</span>)
num_inference_steps = <span class="hljs-number">50</span>

num_samples = jax.device_count()
prompt = num_samples * [prompt]
prompt_ids = pipeline.prepare_inputs(prompt)

<span class="hljs-comment"># shard inputs and rng</span>
params = replicate(params)
prng_seed = jax.random.split(prng_seed, jax.device_count())
prompt_ids = shard(prompt_ids)

images = pipeline(prompt_ids, params, prng_seed, num_inference_steps, jit=<span class="hljs-literal">True</span>).images
images = pipeline.numpy_to_pil(np.asarray(images.reshape((num_samples,) + images.shape[-<span class="hljs-number">3</span>:])))
image.save(<span class="hljs-string">&quot;yoda-pokemon.png&quot;</span>)`}}),{c(){E(s.$$.fragment)},l(a){I(s.$$.fragment,a)},m(a,h){Z(s,a,h),u=!0},p:Ue,i(a){u||(R(s.$$.fragment,a),u=!0)},o(a){v(s.$$.fragment,a),u=!1},d(a){X(s,a)}}}function Yl(C){let s,u;return s=new be({props:{$$slots:{default:[Al]},$$scope:{ctx:C}}}),{c(){E(s.$$.fragment)},l(a){I(s.$$.fragment,a)},m(a,h){Z(s,a,h),u=!0},p(a,h){const w={};h&2&&(w.$$scope={dirty:h,ctx:a}),s.$set(w)},i(a){u||(R(s.$$.fragment,a),u=!0)},o(a){v(s.$$.fragment,a),u=!1},d(a){X(s,a)}}}function Ql(C){let s,u,a,h,w,b,rt,z,A,k,y,G,$,Q,L,P,F,q,j,O,g,K,Y,D,tt,V,H,W,et,B,lt,_,M,N,at,p,U,pt,S,ot,nt,x,ut,vt,ht,_t,ye,$e,St,je,ge,Xt,Ee,Ie,qt,it,Ze,Wt,Re,ve,At,Xe,We,Ot,Bt,Be,Kt,ft,Jt,Yt,bt,xe,Qt,Ge,te,xt,Fe,ee,yt,le,$t,Ce,ae,Gt,Ne,se,jt,re,Ft,ke,oe,Ct,Ve,pe,gt,ne,Et,Se,ie,dt,fe,mt,Tt,Lt,It,Ae,Dt,Ye,me,wt,Qe,Nt,Le,De,ce,Zt,ze,ue,Mt,Pe,zt,He,qe,he,Ut,_e;return b=new Oe({}),y=new xl({props:{warning:!0,$$slots:{default:[Gl]},$$scope:{ctx:C}}}),V=new st({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGZGlmZnVzZXJzLmdpdCUwQXBpcCUyMGluc3RhbGwlMjAtVSUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dA==",highlighted:`pip install git+https://github.com/huggingface/diffusers.git
pip install -U -r requirements.txt`}}),N=new st({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config"}}),bt=new Oe({}),yt=new st({props:{code:"JTIwJTIwLS1wdXNoX3RvX2h1Yg==",highlighted:"  --push_to_hub"}}),jt=new st({props:{code:"JTIwJTIwLS1jaGVja3BvaW50aW5nX3N0ZXBzJTNENTAw",highlighted:"  --checkpointing_steps=500"}}),gt=new st({props:{code:"JTIwJTIwLS1yZXN1bWVfZnJvbV9jaGVja3BvaW50JTNEJTIyY2hlY2twb2ludC0xNTAwJTIy",highlighted:'  --resume_from_checkpoint=<span class="hljs-string">&quot;checkpoint-1500&quot;</span>'}}),dt=new Zl({props:{pytorch:!0,tensorflow:!1,jax:!0,$$slots:{jax:[kl],pytorch:[Cl]},$$scope:{ctx:C}}}),It=new Oe({}),Ut=new Zl({props:{pytorch:!0,tensorflow:!1,jax:!0,$$slots:{jax:[Yl],pytorch:[Sl]},$$scope:{ctx:C}}}),{c(){s=f("meta"),u=d(),a=f("h1"),h=f("a"),w=f("span"),E(b.$$.fragment),rt=d(),z=f("span"),A=r("Text-to-image"),k=d(),E(y.$$.fragment),G=d(),$=f("p"),Q=r("Stable Diffusion\uACFC \uAC19\uC740 text-to-image \uBAA8\uB378\uC740 \uD14D\uC2A4\uD2B8 \uD504\uB86C\uD504\uD2B8\uC5D0\uC11C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4. \uC774 \uAC00\uC774\uB4DC\uB294 PyTorch \uBC0F Flax\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC790\uCCB4 \uB370\uC774\uD130\uC14B\uC5D0\uC11C "),L=f("a"),P=f("code"),F=r("CompVis/stable-diffusion-v1-4"),q=r(" \uBAA8\uB378\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. \uC774 \uAC00\uC774\uB4DC\uC5D0 \uC0AC\uC6A9\uB41C text-to-image \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD55C \uBAA8\uB4E0 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uAD00\uC2EC\uC774 \uC788\uB294 \uACBD\uC6B0 \uC774 "),j=f("a"),O=r("\uB9AC\uD3EC\uC9C0\uD1A0\uB9AC"),g=r("\uC5D0\uC11C \uC790\uC138\uD788 \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),K=d(),Y=f("p"),D=r("\uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD558\uAE30 \uC804\uC5D0, \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC758 \uD559\uC2B5 dependency\uB4E4\uC744 \uC124\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4:"),tt=d(),E(V.$$.fragment),H=d(),W=f("p"),et=r("\uADF8\uB9AC\uACE0 "),B=f("a"),lt=r("\u{1F917}Accelerate"),_=r(" \uD658\uACBD\uC744 \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4:"),M=d(),E(N.$$.fragment),at=d(),p=f("p"),U=r("\uB9AC\uD3EC\uC9C0\uD1A0\uB9AC\uB97C \uC774\uBBF8 \uBCF5\uC81C\uD55C \uACBD\uC6B0, \uC774 \uB2E8\uACC4\uB97C \uC218\uD589\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC2E0, \uB85C\uCEEC \uCCB4\uD06C\uC544\uC6C3 \uACBD\uB85C\uB97C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uBA85\uC2DC\uD560 \uC218 \uC788\uC73C\uBA70 \uAC70\uAE30\uC5D0\uC11C \uB85C\uB4DC\uB429\uB2C8\uB2E4."),pt=d(),S=f("h3"),ot=r("\uD558\uB4DC\uC6E8\uC5B4 \uC694\uAD6C \uC0AC\uD56D"),nt=d(),x=f("p"),ut=f("code"),vt=r("gradient_checkpointing"),ht=r(" \uBC0F "),_t=f("code"),ye=r("mixed_precision"),$e=r("\uC744 \uC0AC\uC6A9\uD558\uBA74 \uB2E8\uC77C 24GB GPU\uC5D0\uC11C \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB354 \uB192\uC740 "),St=f("code"),je=r("batch_size"),ge=r("\uC640 \uB354 \uBE60\uB978 \uD6C8\uB828\uC744 \uC704\uD574\uC11C\uB294 GPU \uBA54\uBAA8\uB9AC\uAC00 30GB \uC774\uC0C1\uC778 GPU\uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. TPU \uB610\uB294 GPU\uC5D0\uC11C \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD574 JAX\uB098 Flax\uB97C \uC0AC\uC6A9\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),Xt=f("a"),Ee=r("\uC544\uB798"),Ie=r("\uB97C \uCC38\uC870\uD558\uC138\uC694."),qt=d(),it=f("p"),Ze=r("xFormers\uB85C memory efficient attention\uC744 \uD65C\uC131\uD654\uD558\uC5EC \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9 \uD6E8\uC52C \uB354 \uC904\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. "),Wt=f("a"),Re=r("xFormers\uAC00 \uC124\uCE58"),ve=r("\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uACE0 "),At=f("code"),Xe=r("--enable_xformers_memory_efficient_attention"),We=r("\uB97C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uBA85\uC2DC\uD569\uB2C8\uB2E4."),Ot=d(),Bt=f("p"),Be=r("xFormers\uB294 Flax\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."),Kt=d(),ft=f("h2"),Jt=f("a"),Yt=f("span"),E(bt.$$.fragment),xe=d(),Qt=f("span"),Ge=r("Hub\uC5D0 \uBAA8\uB378 \uC5C5\uB85C\uB4DC\uD558\uAE30"),te=d(),xt=f("p"),Fe=r("\uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uCD94\uAC00\uD558\uC5EC \uBAA8\uB378\uC744 \uD5C8\uBE0C\uC5D0 \uC800\uC7A5\uD569\uB2C8\uB2E4:"),ee=d(),E(yt.$$.fragment),le=d(),$t=f("h2"),Ce=r("\uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC800\uC7A5 \uBC0F \uBD88\uB7EC\uC624\uAE30"),ae=d(),Gt=f("p"),Ne=r("\uD559\uC2B5 \uC911 \uBC1C\uC0DD\uD560 \uC218 \uC788\uB294 \uC77C\uC5D0 \uB300\uBE44\uD558\uC5EC \uC815\uAE30\uC801\uC73C\uB85C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC800\uC7A5\uD574 \uB450\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC800\uC7A5\uD558\uB824\uBA74 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uBA85\uC2DC\uD569\uB2C8\uB2E4."),se=d(),E(jt.$$.fragment),re=d(),Ft=f("p"),ke=r("500\uC2A4\uD15D\uB9C8\uB2E4 \uC804\uCCB4 \uD559\uC2B5 state\uAC00 \u2018output_dir\u2019\uC758 \uD558\uC704 \uD3F4\uB354\uC5D0 \uC800\uC7A5\uB429\uB2C8\uB2E4. \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB294 \u2018checkpoint-\u2018\uC5D0 \uC9C0\uAE08\uAE4C\uC9C0 \uD559\uC2B5\uB41C step \uC218\uC785\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4 \u2018checkpoint-1500\u2019\uC740 1500 \uD559\uC2B5 step \uD6C4\uC5D0 \uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC785\uB2C8\uB2E4."),oe=d(),Ct=f("p"),Ve=r("\uD559\uC2B5\uC744 \uC7AC\uAC1C\uD558\uAE30 \uC704\uD574 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uBD88\uB7EC\uC624\uB824\uBA74 \u2018\u2014resume_from_checkpoint\u2019 \uC778\uC218\uB97C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uBA85\uC2DC\uD558\uACE0 \uC7AC\uAC1C\uD560 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC9C0\uC815\uD558\uC2ED\uC2DC\uC624. \uC608\uB97C \uB4E4\uC5B4 \uB2E4\uC74C \uC778\uC218\uB294 1500\uAC1C\uC758 \uD559\uC2B5 step \uD6C4\uC5D0 \uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C\uBD80\uD130 \uD6C8\uB828\uC744 \uC7AC\uAC1C\uD569\uB2C8\uB2E4."),pe=d(),E(gt.$$.fragment),ne=d(),Et=f("h2"),Se=r("\uD30C\uC778\uD29C\uB2DD"),ie=d(),E(dt.$$.fragment),fe=d(),mt=f("h2"),Tt=f("a"),Lt=f("span"),E(It.$$.fragment),Ae=d(),Dt=f("span"),Ye=r("LoRA"),me=d(),wt=f("p"),Qe=r("Text-to-image \uBAA8\uB378 \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD574, \uB300\uADDC\uBAA8 \uBAA8\uB378 \uD559\uC2B5\uC744 \uAC00\uC18D\uD654\uD558\uAE30 \uC704\uD55C \uD30C\uC778\uD29C\uB2DD \uAE30\uC220\uC778 LoRA(Low-Rank Adaptation of Large Language Models)\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),Nt=f("a"),Le=r("LoRA \uD559\uC2B5"),De=r(" \uAC00\uC774\uB4DC\uB97C \uCC38\uC870\uD558\uC138\uC694."),ce=d(),Zt=f("h2"),ze=r("\uCD94\uB860"),ue=d(),Mt=f("p"),Pe=r("\uD5C8\uBE0C\uC758 \uBAA8\uB378 \uACBD\uB85C \uB610\uB294 \uBAA8\uB378 \uC774\uB984\uC744 "),zt=f("code"),He=r("StableDiffusionPipeline"),qe=r("\uC5D0 \uC804\uB2EC\uD558\uC5EC \uCD94\uB860\uC744 \uC704\uD574 \uD30C\uC778 \uD29C\uB2DD\uB41C \uBAA8\uB378\uC744 \uBD88\uB7EC\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),he=d(),E(Ut.$$.fragment),this.h()},l(t){const i=Wl('[data-svelte="svelte-1phssyn"]',document.head);s=m(i,"META",{name:!0,content:!0}),i.forEach(e),u=T(t),a=m(t,"H1",{class:!0});var Rt=c(a);h=m(Rt,"A",{id:!0,class:!0,href:!0});var Pt=c(h);w=m(Pt,"SPAN",{});var Ht=c(w);I(b.$$.fragment,Ht),Ht.forEach(e),Pt.forEach(e),rt=T(Rt),z=m(Rt,"SPAN",{});var Ke=c(z);A=o(Ke,"Text-to-image"),Ke.forEach(e),Rt.forEach(e),k=T(t),I(y.$$.fragment,t),G=T(t),$=m(t,"P",{});var kt=c($);Q=o(kt,"Stable Diffusion\uACFC \uAC19\uC740 text-to-image \uBAA8\uB378\uC740 \uD14D\uC2A4\uD2B8 \uD504\uB86C\uD504\uD2B8\uC5D0\uC11C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4. \uC774 \uAC00\uC774\uB4DC\uB294 PyTorch \uBC0F Flax\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC790\uCCB4 \uB370\uC774\uD130\uC14B\uC5D0\uC11C "),L=m(kt,"A",{href:!0,rel:!0});var tl=c(L);P=m(tl,"CODE",{});var el=c(P);F=o(el,"CompVis/stable-diffusion-v1-4"),el.forEach(e),tl.forEach(e),q=o(kt," \uBAA8\uB378\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. \uC774 \uAC00\uC774\uB4DC\uC5D0 \uC0AC\uC6A9\uB41C text-to-image \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD55C \uBAA8\uB4E0 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uAD00\uC2EC\uC774 \uC788\uB294 \uACBD\uC6B0 \uC774 "),j=m(kt,"A",{href:!0,rel:!0});var ll=c(j);O=o(ll,"\uB9AC\uD3EC\uC9C0\uD1A0\uB9AC"),ll.forEach(e),g=o(kt,"\uC5D0\uC11C \uC790\uC138\uD788 \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),kt.forEach(e),K=T(t),Y=m(t,"P",{});var al=c(Y);D=o(al,"\uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD558\uAE30 \uC804\uC5D0, \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC758 \uD559\uC2B5 dependency\uB4E4\uC744 \uC124\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4:"),al.forEach(e),tt=T(t),I(V.$$.fragment,t),H=T(t),W=m(t,"P",{});var Je=c(W);et=o(Je,"\uADF8\uB9AC\uACE0 "),B=m(Je,"A",{href:!0,rel:!0});var sl=c(B);lt=o(sl,"\u{1F917}Accelerate"),sl.forEach(e),_=o(Je," \uD658\uACBD\uC744 \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4:"),Je.forEach(e),M=T(t),I(N.$$.fragment,t),at=T(t),p=m(t,"P",{});var rl=c(p);U=o(rl,"\uB9AC\uD3EC\uC9C0\uD1A0\uB9AC\uB97C \uC774\uBBF8 \uBCF5\uC81C\uD55C \uACBD\uC6B0, \uC774 \uB2E8\uACC4\uB97C \uC218\uD589\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC2E0, \uB85C\uCEEC \uCCB4\uD06C\uC544\uC6C3 \uACBD\uB85C\uB97C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uBA85\uC2DC\uD560 \uC218 \uC788\uC73C\uBA70 \uAC70\uAE30\uC5D0\uC11C \uB85C\uB4DC\uB429\uB2C8\uB2E4."),rl.forEach(e),pt=T(t),S=m(t,"H3",{id:!0});var ol=c(S);ot=o(ol,"\uD558\uB4DC\uC6E8\uC5B4 \uC694\uAD6C \uC0AC\uD56D"),ol.forEach(e),nt=T(t),x=m(t,"P",{});var ct=c(x);ut=m(ct,"CODE",{});var pl=c(ut);vt=o(pl,"gradient_checkpointing"),pl.forEach(e),ht=o(ct," \uBC0F "),_t=m(ct,"CODE",{});var nl=c(_t);ye=o(nl,"mixed_precision"),nl.forEach(e),$e=o(ct,"\uC744 \uC0AC\uC6A9\uD558\uBA74 \uB2E8\uC77C 24GB GPU\uC5D0\uC11C \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB354 \uB192\uC740 "),St=m(ct,"CODE",{});var il=c(St);je=o(il,"batch_size"),il.forEach(e),ge=o(ct,"\uC640 \uB354 \uBE60\uB978 \uD6C8\uB828\uC744 \uC704\uD574\uC11C\uB294 GPU \uBA54\uBAA8\uB9AC\uAC00 30GB \uC774\uC0C1\uC778 GPU\uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. TPU \uB610\uB294 GPU\uC5D0\uC11C \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD574 JAX\uB098 Flax\uB97C \uC0AC\uC6A9\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),Xt=m(ct,"A",{href:!0});var fl=c(Xt);Ee=o(fl,"\uC544\uB798"),fl.forEach(e),Ie=o(ct,"\uB97C \uCC38\uC870\uD558\uC138\uC694."),ct.forEach(e),qt=T(t),it=m(t,"P",{});var Vt=c(it);Ze=o(Vt,"xFormers\uB85C memory efficient attention\uC744 \uD65C\uC131\uD654\uD558\uC5EC \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9 \uD6E8\uC52C \uB354 \uC904\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. "),Wt=m(Vt,"A",{href:!0});var ml=c(Wt);Re=o(ml,"xFormers\uAC00 \uC124\uCE58"),ml.forEach(e),ve=o(Vt,"\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uACE0 "),At=m(Vt,"CODE",{});var cl=c(At);Xe=o(cl,"--enable_xformers_memory_efficient_attention"),cl.forEach(e),We=o(Vt,"\uB97C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uBA85\uC2DC\uD569\uB2C8\uB2E4."),Vt.forEach(e),Ot=T(t),Bt=m(t,"P",{});var ul=c(Bt);Be=o(ul,"xFormers\uB294 Flax\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."),ul.forEach(e),Kt=T(t),ft=m(t,"H2",{class:!0});var de=c(ft);Jt=m(de,"A",{id:!0,class:!0,href:!0});var hl=c(Jt);Yt=m(hl,"SPAN",{});var _l=c(Yt);I(bt.$$.fragment,_l),_l.forEach(e),hl.forEach(e),xe=T(de),Qt=m(de,"SPAN",{});var Jl=c(Qt);Ge=o(Jl,"Hub\uC5D0 \uBAA8\uB378 \uC5C5\uB85C\uB4DC\uD558\uAE30"),Jl.forEach(e),de.forEach(e),te=T(t),xt=m(t,"P",{});var dl=c(xt);Fe=o(dl,"\uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uCD94\uAC00\uD558\uC5EC \uBAA8\uB378\uC744 \uD5C8\uBE0C\uC5D0 \uC800\uC7A5\uD569\uB2C8\uB2E4:"),dl.forEach(e),ee=T(t),I(yt.$$.fragment,t),le=T(t),$t=m(t,"H2",{id:!0});var Tl=c($t);Ce=o(Tl,"\uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC800\uC7A5 \uBC0F \uBD88\uB7EC\uC624\uAE30"),Tl.forEach(e),ae=T(t),Gt=m(t,"P",{});var wl=c(Gt);Ne=o(wl,"\uD559\uC2B5 \uC911 \uBC1C\uC0DD\uD560 \uC218 \uC788\uB294 \uC77C\uC5D0 \uB300\uBE44\uD558\uC5EC \uC815\uAE30\uC801\uC73C\uB85C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC800\uC7A5\uD574 \uB450\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC800\uC7A5\uD558\uB824\uBA74 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uBA85\uC2DC\uD569\uB2C8\uB2E4."),wl.forEach(e),se=T(t),I(jt.$$.fragment,t),re=T(t),Ft=m(t,"P",{});var Ml=c(Ft);ke=o(Ml,"500\uC2A4\uD15D\uB9C8\uB2E4 \uC804\uCCB4 \uD559\uC2B5 state\uAC00 \u2018output_dir\u2019\uC758 \uD558\uC704 \uD3F4\uB354\uC5D0 \uC800\uC7A5\uB429\uB2C8\uB2E4. \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB294 \u2018checkpoint-\u2018\uC5D0 \uC9C0\uAE08\uAE4C\uC9C0 \uD559\uC2B5\uB41C step \uC218\uC785\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4 \u2018checkpoint-1500\u2019\uC740 1500 \uD559\uC2B5 step \uD6C4\uC5D0 \uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC785\uB2C8\uB2E4."),Ml.forEach(e),oe=T(t),Ct=m(t,"P",{});var Ul=c(Ct);Ve=o(Ul,"\uD559\uC2B5\uC744 \uC7AC\uAC1C\uD558\uAE30 \uC704\uD574 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uBD88\uB7EC\uC624\uB824\uBA74 \u2018\u2014resume_from_checkpoint\u2019 \uC778\uC218\uB97C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uBA85\uC2DC\uD558\uACE0 \uC7AC\uAC1C\uD560 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC9C0\uC815\uD558\uC2ED\uC2DC\uC624. \uC608\uB97C \uB4E4\uC5B4 \uB2E4\uC74C \uC778\uC218\uB294 1500\uAC1C\uC758 \uD559\uC2B5 step \uD6C4\uC5D0 \uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C\uBD80\uD130 \uD6C8\uB828\uC744 \uC7AC\uAC1C\uD569\uB2C8\uB2E4."),Ul.forEach(e),pe=T(t),I(gt.$$.fragment,t),ne=T(t),Et=m(t,"H2",{id:!0});var bl=c(Et);Se=o(bl,"\uD30C\uC778\uD29C\uB2DD"),bl.forEach(e),ie=T(t),I(dt.$$.fragment,t),fe=T(t),mt=m(t,"H2",{class:!0});var Te=c(mt);Tt=m(Te,"A",{id:!0,class:!0,href:!0});var yl=c(Tt);Lt=m(yl,"SPAN",{});var $l=c(Lt);I(It.$$.fragment,$l),$l.forEach(e),yl.forEach(e),Ae=T(Te),Dt=m(Te,"SPAN",{});var jl=c(Dt);Ye=o(jl,"LoRA"),jl.forEach(e),Te.forEach(e),me=T(t),wt=m(t,"P",{});var we=c(wt);Qe=o(we,"Text-to-image \uBAA8\uB378 \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD574, \uB300\uADDC\uBAA8 \uBAA8\uB378 \uD559\uC2B5\uC744 \uAC00\uC18D\uD654\uD558\uAE30 \uC704\uD55C \uD30C\uC778\uD29C\uB2DD \uAE30\uC220\uC778 LoRA(Low-Rank Adaptation of Large Language Models)\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),Nt=m(we,"A",{href:!0});var gl=c(Nt);Le=o(gl,"LoRA \uD559\uC2B5"),gl.forEach(e),De=o(we," \uAC00\uC774\uB4DC\uB97C \uCC38\uC870\uD558\uC138\uC694."),we.forEach(e),ce=T(t),Zt=m(t,"H2",{id:!0});var El=c(Zt);ze=o(El,"\uCD94\uB860"),El.forEach(e),ue=T(t),Mt=m(t,"P",{});var Me=c(Mt);Pe=o(Me,"\uD5C8\uBE0C\uC758 \uBAA8\uB378 \uACBD\uB85C \uB610\uB294 \uBAA8\uB378 \uC774\uB984\uC744 "),zt=m(Me,"CODE",{});var Il=c(zt);He=o(Il,"StableDiffusionPipeline"),Il.forEach(e),qe=o(Me,"\uC5D0 \uC804\uB2EC\uD558\uC5EC \uCD94\uB860\uC744 \uC704\uD574 \uD30C\uC778 \uD29C\uB2DD\uB41C \uBAA8\uB378\uC744 \uBD88\uB7EC\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Me.forEach(e),he=T(t),I(Ut.$$.fragment,t),this.h()},h(){J(s,"name","hf:doc:metadata"),J(s,"content",JSON.stringify(Ll)),J(h,"id","texttoimage"),J(h,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(h,"href","#texttoimage"),J(a,"class","relative group"),J(L,"href","https://huggingface.co/CompVis/stable-diffusion-v1-4"),J(L,"rel","nofollow"),J(j,"href","https://github.com/huggingface/diffusers/tree/main/examples/text_to_image"),J(j,"rel","nofollow"),J(B,"href","https://github.com/huggingface/accelerate/"),J(B,"rel","nofollow"),J(S,"id",""),J(Xt,"href","#flax-jax-finetuning"),J(Wt,"href","./optimization/xformers"),J(Jt,"id","hub"),J(Jt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(Jt,"href","#hub"),J(ft,"class","relative group"),J($t,"id",""),J(Et,"id",""),J(Tt,"id","lora"),J(Tt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(Tt,"href","#lora"),J(mt,"class","relative group"),J(Nt,"href","lora#text-to-image"),J(Zt,"id","")},m(t,i){l(document.head,s),n(t,u,i),n(t,a,i),l(a,h),l(h,w),Z(b,w,null),l(a,rt),l(a,z),l(z,A),n(t,k,i),Z(y,t,i),n(t,G,i),n(t,$,i),l($,Q),l($,L),l(L,P),l(P,F),l($,q),l($,j),l(j,O),l($,g),n(t,K,i),n(t,Y,i),l(Y,D),n(t,tt,i),Z(V,t,i),n(t,H,i),n(t,W,i),l(W,et),l(W,B),l(B,lt),l(W,_),n(t,M,i),Z(N,t,i),n(t,at,i),n(t,p,i),l(p,U),n(t,pt,i),n(t,S,i),l(S,ot),n(t,nt,i),n(t,x,i),l(x,ut),l(ut,vt),l(x,ht),l(x,_t),l(_t,ye),l(x,$e),l(x,St),l(St,je),l(x,ge),l(x,Xt),l(Xt,Ee),l(x,Ie),n(t,qt,i),n(t,it,i),l(it,Ze),l(it,Wt),l(Wt,Re),l(it,ve),l(it,At),l(At,Xe),l(it,We),n(t,Ot,i),n(t,Bt,i),l(Bt,Be),n(t,Kt,i),n(t,ft,i),l(ft,Jt),l(Jt,Yt),Z(bt,Yt,null),l(ft,xe),l(ft,Qt),l(Qt,Ge),n(t,te,i),n(t,xt,i),l(xt,Fe),n(t,ee,i),Z(yt,t,i),n(t,le,i),n(t,$t,i),l($t,Ce),n(t,ae,i),n(t,Gt,i),l(Gt,Ne),n(t,se,i),Z(jt,t,i),n(t,re,i),n(t,Ft,i),l(Ft,ke),n(t,oe,i),n(t,Ct,i),l(Ct,Ve),n(t,pe,i),Z(gt,t,i),n(t,ne,i),n(t,Et,i),l(Et,Se),n(t,ie,i),Z(dt,t,i),n(t,fe,i),n(t,mt,i),l(mt,Tt),l(Tt,Lt),Z(It,Lt,null),l(mt,Ae),l(mt,Dt),l(Dt,Ye),n(t,me,i),n(t,wt,i),l(wt,Qe),l(wt,Nt),l(Nt,Le),l(wt,De),n(t,ce,i),n(t,Zt,i),l(Zt,ze),n(t,ue,i),n(t,Mt,i),l(Mt,Pe),l(Mt,zt),l(zt,He),l(Mt,qe),n(t,he,i),Z(Ut,t,i),_e=!0},p(t,[i]){const Rt={};i&2&&(Rt.$$scope={dirty:i,ctx:t}),y.$set(Rt);const Pt={};i&2&&(Pt.$$scope={dirty:i,ctx:t}),dt.$set(Pt);const Ht={};i&2&&(Ht.$$scope={dirty:i,ctx:t}),Ut.$set(Ht)},i(t){_e||(R(b.$$.fragment,t),R(y.$$.fragment,t),R(V.$$.fragment,t),R(N.$$.fragment,t),R(bt.$$.fragment,t),R(yt.$$.fragment,t),R(jt.$$.fragment,t),R(gt.$$.fragment,t),R(dt.$$.fragment,t),R(It.$$.fragment,t),R(Ut.$$.fragment,t),_e=!0)},o(t){v(b.$$.fragment,t),v(y.$$.fragment,t),v(V.$$.fragment,t),v(N.$$.fragment,t),v(bt.$$.fragment,t),v(yt.$$.fragment,t),v(jt.$$.fragment,t),v(gt.$$.fragment,t),v(dt.$$.fragment,t),v(It.$$.fragment,t),v(Ut.$$.fragment,t),_e=!1},d(t){e(s),t&&e(u),t&&e(a),X(b),t&&e(k),X(y,t),t&&e(G),t&&e($),t&&e(K),t&&e(Y),t&&e(tt),X(V,t),t&&e(H),t&&e(W),t&&e(M),X(N,t),t&&e(at),t&&e(p),t&&e(pt),t&&e(S),t&&e(nt),t&&e(x),t&&e(qt),t&&e(it),t&&e(Ot),t&&e(Bt),t&&e(Kt),t&&e(ft),X(bt),t&&e(te),t&&e(xt),t&&e(ee),X(yt,t),t&&e(le),t&&e($t),t&&e(ae),t&&e(Gt),t&&e(se),X(jt,t),t&&e(re),t&&e(Ft),t&&e(oe),t&&e(Ct),t&&e(pe),X(gt,t),t&&e(ne),t&&e(Et),t&&e(ie),X(dt,t),t&&e(fe),t&&e(mt),X(It),t&&e(me),t&&e(wt),t&&e(ce),t&&e(Zt),t&&e(ue),t&&e(Mt),t&&e(he),X(Ut,t)}}}const Ll={local:"texttoimage",sections:[{local:null,sections:[{local:"",title:"\uD558\uB4DC\uC6E8\uC5B4 \uC694\uAD6C \uC0AC\uD56D"}],title:null},{local:"hub",title:"Hub\uC5D0 \uBAA8\uB378 \uC5C5\uB85C\uB4DC\uD558\uAE30"},{local:"",title:"\uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC800\uC7A5 \uBC0F \uBD88\uB7EC\uC624\uAE30"},{local:"",title:"\uD30C\uC778\uD29C\uB2DD"},{local:"lora",title:"LoRA"},{local:"",title:"\uCD94\uB860"}],title:"Text-to-image"};function Dl(C){return Bl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kl extends Rl{constructor(s){super();vl(this,s,Dl,Ql,Xl,{})}}export{Kl as default,Ll as metadata};
