import{S as Bn,i as Gn,s as Xn,e as p,k as M,w as y,t as r,M as Sn,c as n,d as t,m as c,a as U,x as T,h as o,b as h,N as Zn,G as e,g as i,y as d,q as _,o as b,B as w,v as Fn,L as Ht}from"../../chunks/vendor-hf-doc-builder.js";import{T as vn}from"../../chunks/Tip-hf-doc-builder.js";import{I as ol}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as j}from"../../chunks/CodeBlock-hf-doc-builder.js";import{F as Po,M as qt}from"../../chunks/Markdown-hf-doc-builder.js";function Wn(V){let f,J,a,m,E;return{c(){f=p("p"),J=r("DreamBooth \uD30C\uC778\uD29C\uB2DD\uC740 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uC5D0 \uB9E4\uC6B0 \uBBFC\uAC10\uD558\uACE0 \uACFC\uC801\uD569\uB418\uAE30 \uC27D\uC2B5\uB2C8\uB2E4. \uC801\uC808\uD55C \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC120\uD0DD\uD558\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB418\uB3C4\uB85D \uB2E4\uC591\uD55C \uAD8C\uC7A5 \uC124\uC815\uC774 \uD3EC\uD568\uB41C "),a=p("a"),m=r("\uC2EC\uCE35 \uBD84\uC11D"),E=r("\uC744 \uC0B4\uD3B4\uBCF4\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4."),this.h()},l(I){f=n(I,"P",{});var Q=U(f);J=o(Q,"DreamBooth \uD30C\uC778\uD29C\uB2DD\uC740 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uC5D0 \uB9E4\uC6B0 \uBBFC\uAC10\uD558\uACE0 \uACFC\uC801\uD569\uB418\uAE30 \uC27D\uC2B5\uB2C8\uB2E4. \uC801\uC808\uD55C \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC120\uD0DD\uD558\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB418\uB3C4\uB85D \uB2E4\uC591\uD55C \uAD8C\uC7A5 \uC124\uC815\uC774 \uD3EC\uD568\uB41C "),a=n(Q,"A",{href:!0,rel:!0});var B=U(a);m=o(B,"\uC2EC\uCE35 \uBD84\uC11D"),B.forEach(t),E=o(Q,"\uC744 \uC0B4\uD3B4\uBCF4\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4."),Q.forEach(t),this.h()},h(){h(a,"href","https://huggingface.co/blog/dreambooth"),h(a,"rel","nofollow")},m(I,Q){i(I,f,Q),e(f,J),e(f,a),e(a,m),e(f,E)},d(I){I&&t(f)}}}function An(V){let f,J,a,m,E,I,Q,B,X,G,N,v,F,W,S,Z,u,$;return X=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBJTlNUQU5DRV9ESVIlM0QlMjJwYXRoX3RvX3RyYWluaW5nX2ltYWdlcyUyMiUwQWV4cG9ydCUyME9VVFBVVF9ESVIlM0QlMjJwYXRoX3RvX3NhdmVkX21vZGVsJTIy",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> INSTANCE_DIR=<span class="hljs-string">&quot;path_to_training_images&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path_to_saved_model&quot;</span>`}}),u=new j({props:{code:"YWNjZWxlcmF0ZSUyMGxhdW5jaCUyMHRyYWluX2RyZWFtYm9vdGgucHklMjAlNUMlMEElMjAlMjAtLXByZXRyYWluZWRfbW9kZWxfbmFtZV9vcl9wYXRoJTNEJTI0TU9ERUxfTkFNRSUyMCUyMCU1QyUwQSUyMCUyMC0taW5zdGFuY2VfZGF0YV9kaXIlM0QlMjRJTlNUQU5DRV9ESVIlMjAlNUMlMEElMjAlMjAtLW91dHB1dF9kaXIlM0QlMjRPVVRQVVRfRElSJTIwJTVDJTBBJTIwJTIwLS1pbnN0YW5jZV9wcm9tcHQlM0QlMjJhJTIwcGhvdG8lMjBvZiUyMHNrcyUyMGRvZyUyMiUyMCU1QyUwQSUyMCUyMC0tcmVzb2x1dGlvbiUzRDUxMiUyMCU1QyUwQSUyMCUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUzRDElMjAlNUMlMEElMjAlMjAtLWdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUzRDElMjAlNUMlMEElMjAlMjAtLWxlYXJuaW5nX3JhdGUlM0Q1ZS02JTIwJTVDJTBBJTIwJTIwLS1scl9zY2hlZHVsZXIlM0QlMjJjb25zdGFudCUyMiUyMCU1QyUwQSUyMCUyMC0tbHJfd2FybXVwX3N0ZXBzJTNEMCUyMCU1QyUwQSUyMCUyMC0tbWF4X3RyYWluX3N0ZXBzJTNENDAw",highlighted:`accelerate launch train_dreambooth.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --gradient_accumulation_steps=1 \\
  --learning_rate=5e-6 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> \\
  --lr_warmup_steps=0 \\
  --max_train_steps=400`}}),{c(){f=p("p"),J=p("a"),a=r("\uBA87 \uC7A5\uC758 \uAC15\uC544\uC9C0 \uC774\uBBF8\uC9C0\uB4E4"),m=r(`\uB85C DreamBooth\uB97C \uC2DC\uB3C4\uD574\uBD05\uC2DC\uB2E4.
\uC774\uB97C \uB2E4\uC6B4\uB85C\uB4DC\uD574 \uB514\uB809\uD130\uB9AC\uC5D0 \uC800\uC7A5\uD55C \uB2E4\uC74C `),E=p("code"),I=r("INSTANCE_DIR"),Q=r(" \uD658\uACBD \uBCC0\uC218\uB97C \uD574\uB2F9 \uACBD\uB85C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4:"),B=M(),y(X.$$.fragment),G=M(),N=p("p"),v=r("\uADF8\uB7F0 \uB2E4\uC74C, \uB2E4\uC74C \uBA85\uB839\uC744 \uC0AC\uC6A9\uD558\uC5EC \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4 (\uC804\uCCB4 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB294 "),F=p("a"),W=r("\uC5EC\uAE30"),S=r("\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4):"),Z=M(),y(u.$$.fragment),this.h()},l(R){f=n(R,"P",{});var C=U(f);J=n(C,"A",{href:!0,rel:!0});var H=U(J);a=o(H,"\uBA87 \uC7A5\uC758 \uAC15\uC544\uC9C0 \uC774\uBBF8\uC9C0\uB4E4"),H.forEach(t),m=o(C,`\uB85C DreamBooth\uB97C \uC2DC\uB3C4\uD574\uBD05\uC2DC\uB2E4.
\uC774\uB97C \uB2E4\uC6B4\uB85C\uB4DC\uD574 \uB514\uB809\uD130\uB9AC\uC5D0 \uC800\uC7A5\uD55C \uB2E4\uC74C `),E=n(C,"CODE",{});var q=U(E);I=o(q,"INSTANCE_DIR"),q.forEach(t),Q=o(C," \uD658\uACBD \uBCC0\uC218\uB97C \uD574\uB2F9 \uACBD\uB85C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4:"),C.forEach(t),B=c(R),T(X.$$.fragment,R),G=c(R),N=n(R,"P",{});var pl=U(N);v=o(pl,"\uADF8\uB7F0 \uB2E4\uC74C, \uB2E4\uC74C \uBA85\uB839\uC744 \uC0AC\uC6A9\uD558\uC5EC \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4 (\uC804\uCCB4 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB294 "),F=n(pl,"A",{href:!0,rel:!0});var Sl=U(F);W=o(Sl,"\uC5EC\uAE30"),Sl.forEach(t),S=o(pl,"\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4):"),pl.forEach(t),Z=c(R),T(u.$$.fragment,R),this.h()},h(){h(J,"href","https://drive.google.com/drive/folders/1BO_dyz-p65qhBRRMRA4TbZ8qW4rB99JZ"),h(J,"rel","nofollow"),h(F,"href","https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth.py"),h(F,"rel","nofollow")},m(R,C){i(R,f,C),e(f,J),e(J,a),e(f,m),e(f,E),e(E,I),e(f,Q),i(R,B,C),d(X,R,C),i(R,G,C),i(R,N,C),e(N,v),e(N,F),e(F,W),e(N,S),i(R,Z,C),d(u,R,C),$=!0},p:Ht,i(R){$||(_(X.$$.fragment,R),_(u.$$.fragment,R),$=!0)},o(R){b(X.$$.fragment,R),b(u.$$.fragment,R),$=!1},d(R){R&&t(f),R&&t(B),w(X,R),R&&t(G),R&&t(N),R&&t(Z),w(u,R)}}}function Dn(V){let f,J;return f=new qt({props:{$$slots:{default:[An]},$$scope:{ctx:V}}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p(a,m){const E={};m&2&&(E.$$scope={dirty:m,ctx:a}),f.$set(E)},i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function gn(V){let f,J,a,m,E,I,Q,B,X,G,N,v,F,W,S,Z;return G=new j({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwLXIlMjByZXF1aXJlbWVudHMudHh0",highlighted:"pip install -U -r requirements.txt"}}),S=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMmR1b25nbmElMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQtZmxheCUyMiUwQWV4cG9ydCUyMElOU1RBTkNFX0RJUiUzRCUyMnBhdGgtdG8taW5zdGFuY2UtaW1hZ2VzJTIyJTBBZXhwb3J0JTIwT1VUUFVUX0RJUiUzRCUyMnBhdGgtdG8tc2F2ZS1tb2RlbCUyMiUwQSUwQXB5dGhvbiUyMHRyYWluX2RyZWFtYm9vdGhfZmxheC5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTIwJTVDJTBBJTIwJTIwLS1pbnN0YW5jZV9kYXRhX2RpciUzRCUyNElOU1RBTkNFX0RJUiUyMCU1QyUwQSUyMCUyMC0tb3V0cHV0X2RpciUzRCUyNE9VVFBVVF9ESVIlMjAlNUMlMEElMjAlMjAtLWluc3RhbmNlX3Byb21wdCUzRCUyMmElMjBwaG90byUyMG9mJTIwc2tzJTIwZG9nJTIyJTIwJTVDJTBBJTIwJTIwLS1yZXNvbHV0aW9uJTNENTEyJTIwJTVDJTBBJTIwJTIwLS10cmFpbl9iYXRjaF9zaXplJTNEMSUyMCU1QyUwQSUyMCUyMC0tbGVhcm5pbmdfcmF0ZSUzRDVlLTYlMjAlNUMlMEElMjAlMjAtLW1heF90cmFpbl9zdGVwcyUzRDQwMA==",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> INSTANCE_DIR=<span class="hljs-string">&quot;path-to-instance-images&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path-to-save-model&quot;</span>

python train_dreambooth_flax.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --learning_rate=5e-6 \\
  --max_train_steps=400`}}),{c(){f=p("p"),J=r("TPU\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC788\uAC70\uB098 \uB354 \uBE60\uB974\uAC8C \uD6C8\uB828\uD558\uACE0 \uC2F6\uB2E4\uBA74 "),a=p("a"),m=r("Flax \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8"),E=r("\uB97C \uC0AC\uC6A9\uD574 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4. Flax \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB294 gradient checkpointing \uB610\uB294 gradient accumulation\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC73C\uBBC0\uB85C, \uBA54\uBAA8\uB9AC\uAC00 30GB \uC774\uC0C1\uC778 GPU\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."),I=M(),Q=p("p"),B=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."),X=M(),y(G.$$.fragment),N=M(),v=p("p"),F=r("\uADF8\uB7EC\uBA74 \uB2E4\uC74C \uBA85\uB839\uC5B4\uB85C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uC2DC\uD0AC \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),W=M(),y(S.$$.fragment),this.h()},l(u){f=n(u,"P",{});var $=U(f);J=o($,"TPU\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC788\uAC70\uB098 \uB354 \uBE60\uB974\uAC8C \uD6C8\uB828\uD558\uACE0 \uC2F6\uB2E4\uBA74 "),a=n($,"A",{href:!0,rel:!0});var R=U(a);m=o(R,"Flax \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8"),R.forEach(t),E=o($,"\uB97C \uC0AC\uC6A9\uD574 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4. Flax \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB294 gradient checkpointing \uB610\uB294 gradient accumulation\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC73C\uBBC0\uB85C, \uBA54\uBAA8\uB9AC\uAC00 30GB \uC774\uC0C1\uC778 GPU\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."),$.forEach(t),I=c(u),Q=n(u,"P",{});var C=U(Q);B=o(C,"\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."),C.forEach(t),X=c(u),T(G.$$.fragment,u),N=c(u),v=n(u,"P",{});var H=U(v);F=o(H,"\uADF8\uB7EC\uBA74 \uB2E4\uC74C \uBA85\uB839\uC5B4\uB85C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uC2DC\uD0AC \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),H.forEach(t),W=c(u),T(S.$$.fragment,u),this.h()},h(){h(a,"href","https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_flax.py"),h(a,"rel","nofollow")},m(u,$){i(u,f,$),e(f,J),e(f,a),e(a,m),e(f,E),i(u,I,$),i(u,Q,$),e(Q,B),i(u,X,$),d(G,u,$),i(u,N,$),i(u,v,$),e(v,F),i(u,W,$),d(S,u,$),Z=!0},p:Ht,i(u){Z||(_(G.$$.fragment,u),_(S.$$.fragment,u),Z=!0)},o(u){b(G.$$.fragment,u),b(S.$$.fragment,u),Z=!1},d(u){u&&t(f),u&&t(I),u&&t(Q),u&&t(X),w(G,u),u&&t(N),u&&t(v),u&&t(W),w(S,u)}}}function kn(V){let f,J;return f=new qt({props:{$$slots:{default:[gn]},$$scope:{ctx:V}}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p(a,m){const E={};m&2&&(E.$$scope={dirty:m,ctx:a}),f.$set(E)},i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function Yn(V){let f,J;return f=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBJTlNUQU5DRV9ESVIlM0QlMjJwYXRoX3RvX3RyYWluaW5nX2ltYWdlcyUyMiUwQWV4cG9ydCUyMENMQVNTX0RJUiUzRCUyMnBhdGhfdG9fY2xhc3NfaW1hZ2VzJTIyJTBBZXhwb3J0JTIwT1VUUFVUX0RJUiUzRCUyMnBhdGhfdG9fc2F2ZWRfbW9kZWwlMjIlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwdHJhaW5fZHJlYW1ib290aC5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTIwJTVDJTBBJTIwJTIwLS1pbnN0YW5jZV9kYXRhX2RpciUzRCUyNElOU1RBTkNFX0RJUiUyMCU1QyUwQSUyMCUyMC0tY2xhc3NfZGF0YV9kaXIlM0QlMjRDTEFTU19ESVIlMjAlNUMlMEElMjAlMjAtLW91dHB1dF9kaXIlM0QlMjRPVVRQVVRfRElSJTIwJTVDJTBBJTIwJTIwLS13aXRoX3ByaW9yX3ByZXNlcnZhdGlvbiUyMC0tcHJpb3JfbG9zc193ZWlnaHQlM0QxLjAlMjAlNUMlMEElMjAlMjAtLWluc3RhbmNlX3Byb21wdCUzRCUyMmElMjBwaG90byUyMG9mJTIwc2tzJTIwZG9nJTIyJTIwJTVDJTBBJTIwJTIwLS1jbGFzc19wcm9tcHQlM0QlMjJhJTIwcGhvdG8lMjBvZiUyMGRvZyUyMiUyMCU1QyUwQSUyMCUyMC0tcmVzb2x1dGlvbiUzRDUxMiUyMCU1QyUwQSUyMCUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUzRDElMjAlNUMlMEElMjAlMjAtLWdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUzRDElMjAlNUMlMEElMjAlMjAtLWxlYXJuaW5nX3JhdGUlM0Q1ZS02JTIwJTVDJTBBJTIwJTIwLS1scl9zY2hlZHVsZXIlM0QlMjJjb25zdGFudCUyMiUyMCU1QyUwQSUyMCUyMC0tbHJfd2FybXVwX3N0ZXBzJTNEMCUyMCU1QyUwQSUyMCUyMC0tbnVtX2NsYXNzX2ltYWdlcyUzRDIwMCUyMCU1QyUwQSUyMCUyMC0tbWF4X3RyYWluX3N0ZXBzJTNEODAw",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> INSTANCE_DIR=<span class="hljs-string">&quot;path_to_training_images&quot;</span>
<span class="hljs-built_in">export</span> CLASS_DIR=<span class="hljs-string">&quot;path_to_class_images&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path_to_saved_model&quot;</span>

accelerate launch train_dreambooth.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --class_data_dir=<span class="hljs-variable">$CLASS_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --with_prior_preservation --prior_loss_weight=1.0 \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --class_prompt=<span class="hljs-string">&quot;a photo of dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --gradient_accumulation_steps=1 \\
  --learning_rate=5e-6 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> \\
  --lr_warmup_steps=0 \\
  --num_class_images=200 \\
  --max_train_steps=800`}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p:Ht,i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function xn(V){let f,J;return f=new qt({props:{$$slots:{default:[Yn]},$$scope:{ctx:V}}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p(a,m){const E={};m&2&&(E.$$scope={dirty:m,ctx:a}),f.$set(E)},i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function zn(V){let f,J;return f=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMmR1b25nbmElMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQtZmxheCUyMiUwQWV4cG9ydCUyMElOU1RBTkNFX0RJUiUzRCUyMnBhdGgtdG8taW5zdGFuY2UtaW1hZ2VzJTIyJTBBZXhwb3J0JTIwQ0xBU1NfRElSJTNEJTIycGF0aC10by1jbGFzcy1pbWFnZXMlMjIlMEFleHBvcnQlMjBPVVRQVVRfRElSJTNEJTIycGF0aC10by1zYXZlLW1vZGVsJTIyJTBBJTBBcHl0aG9uJTIwdHJhaW5fZHJlYW1ib290aF9mbGF4LnB5JTIwJTVDJTBBJTIwJTIwLS1wcmV0cmFpbmVkX21vZGVsX25hbWVfb3JfcGF0aCUzRCUyNE1PREVMX05BTUUlMjAlMjAlNUMlMEElMjAlMjAtLWluc3RhbmNlX2RhdGFfZGlyJTNEJTI0SU5TVEFOQ0VfRElSJTIwJTVDJTBBJTIwJTIwLS1jbGFzc19kYXRhX2RpciUzRCUyNENMQVNTX0RJUiUyMCU1QyUwQSUyMCUyMC0tb3V0cHV0X2RpciUzRCUyNE9VVFBVVF9ESVIlMjAlNUMlMEElMjAlMjAtLXdpdGhfcHJpb3JfcHJlc2VydmF0aW9uJTIwLS1wcmlvcl9sb3NzX3dlaWdodCUzRDEuMCUyMCU1QyUwQSUyMCUyMC0taW5zdGFuY2VfcHJvbXB0JTNEJTIyYSUyMHBob3RvJTIwb2YlMjBza3MlMjBkb2clMjIlMjAlNUMlMEElMjAlMjAtLWNsYXNzX3Byb21wdCUzRCUyMmElMjBwaG90byUyMG9mJTIwZG9nJTIyJTIwJTVDJTBBJTIwJTIwLS1yZXNvbHV0aW9uJTNENTEyJTIwJTVDJTBBJTIwJTIwLS10cmFpbl9iYXRjaF9zaXplJTNEMSUyMCU1QyUwQSUyMCUyMC0tbGVhcm5pbmdfcmF0ZSUzRDVlLTYlMjAlNUMlMEElMjAlMjAtLW51bV9jbGFzc19pbWFnZXMlM0QyMDAlMjAlNUMlMEElMjAlMjAtLW1heF90cmFpbl9zdGVwcyUzRDgwMA==",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> INSTANCE_DIR=<span class="hljs-string">&quot;path-to-instance-images&quot;</span>
<span class="hljs-built_in">export</span> CLASS_DIR=<span class="hljs-string">&quot;path-to-class-images&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path-to-save-model&quot;</span>

python train_dreambooth_flax.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --class_data_dir=<span class="hljs-variable">$CLASS_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --with_prior_preservation --prior_loss_weight=1.0 \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --class_prompt=<span class="hljs-string">&quot;a photo of dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --learning_rate=5e-6 \\
  --num_class_images=200 \\
  --max_train_steps=800`}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p:Ht,i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function On(V){let f,J;return f=new qt({props:{$$slots:{default:[zn]},$$scope:{ctx:V}}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p(a,m){const E={};m&2&&(E.$$scope={dirty:m,ctx:a}),f.$set(E)},i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function Ln(V){let f,J;return{c(){f=p("p"),J=r("\uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354\uB97C \uD559\uC2B5\uC2DC\uD0A4\uB824\uBA74 \uCD94\uAC00 \uBA54\uBAA8\uB9AC\uAC00 \uD544\uC694\uD574 16GB GPU\uB85C\uB294 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC774 \uC635\uC158\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uCD5C\uC18C 24GB VRAM\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.")},l(a){f=n(a,"P",{});var m=U(f);J=o(m,"\uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354\uB97C \uD559\uC2B5\uC2DC\uD0A4\uB824\uBA74 \uCD94\uAC00 \uBA54\uBAA8\uB9AC\uAC00 \uD544\uC694\uD574 16GB GPU\uB85C\uB294 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC774 \uC635\uC158\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uCD5C\uC18C 24GB VRAM\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."),m.forEach(t)},m(a,m){i(a,f,m),e(f,J)},d(a){a&&t(f)}}}function Hn(V){let f,J;return f=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBJTlNUQU5DRV9ESVIlM0QlMjJwYXRoX3RvX3RyYWluaW5nX2ltYWdlcyUyMiUwQWV4cG9ydCUyMENMQVNTX0RJUiUzRCUyMnBhdGhfdG9fY2xhc3NfaW1hZ2VzJTIyJTBBZXhwb3J0JTIwT1VUUFVUX0RJUiUzRCUyMnBhdGhfdG9fc2F2ZWRfbW9kZWwlMjIlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwdHJhaW5fZHJlYW1ib290aC5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTIwJTVDJTBBJTIwJTIwLS10cmFpbl90ZXh0X2VuY29kZXIlMjAlNUMlMEElMjAlMjAtLWluc3RhbmNlX2RhdGFfZGlyJTNEJTI0SU5TVEFOQ0VfRElSJTIwJTVDJTBBJTIwJTIwLS1jbGFzc19kYXRhX2RpciUzRCUyNENMQVNTX0RJUiUyMCU1QyUwQSUyMCUyMC0tb3V0cHV0X2RpciUzRCUyNE9VVFBVVF9ESVIlMjAlNUMlMEElMjAlMjAtLXdpdGhfcHJpb3JfcHJlc2VydmF0aW9uJTIwLS1wcmlvcl9sb3NzX3dlaWdodCUzRDEuMCUyMCU1QyUwQSUyMCUyMC0taW5zdGFuY2VfcHJvbXB0JTNEJTIyYSUyMHBob3RvJTIwb2YlMjBza3MlMjBkb2clMjIlMjAlNUMlMEElMjAlMjAtLWNsYXNzX3Byb21wdCUzRCUyMmElMjBwaG90byUyMG9mJTIwZG9nJTIyJTIwJTVDJTBBJTIwJTIwLS1yZXNvbHV0aW9uJTNENTEyJTIwJTVDJTBBJTIwJTIwLS10cmFpbl9iYXRjaF9zaXplJTNEMSUyMCU1QyUwQSUyMCUyMC0tdXNlXzhiaXRfYWRhbSUwQSUyMCUyMC0tZ3JhZGllbnRfY2hlY2twb2ludGluZyUyMCU1QyUwQSUyMCUyMC0tbGVhcm5pbmdfcmF0ZSUzRDJlLTYlMjAlNUMlMEElMjAlMjAtLWxyX3NjaGVkdWxlciUzRCUyMmNvbnN0YW50JTIyJTIwJTVDJTBBJTIwJTIwLS1scl93YXJtdXBfc3RlcHMlM0QwJTIwJTVDJTBBJTIwJTIwLS1udW1fY2xhc3NfaW1hZ2VzJTNEMjAwJTIwJTVDJTBBJTIwJTIwLS1tYXhfdHJhaW5fc3RlcHMlM0Q4MDA=",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> INSTANCE_DIR=<span class="hljs-string">&quot;path_to_training_images&quot;</span>
<span class="hljs-built_in">export</span> CLASS_DIR=<span class="hljs-string">&quot;path_to_class_images&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path_to_saved_model&quot;</span>

accelerate launch train_dreambooth.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --train_text_encoder \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --class_data_dir=<span class="hljs-variable">$CLASS_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --with_prior_preservation --prior_loss_weight=1.0 \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --class_prompt=<span class="hljs-string">&quot;a photo of dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --use_8bit_adam
  --gradient_checkpointing \\
  --learning_rate=2e-6 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> \\
  --lr_warmup_steps=0 \\
  --num_class_images=200 \\
  --max_train_steps=800`}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p:Ht,i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function qn(V){let f,J;return f=new qt({props:{$$slots:{default:[Hn]},$$scope:{ctx:V}}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p(a,m){const E={};m&2&&(E.$$scope={dirty:m,ctx:a}),f.$set(E)},i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function Pn(V){let f,J;return f=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMmR1b25nbmElMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQtZmxheCUyMiUwQWV4cG9ydCUyMElOU1RBTkNFX0RJUiUzRCUyMnBhdGgtdG8taW5zdGFuY2UtaW1hZ2VzJTIyJTBBZXhwb3J0JTIwQ0xBU1NfRElSJTNEJTIycGF0aC10by1jbGFzcy1pbWFnZXMlMjIlMEFleHBvcnQlMjBPVVRQVVRfRElSJTNEJTIycGF0aC10by1zYXZlLW1vZGVsJTIyJTBBJTBBcHl0aG9uJTIwdHJhaW5fZHJlYW1ib290aF9mbGF4LnB5JTIwJTVDJTBBJTIwJTIwLS1wcmV0cmFpbmVkX21vZGVsX25hbWVfb3JfcGF0aCUzRCUyNE1PREVMX05BTUUlMjAlMjAlNUMlMEElMjAlMjAtLXRyYWluX3RleHRfZW5jb2RlciUyMCU1QyUwQSUyMCUyMC0taW5zdGFuY2VfZGF0YV9kaXIlM0QlMjRJTlNUQU5DRV9ESVIlMjAlNUMlMEElMjAlMjAtLWNsYXNzX2RhdGFfZGlyJTNEJTI0Q0xBU1NfRElSJTIwJTVDJTBBJTIwJTIwLS1vdXRwdXRfZGlyJTNEJTI0T1VUUFVUX0RJUiUyMCU1QyUwQSUyMCUyMC0td2l0aF9wcmlvcl9wcmVzZXJ2YXRpb24lMjAtLXByaW9yX2xvc3Nfd2VpZ2h0JTNEMS4wJTIwJTVDJTBBJTIwJTIwLS1pbnN0YW5jZV9wcm9tcHQlM0QlMjJhJTIwcGhvdG8lMjBvZiUyMHNrcyUyMGRvZyUyMiUyMCU1QyUwQSUyMCUyMC0tY2xhc3NfcHJvbXB0JTNEJTIyYSUyMHBob3RvJTIwb2YlMjBkb2clMjIlMjAlNUMlMEElMjAlMjAtLXJlc29sdXRpb24lM0Q1MTIlMjAlNUMlMEElMjAlMjAtLXRyYWluX2JhdGNoX3NpemUlM0QxJTIwJTVDJTBBJTIwJTIwLS1sZWFybmluZ19yYXRlJTNEMmUtNiUyMCU1QyUwQSUyMCUyMC0tbnVtX2NsYXNzX2ltYWdlcyUzRDIwMCUyMCU1QyUwQSUyMCUyMC0tbWF4X3RyYWluX3N0ZXBzJTNEODAw",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> INSTANCE_DIR=<span class="hljs-string">&quot;path-to-instance-images&quot;</span>
<span class="hljs-built_in">export</span> CLASS_DIR=<span class="hljs-string">&quot;path-to-class-images&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path-to-save-model&quot;</span>

python train_dreambooth_flax.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --train_text_encoder \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --class_data_dir=<span class="hljs-variable">$CLASS_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --with_prior_preservation --prior_loss_weight=1.0 \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --class_prompt=<span class="hljs-string">&quot;a photo of dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --learning_rate=2e-6 \\
  --num_class_images=200 \\
  --max_train_steps=800`}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p:Ht,i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function Kn(V){let f,J;return f=new qt({props:{$$slots:{default:[Pn]},$$scope:{ctx:V}}}),{c(){y(f.$$.fragment)},l(a){T(f.$$.fragment,a)},m(a,m){d(f,a,m),J=!0},p(a,m){const E={};m&2&&(E.$$scope={dirty:m,ctx:a}),f.$set(E)},i(a){J||(_(f.$$.fragment,a),J=!0)},o(a){b(f.$$.fragment,a),J=!1},d(a){w(f,a)}}}function li(V){let f,J,a,m,E,I,Q,B,X,G,N,v,F,W,S,Z,u,$,R,C,H,q,pl,Sl,z,Va,Zl,Pt,Ca,ja,Fl,Ia,$a,Ye,nl,Qa,Kt,Na,va,xe,Wl,ze,il,Ba,Nt,Ga,Xa,Oe,Ul,Sa,Al,Za,Fa,Le,Dl,He,vt,Wa,qe,gl,Pe,Bt,Aa,Ke,kl,ls,Yl,Da,ts,fl,es,Ml,ss,P,cl,le,xl,ga,te,ka,as,hl,Ya,zl,xa,za,rs,Jl,Oa,ee,La,Ha,os,ml,ps,K,ul,se,Ol,qa,ae,Pa,ns,A,Ka,re,lr,tr,oe,er,sr,Ll,ar,rr,is,yl,Us,Y,pe,or,pr,ne,nr,ir,ie,Ur,fr,fs,Tl,Ms,ll,dl,Ue,Hl,Mr,fe,cr,cs,_l,hr,Gt,Jr,mr,hs,ql,ur,Js,Xt,yr,ms,Pl,us,D,Tr,Me,dr,_r,ce,br,wr,he,Er,Rr,ys,Kl,Vr,Ts,O,Cr,Je,jr,Ir,me,$r,Qr,ds,lt,_s,St,Nr,bs,tt,vr,ws,Zt,Br,Es,et,ue,ye,Gr,Xr,Rs,st,Vs,bl,Sr,Te,de,Zr,Fr,Cs,at,js,tl,wl,_e,rt,Wr,be,Ar,Is,Ft,Dr,$s,el,El,we,ot,gr,Ee,kr,Qs,x,pt,Yr,xr,nt,zr,Or,Wt,Lr,Hr,Ns,it,vs,At,qr,Bs,Ut,Pr,Gs,g,Kr,ft,lo,to,Re,eo,so,Ve,ao,ro,Xs,Mt,Ss,sl,Rl,Ce,ct,oo,je,po,Zs,Vl,no,ht,io,Uo,Fs,Jt,Ws,Cl,fo,Ie,Mo,co,As,mt,Ds,al,jl,$e,ut,ho,Qe,Jo,gs,Il,mo,Ne,uo,yo,ks,yt,Ys,rl,$l,ve,Tt,To,Be,_o,xs,Ql,bo,dt,wo,Eo,zs,Dt,Ro,Os,_t,Ls,Nl,Vo,bt,Co,jo,Hs,L,Io,wt,Ge,$o,Qo,Xe,No,vo,qs,gt,Bo,Ps,kt,Go,Ks,Et,la,Rt,Xo,ta,k,So,Se,Zo,Fo,Ze,Wo,Ao,Fe,Do,go,ea,Vt,We,Ae,ko,Yo,sa,Ct,aa,jt,Yt,xo,zo,ra;return I=new ol({}),Wl=new j({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGZGlmZnVzZXJzJTBBcGlwJTIwaW5zdGFsbCUyMC1VJTIwLXIlMjBkaWZmdXNlcnMlMkZleGFtcGxlcyUyRmRyZWFtYm9vdGglMkZyZXF1aXJlbWVudHMudHh0",highlighted:`pip install git+https://github.com/huggingface/diffusers
pip install -U -r diffusers/examples/dreambooth/requirements.txt`}}),Dl=new j({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config"}}),gl=new j({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZyUyMGRlZmF1bHQ=",highlighted:"accelerate config default"}}),kl=new j({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUudXRpbHMlMjBpbXBvcnQlMjB3cml0ZV9iYXNpY19jb25maWclMEElMEF3cml0ZV9iYXNpY19jb25maWcoKQ==",highlighted:`<span class="hljs-keyword">from</span> accelerate.utils <span class="hljs-keyword">import</span> write_basic_config

write_basic_config()`}}),fl=new vn({props:{warning:!0,$$slots:{default:[Wn]},$$scope:{ctx:V}}}),Ml=new Po({props:{pytorch:!0,tensorflow:!1,jax:!0,$$slots:{jax:[kn],pytorch:[Dn]},$$scope:{ctx:V}}}),xl=new ol({}),ml=new Po({props:{pytorch:!0,tensorflow:!1,jax:!0,$$slots:{jax:[On],pytorch:[xn]},$$scope:{ctx:V}}}),Ol=new ol({}),yl=new vn({props:{warning:!0,$$slots:{default:[Ln]},$$scope:{ctx:V}}}),Tl=new Po({props:{pytorch:!0,tensorflow:!1,jax:!0,$$slots:{jax:[Kn],pytorch:[qn]},$$scope:{ctx:V}}}),Hl=new ol({}),Pl=new j({props:{code:"JTIwJTIwLS1jaGVja3BvaW50aW5nX3N0ZXBzJTNENTAw",highlighted:"  --checkpointing_steps=500"}}),lt=new j({props:{code:"JTIwJTIwLS1yZXN1bWVfZnJvbV9jaGVja3BvaW50JTNEJTIyY2hlY2twb2ludC0xNTAwJTIy",highlighted:'  --resume_from_checkpoint=<span class="hljs-string">&quot;checkpoint-1500&quot;</span>'}}),st=new j({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTJDJTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ0xJUFRleHRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBJTIzJTIwJUVEJTk1JTk5JUVDJThBJUI1JUVDJTk3JTkwJTIwJUVDJTgyJUFDJUVDJTlBJUE5JUVCJTkwJTlDJTIwJUVBJUIyJTgzJUVBJUIzJUJDJTIwJUVCJThGJTk5JUVDJTlEJUJDJUVEJTk1JTlDJTIwJUVDJTlEJUI4JUVDJTg4JTk4KG1vZGVsJTJDJTIwcmV2aXNpb24pJUVCJUExJTlDJTIwJUVEJThDJThDJUVDJTlEJUI0JUVEJTk0JTg0JUVCJTlEJUJDJUVDJTlEJUI4JUVDJTlEJTg0JTIwJUVCJUI2JTg4JUVCJTlGJUFDJUVDJTk4JUI1JUVCJThCJTg4JUVCJThCJUE0LiUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUwQSUwQXVuZXQlMjAlM0QlMjBVTmV0MkRDb25kaXRpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyJTJGc2RkYXRhJTJGZHJlYW1ib290aCUyRmRhcnVtYS12Mi0xJTJGY2hlY2twb2ludC0xMDAlMkZ1bmV0JTIyKSUwQSUwQSUyMyUyMCU2MGFyZ3MudHJhaW5fdGV4dF9lbmNvZGVyJTYwJUVCJUExJTlDJTIwJUVEJTk1JTk5JUVDJThBJUI1JUVEJTk1JTlDJTIwJUVBJUIyJUJEJUVDJTlBJUIwJUVCJUE5JUI0JTIwJUVEJTg1JThEJUVDJThBJUE0JUVEJThBJUI4JTIwJUVDJTlEJUI4JUVDJUJEJTk0JUVCJThEJTk0JUVCJUE1JUJDJTIwJUVBJUJDJUFEJTIwJUVCJUI2JTg4JUVCJTlGJUFDJUVDJTk4JUE0JUVDJTg0JUI4JUVDJTlBJTk0JTBBdGV4dF9lbmNvZGVyJTIwJTNEJTIwQ0xJUFRleHRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyJTJGc2RkYXRhJTJGZHJlYW1ib290aCUyRmRhcnVtYS12Mi0xJTJGY2hlY2twb2ludC0xMDAlMkZ0ZXh0X2VuY29kZXIlMjIpJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB1bmV0JTNEdW5ldCUyQyUyMHRleHRfZW5jb2RlciUzRHRleHRfZW5jb2RlciUyQyUyMGR0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlbGluZS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMCVFQyVCNiU5NCVFQiVBMSVBMCVFQyU5RCU4NCUyMCVFQyU4OCU5OCVFRCU5NiU4OSVFRCU5NSU5OCVFQSVCMSVCMCVFQiU4MiU5OCUyMCVFQyVBMCU4MCVFQyU5RSVBNSVFRCU5NSU5OCVFQSVCMSVCMCVFQiU4MiU5OCUyQyUyMCVFRCU5NyU4OCVFQiVCOCU4QyVFQyU5NyU5MCUyMCVFRCU5MSVCOCVFQyU4QiU5QyVFRCU5NSVBOSVFQiU4QiU4OCVFQiU4QiVBNC4lMEFwaXBlbGluZS5zYXZlX3ByZXRyYWluZWQoJTIyZHJlYW1ib290aC1waXBlbGluZSUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline, UNet2DConditionModel
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPTextModel
<span class="hljs-keyword">import</span> torch

<span class="hljs-comment"># \uD559\uC2B5\uC5D0 \uC0AC\uC6A9\uB41C \uAC83\uACFC \uB3D9\uC77C\uD55C \uC778\uC218(model, revision)\uB85C \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBD88\uB7EC\uC635\uB2C8\uB2E4.</span>
model_id = <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>

unet = UNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;/sddata/dreambooth/daruma-v2-1/checkpoint-100/unet&quot;</span>)

<span class="hljs-comment"># \`args.train_text_encoder\`\uB85C \uD559\uC2B5\uD55C \uACBD\uC6B0\uBA74 \uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354\uB97C \uAF2D \uBD88\uB7EC\uC624\uC138\uC694</span>
text_encoder = CLIPTextModel.from_pretrained(<span class="hljs-string">&quot;/sddata/dreambooth/daruma-v2-1/checkpoint-100/text_encoder&quot;</span>)

pipeline = DiffusionPipeline.from_pretrained(model_id, unet=unet, text_encoder=text_encoder, dtype=torch.float16)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># \uCD94\uB860\uC744 \uC218\uD589\uD558\uAC70\uB098 \uC800\uC7A5\uD558\uAC70\uB098, \uD5C8\uBE0C\uC5D0 \uD478\uC2DC\uD569\uB2C8\uB2E4.</span>
pipeline.save_pretrained(<span class="hljs-string">&quot;dreambooth-pipeline&quot;</span>)`}}),at=new j({props:{code:"ZnJvbSUyMGFjY2VsZXJhdGUlMjBpbXBvcnQlMjBBY2NlbGVyYXRvciUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBEaWZmdXNpb25QaXBlbGluZSUwQSUwQSUyMyUyMCVFRCU5NSU5OSVFQyU4QSVCNSVFQyU5NyU5MCUyMCVFQyU4MiVBQyVFQyU5QSVBOSVFQiU5MCU5QyUyMCVFQSVCMiU4MyVFQSVCMyVCQyUyMCVFQiU4RiU5OSVFQyU5RCVCQyVFRCU5NSU5QyUyMCVFQyU5RCVCOCVFQyU4OCU5OChtb2RlbCUyQyUyMHJldmlzaW9uKSVFQiVBMSU5QyUyMCVFRCU4QyU4QyVFQyU5RCVCNCVFRCU5NCU4NCVFQiU5RCVCQyVFQyU5RCVCOCVFQyU5RCU4NCUyMCVFQiVCNiU4OCVFQiU5RiVBQyVFQyU5OCVCNSVFQiU4QiU4OCVFQiU4QiVBNC4lMEFtb2RlbF9pZCUyMCUzRCUyMCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCklMEElMEFhY2NlbGVyYXRvciUyMCUzRCUyMEFjY2VsZXJhdG9yKCklMEElMEElMjMlMjAlRUMlQjQlODglRUElQjglQjAlMjAlRUQlOTUlOTklRUMlOEElQjUlRUMlOTclOTAlMjAlNjAtLXRyYWluX3RleHRfZW5jb2RlciU2MCVFQSVCMCU4MCUyMCVFQyU4MiVBQyVFQyU5QSVBOSVFQiU5MCU5QyUyMCVFQSVCMiVCRCVFQyU5QSVCMCUyMHRleHRfZW5jb2RlciVFQiVBNSVCQyUyMCVFQyU4MiVBQyVFQyU5QSVBOSVFRCU5NSVBOSVFQiU4QiU4OCVFQiU4QiVBNC4lMEF1bmV0JTJDJTIwdGV4dF9lbmNvZGVyJTIwJTNEJTIwYWNjZWxlcmF0b3IucHJlcGFyZShwaXBlbGluZS51bmV0JTJDJTIwcGlwZWxpbmUudGV4dF9lbmNvZGVyKSUwQSUwQSUyMyUyMCVFQyVCMiVCNCVFRCU4MSVBQyVFRCU4RiVBQyVFQyU5RCVCOCVFRCU4QSVCOCUyMCVFQSVCMiVCRCVFQiVBMSU5QyVFQiVBMSU5QyVFQiVCNiU4MCVFRCU4NCVCMCUyMCVFQyU4MyU4MSVFRCU4MyU5QyVFQiVBNSVCQyUyMCVFQiVCMyVCNSVFQyU5QiU5MCVFRCU5NSVBOSVFQiU4QiU4OCVFQiU4QiVBNC4lMjAlRUMlOTclQUMlRUElQjglQjAlRUMlODQlOUMlRUIlOEElOTQlMjAlRUMlQTAlODglRUIlOEMlODAlMjAlRUElQjIlQkQlRUIlQTElOUMlRUIlQTUlQkMlMjAlRUMlODIlQUMlRUMlOUElQTklRUQlOTUlQjQlRUMlOTUlQkMlMjAlRUQlOTUlQTklRUIlOEIlODglRUIlOEIlQTQuJTBBYWNjZWxlcmF0b3IubG9hZF9zdGF0ZSglMjIlMkZzZGRhdGElMkZkcmVhbWJvb3RoJTJGZGFydW1hLXYyLTElMkZjaGVja3BvaW50LTEwMCUyMiklMEElMEElMjMlMjB1bndyYXBwZWQlMjAlRUIlQUElQTglRUIlOEQlQjglRUIlQTElOUMlMjAlRUQlOEMlOEMlRUMlOUQlQjQlRUQlOTQlODQlRUIlOUQlQkMlRUMlOUQlQjglRUMlOUQlODQlMjAlRUIlOEIlQTQlRUMlOEIlOUMlMjAlRUIlQjklOEMlRUIlOTMlOUMlRUQlOTUlQTklRUIlOEIlODglRUIlOEIlQTQuKC51bmV0JTIwYW5kJTIwLnRleHRfZW5jb2RlciVFQiVBMSU5QyVFQyU5RCU5OCUyMCVFRCU5NSVBMCVFQiU4QiVCOSVFQiU4RiU4NCUyMCVFQyU5RSU5MSVFQiU4RiU5OSVFRCU5NSVCNCVFQyU5NSVCQyUyMCVFRCU5NSVBOSVFQiU4QiU4OCVFQiU4QiVBNCklMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUyQyUwQSUyMCUyMCUyMCUyMHVuZXQlM0RhY2NlbGVyYXRvci51bndyYXBfbW9kZWwodW5ldCklMkMlMEElMjAlMjAlMjAlMjB0ZXh0X2VuY29kZXIlM0RhY2NlbGVyYXRvci51bndyYXBfbW9kZWwodGV4dF9lbmNvZGVyKSUyQyUwQSklMEElMEElMjMlMjAlRUMlQjYlOTQlRUIlQTElQTAlRUMlOUQlODQlMjAlRUMlODglOTglRUQlOTYlODklRUQlOTUlOTglRUElQjElQjAlRUIlODIlOTglMjAlRUMlQTAlODAlRUMlOUUlQTUlRUQlOTUlOTglRUElQjElQjAlRUIlODIlOTglMkMlMjAlRUQlOTclODglRUIlQjglOEMlRUMlOTclOTAlMjAlRUQlOTElQjglRUMlOEIlOUMlRUQlOTUlQTklRUIlOEIlODglRUIlOEIlQTQuJTBBcGlwZWxpbmUuc2F2ZV9wcmV0cmFpbmVkKCUyMmRyZWFtYm9vdGgtcGlwZWxpbmUlMjIp",highlighted:`<span class="hljs-keyword">from</span> accelerate <span class="hljs-keyword">import</span> Accelerator
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

<span class="hljs-comment"># \uD559\uC2B5\uC5D0 \uC0AC\uC6A9\uB41C \uAC83\uACFC \uB3D9\uC77C\uD55C \uC778\uC218(model, revision)\uB85C \uD30C\uC774\uD504\uB77C\uC778\uC744 \uBD88\uB7EC\uC635\uB2C8\uB2E4.</span>
model_id = <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>
pipeline = DiffusionPipeline.from_pretrained(model_id)

accelerator = Accelerator()

<span class="hljs-comment"># \uCD08\uAE30 \uD559\uC2B5\uC5D0 \`--train_text_encoder\`\uAC00 \uC0AC\uC6A9\uB41C \uACBD\uC6B0 text_encoder\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.</span>
unet, text_encoder = accelerator.prepare(pipeline.unet, pipeline.text_encoder)

<span class="hljs-comment"># \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uACBD\uB85C\uB85C\uBD80\uD130 \uC0C1\uD0DC\uB97C \uBCF5\uC6D0\uD569\uB2C8\uB2E4. \uC5EC\uAE30\uC11C\uB294 \uC808\uB300 \uACBD\uB85C\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.</span>
accelerator.load_state(<span class="hljs-string">&quot;/sddata/dreambooth/daruma-v2-1/checkpoint-100&quot;</span>)

<span class="hljs-comment"># unwrapped \uBAA8\uB378\uB85C \uD30C\uC774\uD504\uB77C\uC778\uC744 \uB2E4\uC2DC \uBE4C\uB4DC\uD569\uB2C8\uB2E4.(.unet and .text_encoder\uB85C\uC758 \uD560\uB2F9\uB3C4 \uC791\uB3D9\uD574\uC57C \uD569\uB2C8\uB2E4)</span>
pipeline = DiffusionPipeline.from_pretrained(
    model_id,
    unet=accelerator.unwrap_model(unet),
    text_encoder=accelerator.unwrap_model(text_encoder),
)

<span class="hljs-comment"># \uCD94\uB860\uC744 \uC218\uD589\uD558\uAC70\uB098 \uC800\uC7A5\uD558\uAC70\uB098, \uD5C8\uBE0C\uC5D0 \uD478\uC2DC\uD569\uB2C8\uB2E4.</span>
pipeline.save_pretrained(<span class="hljs-string">&quot;dreambooth-pipeline&quot;</span>)`}}),rt=new ol({}),ot=new ol({}),it=new j({props:{code:"JTIwJTIwLS1lbmFibGVfeGZvcm1lcnNfbWVtb3J5X2VmZmljaWVudF9hdHRlbnRpb24=",highlighted:"  --enable_xformers_memory_efficient_attention"}}),Mt=new j({props:{code:"JTIwJTIwLS1zZXRfZ3JhZHNfdG9fbm9uZQ==",highlighted:"  --set_grads_to_none"}}),ct=new ol({}),Jt=new j({props:{code:"cGlwJTIwaW5zdGFsbCUyMGJpdHNhbmRieXRlcw==",highlighted:"pip install bitsandbytes"}}),mt=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBJTlNUQU5DRV9ESVIlM0QlMjJwYXRoX3RvX3RyYWluaW5nX2ltYWdlcyUyMiUwQWV4cG9ydCUyMENMQVNTX0RJUiUzRCUyMnBhdGhfdG9fY2xhc3NfaW1hZ2VzJTIyJTBBZXhwb3J0JTIwT1VUUFVUX0RJUiUzRCUyMnBhdGhfdG9fc2F2ZWRfbW9kZWwlMjIlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwdHJhaW5fZHJlYW1ib290aC5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTIwJTVDJTBBJTIwJTIwLS1pbnN0YW5jZV9kYXRhX2RpciUzRCUyNElOU1RBTkNFX0RJUiUyMCU1QyUwQSUyMCUyMC0tY2xhc3NfZGF0YV9kaXIlM0QlMjRDTEFTU19ESVIlMjAlNUMlMEElMjAlMjAtLW91dHB1dF9kaXIlM0QlMjRPVVRQVVRfRElSJTIwJTVDJTBBJTIwJTIwLS13aXRoX3ByaW9yX3ByZXNlcnZhdGlvbiUyMC0tcHJpb3JfbG9zc193ZWlnaHQlM0QxLjAlMjAlNUMlMEElMjAlMjAtLWluc3RhbmNlX3Byb21wdCUzRCUyMmElMjBwaG90byUyMG9mJTIwc2tzJTIwZG9nJTIyJTIwJTVDJTBBJTIwJTIwLS1jbGFzc19wcm9tcHQlM0QlMjJhJTIwcGhvdG8lMjBvZiUyMGRvZyUyMiUyMCU1QyUwQSUyMCUyMC0tcmVzb2x1dGlvbiUzRDUxMiUyMCU1QyUwQSUyMCUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUzRDElMjAlNUMlMEElMjAlMjAtLWdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUzRDIlMjAtLWdyYWRpZW50X2NoZWNrcG9pbnRpbmclMjAlNUMlMEElMjAlMjAtLXVzZV84Yml0X2FkYW0lMjAlNUMlMEElMjAlMjAtLWxlYXJuaW5nX3JhdGUlM0Q1ZS02JTIwJTVDJTBBJTIwJTIwLS1scl9zY2hlZHVsZXIlM0QlMjJjb25zdGFudCUyMiUyMCU1QyUwQSUyMCUyMC0tbHJfd2FybXVwX3N0ZXBzJTNEMCUyMCU1QyUwQSUyMCUyMC0tbnVtX2NsYXNzX2ltYWdlcyUzRDIwMCUyMCU1QyUwQSUyMCUyMC0tbWF4X3RyYWluX3N0ZXBzJTNEODAw",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> INSTANCE_DIR=<span class="hljs-string">&quot;path_to_training_images&quot;</span>
<span class="hljs-built_in">export</span> CLASS_DIR=<span class="hljs-string">&quot;path_to_class_images&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path_to_saved_model&quot;</span>

accelerate launch train_dreambooth.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --class_data_dir=<span class="hljs-variable">$CLASS_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --with_prior_preservation --prior_loss_weight=1.0 \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --class_prompt=<span class="hljs-string">&quot;a photo of dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --gradient_accumulation_steps=2 --gradient_checkpointing \\
  --use_8bit_adam \\
  --learning_rate=5e-6 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> \\
  --lr_warmup_steps=0 \\
  --num_class_images=200 \\
  --max_train_steps=800`}}),ut=new ol({}),yt=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBJTlNUQU5DRV9ESVIlM0QlMjJwYXRoLXRvLWluc3RhbmNlLWltYWdlcyUyMiUwQWV4cG9ydCUyMENMQVNTX0RJUiUzRCUyMnBhdGgtdG8tY2xhc3MtaW1hZ2VzJTIyJTBBZXhwb3J0JTIwT1VUUFVUX0RJUiUzRCUyMnBhdGgtdG8tc2F2ZS1tb2RlbCUyMiUwQSUwQWFjY2VsZXJhdGUlMjBsYXVuY2glMjB0cmFpbl9kcmVhbWJvb3RoLnB5JTIwJTVDJTBBJTIwJTIwLS1wcmV0cmFpbmVkX21vZGVsX25hbWVfb3JfcGF0aCUzRCUyNE1PREVMX05BTUUlMjAlMjAlNUMlMEElMjAlMjAtLWluc3RhbmNlX2RhdGFfZGlyJTNEJTI0SU5TVEFOQ0VfRElSJTIwJTVDJTBBJTIwJTIwLS1jbGFzc19kYXRhX2RpciUzRCUyNENMQVNTX0RJUiUyMCU1QyUwQSUyMCUyMC0tb3V0cHV0X2RpciUzRCUyNE9VVFBVVF9ESVIlMjAlNUMlMEElMjAlMjAtLXdpdGhfcHJpb3JfcHJlc2VydmF0aW9uJTIwLS1wcmlvcl9sb3NzX3dlaWdodCUzRDEuMCUyMCU1QyUwQSUyMCUyMC0taW5zdGFuY2VfcHJvbXB0JTNEJTIyYSUyMHBob3RvJTIwb2YlMjBza3MlMjBkb2clMjIlMjAlNUMlMEElMjAlMjAtLWNsYXNzX3Byb21wdCUzRCUyMmElMjBwaG90byUyMG9mJTIwZG9nJTIyJTIwJTVDJTBBJTIwJTIwLS1yZXNvbHV0aW9uJTNENTEyJTIwJTVDJTBBJTIwJTIwLS10cmFpbl9iYXRjaF9zaXplJTNEMSUyMCU1QyUwQSUyMCUyMC0tZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTNEMSUyMC0tZ3JhZGllbnRfY2hlY2twb2ludGluZyUyMCU1QyUwQSUyMCUyMC0tdXNlXzhiaXRfYWRhbSUyMCU1QyUwQSUyMCUyMC0tZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uJTIwJTVDJTBBJTIwJTIwLS1zZXRfZ3JhZHNfdG9fbm9uZSUyMCU1QyUwQSUyMCUyMC0tbGVhcm5pbmdfcmF0ZSUzRDJlLTYlMjAlNUMlMEElMjAlMjAtLWxyX3NjaGVkdWxlciUzRCUyMmNvbnN0YW50JTIyJTIwJTVDJTBBJTIwJTIwLS1scl93YXJtdXBfc3RlcHMlM0QwJTIwJTVDJTBBJTIwJTIwLS1udW1fY2xhc3NfaW1hZ2VzJTNEMjAwJTIwJTVDJTBBJTIwJTIwLS1tYXhfdHJhaW5fc3RlcHMlM0Q4MDA=",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> INSTANCE_DIR=<span class="hljs-string">&quot;path-to-instance-images&quot;</span>
<span class="hljs-built_in">export</span> CLASS_DIR=<span class="hljs-string">&quot;path-to-class-images&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_dreambooth.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --class_data_dir=<span class="hljs-variable">$CLASS_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --with_prior_preservation --prior_loss_weight=1.0 \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --class_prompt=<span class="hljs-string">&quot;a photo of dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --gradient_accumulation_steps=1 --gradient_checkpointing \\
  --use_8bit_adam \\
  --enable_xformers_memory_efficient_attention \\
  --set_grads_to_none \\
  --learning_rate=2e-6 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> \\
  --lr_warmup_steps=0 \\
  --num_class_images=200 \\
  --max_train_steps=800`}}),Tt=new ol({}),_t=new j({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config"}}),Et=new j({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBJTlNUQU5DRV9ESVIlM0QlMjJwYXRoX3RvX3RyYWluaW5nX2ltYWdlcyUyMiUwQWV4cG9ydCUyMENMQVNTX0RJUiUzRCUyMnBhdGhfdG9fY2xhc3NfaW1hZ2VzJTIyJTBBZXhwb3J0JTIwT1VUUFVUX0RJUiUzRCUyMnBhdGhfdG9fc2F2ZWRfbW9kZWwlMjIlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwdHJhaW5fZHJlYW1ib290aC5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTVDJTBBJTIwJTIwLS1pbnN0YW5jZV9kYXRhX2RpciUzRCUyNElOU1RBTkNFX0RJUiUyMCU1QyUwQSUyMCUyMC0tY2xhc3NfZGF0YV9kaXIlM0QlMjRDTEFTU19ESVIlMjAlNUMlMEElMjAlMjAtLW91dHB1dF9kaXIlM0QlMjRPVVRQVVRfRElSJTIwJTVDJTBBJTIwJTIwLS13aXRoX3ByaW9yX3ByZXNlcnZhdGlvbiUyMC0tcHJpb3JfbG9zc193ZWlnaHQlM0QxLjAlMjAlNUMlMEElMjAlMjAtLWluc3RhbmNlX3Byb21wdCUzRCUyMmElMjBwaG90byUyMG9mJTIwc2tzJTIwZG9nJTIyJTIwJTVDJTBBJTIwJTIwLS1jbGFzc19wcm9tcHQlM0QlMjJhJTIwcGhvdG8lMjBvZiUyMGRvZyUyMiUyMCU1QyUwQSUyMCUyMC0tcmVzb2x1dGlvbiUzRDUxMiUyMCU1QyUwQSUyMCUyMC0tdHJhaW5fYmF0Y2hfc2l6ZSUzRDElMjAlNUMlMEElMjAlMjAtLXNhbXBsZV9iYXRjaF9zaXplJTNEMSUyMCU1QyUwQSUyMCUyMC0tZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTNEMSUyMC0tZ3JhZGllbnRfY2hlY2twb2ludGluZyUyMCU1QyUwQSUyMCUyMC0tbGVhcm5pbmdfcmF0ZSUzRDVlLTYlMjAlNUMlMEElMjAlMjAtLWxyX3NjaGVkdWxlciUzRCUyMmNvbnN0YW50JTIyJTIwJTVDJTBBJTIwJTIwLS1scl93YXJtdXBfc3RlcHMlM0QwJTIwJTVDJTBBJTIwJTIwLS1udW1fY2xhc3NfaW1hZ2VzJTNEMjAwJTIwJTVDJTBBJTIwJTIwLS1tYXhfdHJhaW5fc3RlcHMlM0Q4MDAlMjAlNUMlMEElMjAlMjAtLW1peGVkX3ByZWNpc2lvbiUzRGZwMTY=",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> INSTANCE_DIR=<span class="hljs-string">&quot;path_to_training_images&quot;</span>
<span class="hljs-built_in">export</span> CLASS_DIR=<span class="hljs-string">&quot;path_to_class_images&quot;</span>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path_to_saved_model&quot;</span>

accelerate launch train_dreambooth.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span> \\
  --instance_data_dir=<span class="hljs-variable">$INSTANCE_DIR</span> \\
  --class_data_dir=<span class="hljs-variable">$CLASS_DIR</span> \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --with_prior_preservation --prior_loss_weight=1.0 \\
  --instance_prompt=<span class="hljs-string">&quot;a photo of sks dog&quot;</span> \\
  --class_prompt=<span class="hljs-string">&quot;a photo of dog&quot;</span> \\
  --resolution=512 \\
  --train_batch_size=1 \\
  --sample_batch_size=1 \\
  --gradient_accumulation_steps=1 --gradient_checkpointing \\
  --learning_rate=5e-6 \\
  --lr_scheduler=<span class="hljs-string">&quot;constant&quot;</span> \\
  --lr_warmup_steps=0 \\
  --num_class_images=200 \\
  --max_train_steps=800 \\
  --mixed_precision=fp16`}}),Ct=new j({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnBhdGhfdG9fc2F2ZWRfbW9kZWwlMjIlMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBwaG90byUyMG9mJTIwc2tzJTIwZG9nJTIwaW4lMjBhJTIwYnVja2V0JTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUyMGd1aWRhbmNlX3NjYWxlJTNENy41KS5pbWFnZXMlNUIwJTVEJTBBJTBBaW1hZ2Uuc2F2ZSglMjJkb2ctYnVja2V0LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch

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

prompt = <span class="hljs-string">&quot;A photo of sks dog in a bucket&quot;</span>
image = pipe(prompt, num_inference_steps=<span class="hljs-number">50</span>, guidance_scale=<span class="hljs-number">7.5</span>).images[<span class="hljs-number">0</span>]

image.save(<span class="hljs-string">&quot;dog-bucket.png&quot;</span>)`}}),{c(){f=p("meta"),J=M(),a=p("h1"),m=p("a"),E=p("span"),y(I.$$.fragment),Q=M(),B=p("span"),X=r("DreamBooth"),G=M(),N=p("p"),v=p("a"),F=r("DreamBooth"),W=r("\uB294 \uD55C \uC8FC\uC81C\uC5D0 \uB300\uD55C \uC801\uC740 \uC774\uBBF8\uC9C0(3~5\uAC1C)\uB9CC\uC73C\uB85C\uB3C4 stable diffusion\uACFC \uAC19\uC774 text-to-image \uBAA8\uB378\uC744 \uAC1C\uC778\uD654\uD560 \uC218 \uC788\uB294 \uBC29\uBC95\uC785\uB2C8\uB2E4. \uC774\uB97C \uD1B5\uD574 \uBAA8\uB378\uC740 \uB2E4\uC591\uD55C \uC7A5\uBA74, \uD3EC\uC988 \uBC0F \uC7A5\uBA74(\uBDF0)\uC5D0\uC11C \uD53C\uC0AC\uCCB4\uC5D0 \uB300\uD574 \uB9E5\uB77D\uD654(contextualized)\uB41C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),S=M(),Z=p("p"),u=p("img"),R=M(),C=p("small"),H=r("\uC5D0\uC11C\uC758 Dreambooth \uC608\uC2DC "),q=p("a"),pl=r("project's blog."),Sl=M(),z=p("p"),Va=r("\uC774 \uAC00\uC774\uB4DC\uB294 \uB2E4\uC591\uD55C GPU, Flax \uC0AC\uC591\uC5D0 \uB300\uD574 "),Zl=p("a"),Pt=p("code"),Ca=r("CompVis/stable-diffusion-v1-4"),ja=r(" \uBAA8\uB378\uB85C DreamBooth\uB97C \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. \uB354 \uAE4A\uC774 \uD30C\uACE0\uB4E4\uC5B4 \uC791\uB3D9 \uBC29\uC2DD\uC744 \uD655\uC778\uD558\uB294 \uB370 \uAD00\uC2EC\uC774 \uC788\uB294 \uACBD\uC6B0, \uC774 \uAC00\uC774\uB4DC\uC5D0 \uC0AC\uC6A9\uB41C DreamBooth\uC758 \uBAA8\uB4E0 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB97C "),Fl=p("a"),Ia=r("\uC5EC\uAE30"),$a=r("\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ye=M(),nl=p("p"),Qa=r("\uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD558\uAE30 \uC804\uC5D0 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC758 \uD559\uC2B5\uC5D0 \uD544\uC694\uD55C dependencies\uB97C \uC124\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4. \uB610\uD55C "),Kt=p("code"),Na=r("main"),va=r(" GitHub \uBE0C\uB79C\uCE58\uC5D0\uC11C \u{1F9E8} Diffusers\uB97C \uC124\uCE58\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4."),xe=M(),y(Wl.$$.fragment),ze=M(),il=p("p"),Ba=r("xFormers\uB294 \uD559\uC2B5\uC5D0 \uD544\uC694\uD55C \uC694\uAD6C \uC0AC\uD56D\uC740 \uC544\uB2C8\uC9C0\uB9CC, \uAC00\uB2A5\uD558\uBA74 "),Nt=p("a"),Ga=r("\uC124\uCE58"),Xa=r("\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uD559\uC2B5 \uC18D\uB3C4\uB97C \uB192\uC774\uACE0 \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9\uC744 \uC904\uC77C \uC218 \uC788\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."),Oe=M(),Ul=p("p"),Sa=r("\uBAA8\uB4E0 dependencies\uC744 \uC124\uC815\uD55C \uD6C4 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD558\uC5EC "),Al=p("a"),Za=r("\u{1F917} Accelerate"),Fa=r(" \uD658\uACBD\uC744 \uB2E4\uC74C\uACFC \uAC19\uC774 \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4:"),Le=M(),y(Dl.$$.fragment),He=M(),vt=p("p"),Wa=r("\uBCC4\uB3C4 \uC124\uC815 \uC5C6\uC774 \uAE30\uBCF8 \u{1F917} Accelerate \uD658\uACBD\uC744 \uC124\uCE58\uD558\uB824\uBA74 \uB2E4\uC74C\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4:"),qe=M(),y(gl.$$.fragment),Pe=M(),Bt=p("p"),Aa=r("\uB610\uB294 \uD604\uC7AC \uD658\uACBD\uC774 \uB178\uD2B8\uBD81\uACFC \uAC19\uC740 \uB300\uD654\uD615 \uC178\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uACBD\uC6B0 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Ke=M(),y(kl.$$.fragment),ls=M(),Yl=p("h2"),Da=r("\uD30C\uC778\uD29C\uB2DD"),ts=M(),y(fl.$$.fragment),es=M(),y(Ml.$$.fragment),ss=M(),P=p("h3"),cl=p("a"),le=p("span"),y(xl.$$.fragment),ga=M(),te=p("span"),ka=r("Prior-preserving(\uC0AC\uC804 \uBCF4\uC874) loss\uB97C \uC0AC\uC6A9\uD55C \uD30C\uC778\uD29C\uB2DD"),as=M(),hl=p("p"),Ya=r("\uACFC\uC801\uD569\uACFC language drift\uB97C \uBC29\uC9C0\uD558\uAE30 \uC704\uD574 \uC0AC\uC804 \uBCF4\uC874\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4(\uAD00\uC2EC\uC774 \uC788\uB294 \uACBD\uC6B0 "),zl=p("a"),xa=r("\uB17C\uBB38"),za=r("\uC744 \uCC38\uC870\uD558\uC138\uC694).  \uC0AC\uC804 \uBCF4\uC874\uC744 \uC704\uD574 \uB3D9\uC77C\uD55C \uD074\uB798\uC2A4\uC758 \uB2E4\uB978 \uC774\uBBF8\uC9C0\uB97C \uD559\uC2B5 \uD504\uB85C\uC138\uC2A4\uC758 \uC77C\uBD80\uB85C \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uC88B\uC740 \uC810\uC740 Stable Diffusion \uBAA8\uB378 \uC790\uCCB4\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774\uB7EC\uD55C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4! \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB294 \uC0DD\uC131\uB41C \uC774\uBBF8\uC9C0\uB97C \uC6B0\uB9AC\uAC00 \uC9C0\uC815\uD55C \uB85C\uCEEC \uACBD\uB85C\uC5D0 \uC800\uC7A5\uD569\uB2C8\uB2E4."),rs=M(),Jl=p("p"),Oa=r("\uC800\uC790\uB4E4\uC5D0 \uB530\uB974\uBA74 \uC0AC\uC804 \uBCF4\uC874\uC744 \uC704\uD574 "),ee=p("code"),La=r("num_epochs * num_samples"),Ha=r("\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. 200-300\uAC1C\uC5D0\uC11C \uB300\uBD80\uBD84 \uC798 \uC791\uB3D9\uD569\uB2C8\uB2E4."),os=M(),y(ml.$$.fragment),ps=M(),K=p("h2"),ul=p("a"),se=p("span"),y(Ol.$$.fragment),qa=M(),ae=p("span"),Pa=r("\uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354\uC640 and UNet\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uAE30"),ns=M(),A=p("p"),Ka=r("\uD574\uB2F9 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC0AC\uC6A9\uD558\uBA74 "),re=p("code"),lr=r("unet"),tr=r("\uACFC \uD568\uAED8 "),oe=p("code"),er=r("text_encoder"),sr=r("\uB97C \uD30C\uC778\uD29C\uB2DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC2E4\uD5D8\uC5D0\uC11C(\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),Ll=p("a"),ar=r("\u{1F9E8} Diffusers\uB97C \uC0AC\uC6A9\uD574 DreamBooth\uB85C Stable Diffusion \uD559\uC2B5\uD558\uAE30"),rr=r(" \uAC8C\uC2DC\uBB3C\uC744 \uD655\uC778\uD558\uC138\uC694), \uD2B9\uD788 \uC5BC\uAD74 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uB54C \uD6E8\uC52C \uB354 \uB098\uC740 \uACB0\uACFC\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),is=M(),y(yl.$$.fragment),Us=M(),Y=p("p"),pe=p("code"),or=r("--train_text_encoder"),pr=r(" \uC778\uC218\uB97C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uC804\uB2EC\uD558\uC5EC "),ne=p("code"),nr=r("text_encoder"),ir=r(" \uBC0F "),ie=p("code"),Ur=r("unet"),fr=r("\uC744 \uD30C\uC778\uD29C\uB2DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),fs=M(),y(Tl.$$.fragment),Ms=M(),ll=p("h2"),dl=p("a"),Ue=p("span"),y(Hl.$$.fragment),Mr=M(),fe=p("span"),cr=r("LoRA\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uAE30"),cs=M(),_l=p("p"),hr=r("DreamBooth\uC5D0\uC11C \uB300\uADDC\uBAA8 \uBAA8\uB378\uC758 \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 "),Gt=p("a"),Jr=r("LoRA \uD559\uC2B5"),mr=r(" \uAC00\uC774\uB4DC\uB97C \uCC38\uC870\uD558\uC138\uC694."),hs=M(),ql=p("h3"),ur=r("\uD559\uC2B5 \uC911 \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC800\uC7A5\uD558\uAE30"),Js=M(),Xt=p("p"),yr=r("Dreambooth\uB85C \uD6C8\uB828\uD558\uB294 \uB3D9\uC548 \uACFC\uC801\uD569\uD558\uAE30 \uC26C\uC6B0\uBBC0\uB85C, \uB54C\uB54C\uB85C \uD559\uC2B5 \uC911\uC5D0 \uC815\uAE30\uC801\uC778 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC800\uC7A5\uD558\uB294 \uAC83\uC774 \uC720\uC6A9\uD569\uB2C8\uB2E4. \uC911\uAC04 \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC911 \uD558\uB098\uAC00 \uCD5C\uC885 \uBAA8\uB378\uBCF4\uB2E4 \uB354 \uC798 \uC791\uB3D9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4! \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC800\uC7A5 \uAE30\uB2A5\uC744 \uD65C\uC131\uD654\uD558\uB824\uBA74 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uC804\uB2EC\uD574\uC57C \uD569\uB2C8\uB2E4:"),ms=M(),y(Pl.$$.fragment),us=M(),D=p("p"),Tr=r("\uC774\uB807\uAC8C \uD558\uBA74 "),Me=p("code"),dr=r("output_dir"),_r=r("\uC758 \uD558\uC704 \uD3F4\uB354\uC5D0 \uC804\uCCB4 \uD559\uC2B5 \uC0C1\uD0DC\uAC00 \uC800\uC7A5\uB429\uB2C8\uB2E4. \uD558\uC704 \uD3F4\uB354 \uC774\uB984\uC740 \uC811\uB450\uC0AC "),ce=p("code"),br=r("checkpoint-"),wr=r("\uB85C \uC2DC\uC791\uD558\uACE0 \uC9C0\uAE08\uAE4C\uC9C0 \uC218\uD589\uB41C step \uC218\uC785\uB2C8\uB2E4. \uC608\uC2DC\uB85C "),he=p("code"),Er=r("checkpoint-1500"),Rr=r("\uC740 1500 \uD559\uC2B5 step \uD6C4\uC5D0 \uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC785\uB2C8\uB2E4."),ys=M(),Kl=p("h4"),Vr=r("\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uD6C8\uB828 \uC7AC\uAC1C\uD558\uAE30"),Ts=M(),O=p("p"),Cr=r("\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uD6C8\uB828\uC744 \uC7AC\uAC1C\uD558\uB824\uBA74, "),Je=p("code"),jr=r("--resume_from_checkpoint"),Ir=r(" \uC778\uC218\uB97C \uC804\uB2EC\uD55C \uB2E4\uC74C \uC0AC\uC6A9\uD560 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC758 \uC774\uB984\uC744 \uC9C0\uC815\uD558\uBA74 \uB429\uB2C8\uB2E4. \uD2B9\uC218 \uBB38\uC790\uC5F4 "),me=p("code"),$r=r('"latest"'),Qr=r("\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC800\uC7A5\uB41C \uB9C8\uC9C0\uB9C9 \uCCB4\uD06C\uD3EC\uC778\uD2B8(\uC989, step \uC218\uAC00 \uAC00\uC7A5 \uB9CE\uC740 \uCCB4\uD06C\uD3EC\uC778\uD2B8)\uC5D0\uC11C \uC7AC\uAC1C\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4 \uB2E4\uC74C\uC740 1500 step \uD6C4\uC5D0 \uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C\uBD80\uD130 \uD559\uC2B5\uC744 \uC7AC\uAC1C\uD569\uB2C8\uB2E4:"),ds=M(),y(lt.$$.fragment),_s=M(),St=p("p"),Nr=r("\uC6D0\uD558\uB294 \uACBD\uC6B0 \uC77C\uBD80 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC870\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),bs=M(),tt=p("h4"),vr=r("\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860 \uC218\uD589\uD558\uAE30"),ws=M(),Zt=p("p"),Br=r("\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB294 \uD6C8\uB828 \uC7AC\uAC1C\uC5D0 \uC801\uD569\uD55C \uD615\uC2DD\uC73C\uB85C \uC800\uC7A5\uB429\uB2C8\uB2E4. \uC5EC\uAE30\uC5D0\uB294 \uBAA8\uB378 \uAC00\uC911\uCE58\uBFD0\uB9CC \uC544\uB2C8\uB77C \uC635\uD2F0\uB9C8\uC774\uC800, \uB370\uC774\uD130 \uB85C\uB354 \uBC0F \uD559\uC2B5\uB960\uC758 \uC0C1\uD0DC\uB3C4 \uD3EC\uD568\uB429\uB2C8\uB2E4."),Es=M(),et=p("p"),ue=p("strong"),ye=p("code"),Gr=r('"accelerate>=0.16.0"'),Xr=r("\uC774 \uC124\uCE58\uB41C \uACBD\uC6B0 \uB2E4\uC74C \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC911\uAC04 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uCD94\uB860\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4."),Rs=M(),y(st.$$.fragment),Vs=M(),bl=p("p"),Sr=r("If you have "),Te=p("strong"),de=p("code"),Zr=r('"accelerate<0.16.0"'),Fr=r(" installed, you need to convert it to an inference pipeline first:"),Cs=M(),y(at.$$.fragment),js=M(),tl=p("h2"),wl=p("a"),_e=p("span"),y(rt.$$.fragment),Wr=M(),be=p("span"),Ar=r("\uAC01 GPU \uC6A9\uB7C9\uC5D0\uC11C\uC758 \uCD5C\uC801\uD654"),Is=M(),Ft=p("p"),Dr=r("\uD558\uB4DC\uC6E8\uC5B4\uC5D0 \uB530\uB77C 16GB\uC5D0\uC11C 8GB\uAE4C\uC9C0 GPU\uC5D0\uC11C DreamBooth\uB97C \uCD5C\uC801\uD654\uD558\uB294 \uBA87 \uAC00\uC9C0 \uBC29\uBC95\uC774 \uC788\uC2B5\uB2C8\uB2E4!"),$s=M(),el=p("h3"),El=p("a"),we=p("span"),y(ot.$$.fragment),gr=M(),Ee=p("span"),kr=r("xFormers"),Qs=M(),x=p("p"),pt=p("a"),Yr=r("xFormers"),xr=r("\uB294 Transformers\uB97C \uCD5C\uC801\uD654\uD558\uAE30 \uC704\uD55C toolbox\uC774\uBA70, \u{1F9E8} Diffusers\uC5D0\uC11C \uC0AC\uC6A9\uB418\uB294"),nt=p("a"),zr=r("memory-efficient attention"),Or=r("  \uBA54\uCEE4\uB2C8\uC998\uC744 \uD3EC\uD568\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4. "),Wt=p("a"),Lr=r("xFormers\uB97C \uC124\uCE58"),Hr=r("\uD55C \uB2E4\uC74C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uCD94\uAC00\uD569\uB2C8\uB2E4:"),Ns=M(),y(it.$$.fragment),vs=M(),At=p("p"),qr=r("xFormers\uB294 Flax\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."),Bs=M(),Ut=p("h3"),Pr=r("\uADF8\uB798\uB514\uC5B8\uD2B8 \uC5C6\uC74C\uC73C\uB85C \uC124\uC815"),Gs=M(),g=p("p"),Kr=r("\uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9\uC744 \uC904\uC77C \uC218 \uC788\uB294 \uB610 \uB2E4\uB978 \uBC29\uBC95\uC740 "),ft=p("a"),lo=r("\uAE30\uC6B8\uAE30 \uC124\uC815"),to=r("\uC744 0 \uB300\uC2E0 "),Re=p("code"),eo=r("None"),so=r("\uC73C\uB85C \uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uC774\uB85C \uC778\uD574 \uD2B9\uC815 \uB3D9\uC791\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC73C\uBBC0\uB85C \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD558\uBA74 \uC774 \uC778\uC218\uB97C \uC81C\uAC70\uD574 \uBCF4\uC2ED\uC2DC\uC624. \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uCD94\uAC00\uD558\uC5EC \uADF8\uB798\uB514\uC5B8\uD2B8\uB97C "),Ve=p("code"),ao=r("None"),ro=r("\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4."),Xs=M(),y(Mt.$$.fragment),Ss=M(),sl=p("h3"),Rl=p("a"),Ce=p("span"),y(ct.$$.fragment),oo=M(),je=p("span"),po=r("16GB GPU"),Zs=M(),Vl=p("p"),no=r("Gradient checkpointing\uACFC "),ht=p("a"),io=r("bitsandbytes"),Uo=r("\uC758 8\uBE44\uD2B8 \uC635\uD2F0\uB9C8\uC774\uC800\uC758 \uB3C4\uC6C0\uC73C\uB85C, 16GB GPU\uC5D0\uC11C dreambooth\uB97C \uD6C8\uB828\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. bitsandbytes\uAC00 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694:"),Fs=M(),y(Jt.$$.fragment),Ws=M(),Cl=p("p"),fo=r("\uADF8 \uB2E4\uC74C, \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 "),Ie=p("code"),Mo=r("--use_8bit_adam"),co=r(" \uC635\uC158\uC744 \uBA85\uC2DC\uD569\uB2C8\uB2E4:"),As=M(),y(mt.$$.fragment),Ds=M(),al=p("h3"),jl=p("a"),$e=p("span"),y(ut.$$.fragment),ho=M(),Qe=p("span"),Jo=r("12GB GPU"),gs=M(),Il=p("p"),mo=r("12GB GPU\uC5D0\uC11C DreamBooth\uB97C \uC2E4\uD589\uD558\uB824\uBA74 gradient checkpointing, 8\uBE44\uD2B8 \uC635\uD2F0\uB9C8\uC774\uC800, xFormers\uB97C \uD65C\uC131\uD654\uD558\uACE0 \uADF8\uB798\uB514\uC5B8\uD2B8\uB97C "),Ne=p("code"),uo=r("None"),yo=r("\uC73C\uB85C \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4."),ks=M(),y(yt.$$.fragment),Ys=M(),rl=p("h3"),$l=p("a"),ve=p("span"),y(Tt.$$.fragment),To=M(),Be=p("span"),_o=r("8GB GPU\uC5D0\uC11C \uD559\uC2B5\uD558\uAE30"),xs=M(),Ql=p("p"),bo=r("8GB GPU\uC5D0 \uB300\uD574\uC11C\uB294 "),dt=p("a"),wo=r("DeepSpeed"),Eo=r("\uB97C \uC0AC\uC6A9\uD574 \uC77C\uBD80 \uD150\uC11C\uB97C VRAM\uC5D0\uC11C CPU \uB610\uB294 NVME\uB85C \uC624\uD504\uB85C\uB4DC\uD558\uC5EC \uB354 \uC801\uC740 GPU \uBA54\uBAA8\uB9AC\uB85C \uD559\uC2B5\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),zs=M(),Dt=p("p"),Ro=r("\u{1F917} Accelerate \uD658\uACBD\uC744 \uAD6C\uC131\uD558\uB824\uBA74 \uB2E4\uC74C \uBA85\uB839\uC744 \uC2E4\uD589\uD558\uC138\uC694:"),Os=M(),y(_t.$$.fragment),Ls=M(),Nl=p("p"),Vo=r(`\uD658\uACBD \uAD6C\uC131 \uC911\uC5D0 DeepSpeed\uB97C \uC0AC\uC6A9\uD560 \uAC83\uC744 \uD655\uC778\uD558\uC138\uC694.
\uADF8\uB7EC\uBA74 DeepSpeed stage 2, fp16 \uD63C\uD569 \uC815\uBC00\uB3C4\uB97C \uACB0\uD569\uD558\uACE0 \uBAA8\uB378 \uB9E4\uAC1C\uBCC0\uC218\uC640 \uC635\uD2F0\uB9C8\uC774\uC800 \uC0C1\uD0DC\uB97C \uBAA8\uB450 CPU\uB85C \uC624\uD504\uB85C\uB4DC\uD558\uBA74 8GB VRAM \uBBF8\uB9CC\uC5D0\uC11C \uD559\uC2B5\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uB2E8\uC810\uC740 \uB354 \uB9CE\uC740 \uC2DC\uC2A4\uD15C RAM(\uC57D 25GB)\uC774 \uD544\uC694\uD558\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4. \uCD94\uAC00 \uAD6C\uC131 \uC635\uC158\uC740 `),bt=p("a"),Co=r("DeepSpeed \uBB38\uC11C"),jo=r("\uB97C \uCC38\uC870\uD558\uC138\uC694."),Hs=M(),L=p("p"),Io=r(`\uB610\uD55C \uAE30\uBCF8 Adam \uC635\uD2F0\uB9C8\uC774\uC800\uB97C DeepSpeed\uC758 \uCD5C\uC801\uD654\uB41C Adam \uBC84\uC804\uC73C\uB85C \uBCC0\uACBD\uD574\uC57C \uD569\uB2C8\uB2E4.
\uC774\uB294 \uC0C1\uB2F9\uD55C \uC18D\uB3C4 \uD5A5\uC0C1\uC744 \uC704\uD55C Adam\uC778 `),wt=p("a"),Ge=p("code"),$o=r("deepspeed.ops.adam.DeepSpeedCPUAdam"),Qo=r(`\uC785\uB2C8\uB2E4.
`),Xe=p("code"),No=r("DeepSpeedCPUAdam"),vo=r("\uC744 \uD65C\uC131\uD654\uD558\uB824\uBA74 \uC2DC\uC2A4\uD15C\uC758 CUDA toolchain \uBC84\uC804\uC774 PyTorch\uC640 \uD568\uAED8 \uC124\uCE58\uB41C \uAC83\uACFC \uB3D9\uC77C\uD574\uC57C \uD569\uB2C8\uB2E4."),qs=M(),gt=p("p"),Bo=r("8\uBE44\uD2B8 \uC635\uD2F0\uB9C8\uC774\uC800\uB294 \uD604\uC7AC DeepSpeed\uC640 \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4."),Ps=M(),kt=p("p"),Go=r("\uB2E4\uC74C \uBA85\uB839\uC73C\uB85C \uD559\uC2B5\uC744 \uC2DC\uC791\uD569\uB2C8\uB2E4:"),Ks=M(),y(Et.$$.fragment),la=M(),Rt=p("h2"),Xo=r("\uCD94\uB860"),ta=M(),k=p("p"),So=r("\uBAA8\uB378\uC744 \uD559\uC2B5\uD55C \uD6C4\uC5D0\uB294, \uBAA8\uB378\uC774 \uC800\uC7A5\uB41C \uACBD\uB85C\uB97C \uC9C0\uC815\uD574 "),Se=p("code"),Zo=r("StableDiffusionPipeline"),Fo=r("\uB85C \uCD94\uB860\uC744 \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD504\uB86C\uD504\uD2B8\uC5D0 \uD559\uC2B5\uC5D0 \uC0AC\uC6A9\uB41C \uD2B9\uC218 "),Ze=p("code"),Wo=r("\uC2DD\uBCC4\uC790"),Ao=r("(\uC774\uC804 \uC608\uC2DC\uC758 "),Fe=p("code"),Do=r("sks"),go=r(")\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694."),ea=M(),Vt=p("p"),We=p("strong"),Ae=p("code"),ko=r('"accelerate>=0.16.0"'),Yo=r("\uC774 \uC124\uCE58\uB418\uC5B4 \uC788\uB294 \uACBD\uC6B0 \uB2E4\uC74C \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC911\uAC04 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uCD94\uB860\uC744 \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),sa=M(),y(Ct.$$.fragment),aa=M(),jt=p("p"),Yt=p("a"),xo=r("\uC800\uC7A5\uB41C \uD559\uC2B5 \uCCB4\uD06C\uD3EC\uC778\uD2B8"),zo=r("\uC5D0\uC11C\uB3C4 \uCD94\uB860\uC744 \uC2E4\uD589\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),this.h()},l(l){const s=Sn('[data-svelte="svelte-1phssyn"]',document.head);f=n(s,"META",{name:!0,content:!0}),s.forEach(t),J=c(l),a=n(l,"H1",{class:!0});var It=U(a);m=n(It,"A",{id:!0,class:!0,href:!0});var De=U(m);E=n(De,"SPAN",{});var ge=U(E);T(I.$$.fragment,ge),ge.forEach(t),De.forEach(t),Q=c(It),B=n(It,"SPAN",{});var ke=U(B);X=o(ke,"DreamBooth"),ke.forEach(t),It.forEach(t),G=c(l),N=n(l,"P",{});var xt=U(N);v=n(xt,"A",{href:!0,rel:!0});var Ko=U(v);F=o(Ko,"DreamBooth"),Ko.forEach(t),W=o(xt,"\uB294 \uD55C \uC8FC\uC81C\uC5D0 \uB300\uD55C \uC801\uC740 \uC774\uBBF8\uC9C0(3~5\uAC1C)\uB9CC\uC73C\uB85C\uB3C4 stable diffusion\uACFC \uAC19\uC774 text-to-image \uBAA8\uB378\uC744 \uAC1C\uC778\uD654\uD560 \uC218 \uC788\uB294 \uBC29\uBC95\uC785\uB2C8\uB2E4. \uC774\uB97C \uD1B5\uD574 \uBAA8\uB378\uC740 \uB2E4\uC591\uD55C \uC7A5\uBA74, \uD3EC\uC988 \uBC0F \uC7A5\uBA74(\uBDF0)\uC5D0\uC11C \uD53C\uC0AC\uCCB4\uC5D0 \uB300\uD574 \uB9E5\uB77D\uD654(contextualized)\uB41C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),xt.forEach(t),S=c(l),Z=n(l,"P",{});var lp=U(Z);u=n(lp,"IMG",{src:!0,alt:!0}),lp.forEach(t),R=c(l),C=n(l,"SMALL",{});var Oo=U(C);H=o(Oo,"\uC5D0\uC11C\uC758 Dreambooth \uC608\uC2DC "),q=n(Oo,"A",{href:!0});var tp=U(q);pl=o(tp,"project's blog."),tp.forEach(t),Oo.forEach(t),Sl=c(l),z=n(l,"P",{});var zt=U(z);Va=o(zt,"\uC774 \uAC00\uC774\uB4DC\uB294 \uB2E4\uC591\uD55C GPU, Flax \uC0AC\uC591\uC5D0 \uB300\uD574 "),Zl=n(zt,"A",{href:!0,rel:!0});var ep=U(Zl);Pt=n(ep,"CODE",{});var sp=U(Pt);Ca=o(sp,"CompVis/stable-diffusion-v1-4"),sp.forEach(t),ep.forEach(t),ja=o(zt," \uBAA8\uB378\uB85C DreamBooth\uB97C \uD30C\uC778\uD29C\uB2DD\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. \uB354 \uAE4A\uC774 \uD30C\uACE0\uB4E4\uC5B4 \uC791\uB3D9 \uBC29\uC2DD\uC744 \uD655\uC778\uD558\uB294 \uB370 \uAD00\uC2EC\uC774 \uC788\uB294 \uACBD\uC6B0, \uC774 \uAC00\uC774\uB4DC\uC5D0 \uC0AC\uC6A9\uB41C DreamBooth\uC758 \uBAA8\uB4E0 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB97C "),Fl=n(zt,"A",{href:!0,rel:!0});var ap=U(Fl);Ia=o(ap,"\uC5EC\uAE30"),ap.forEach(t),$a=o(zt,"\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),zt.forEach(t),Ye=c(l),nl=n(l,"P",{});var oa=U(nl);Qa=o(oa,"\uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD558\uAE30 \uC804\uC5D0 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC758 \uD559\uC2B5\uC5D0 \uD544\uC694\uD55C dependencies\uB97C \uC124\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4. \uB610\uD55C "),Kt=n(oa,"CODE",{});var rp=U(Kt);Na=o(rp,"main"),rp.forEach(t),va=o(oa," GitHub \uBE0C\uB79C\uCE58\uC5D0\uC11C \u{1F9E8} Diffusers\uB97C \uC124\uCE58\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4."),oa.forEach(t),xe=c(l),T(Wl.$$.fragment,l),ze=c(l),il=n(l,"P",{});var pa=U(il);Ba=o(pa,"xFormers\uB294 \uD559\uC2B5\uC5D0 \uD544\uC694\uD55C \uC694\uAD6C \uC0AC\uD56D\uC740 \uC544\uB2C8\uC9C0\uB9CC, \uAC00\uB2A5\uD558\uBA74 "),Nt=n(pa,"A",{href:!0});var op=U(Nt);Ga=o(op,"\uC124\uCE58"),op.forEach(t),Xa=o(pa,"\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uD559\uC2B5 \uC18D\uB3C4\uB97C \uB192\uC774\uACE0 \uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9\uC744 \uC904\uC77C \uC218 \uC788\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."),pa.forEach(t),Oe=c(l),Ul=n(l,"P",{});var na=U(Ul);Sa=o(na,"\uBAA8\uB4E0 dependencies\uC744 \uC124\uC815\uD55C \uD6C4 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD558\uC5EC "),Al=n(na,"A",{href:!0,rel:!0});var pp=U(Al);Za=o(pp,"\u{1F917} Accelerate"),pp.forEach(t),Fa=o(na," \uD658\uACBD\uC744 \uB2E4\uC74C\uACFC \uAC19\uC774 \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4:"),na.forEach(t),Le=c(l),T(Dl.$$.fragment,l),He=c(l),vt=n(l,"P",{});var np=U(vt);Wa=o(np,"\uBCC4\uB3C4 \uC124\uC815 \uC5C6\uC774 \uAE30\uBCF8 \u{1F917} Accelerate \uD658\uACBD\uC744 \uC124\uCE58\uD558\uB824\uBA74 \uB2E4\uC74C\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4:"),np.forEach(t),qe=c(l),T(gl.$$.fragment,l),Pe=c(l),Bt=n(l,"P",{});var ip=U(Bt);Aa=o(ip,"\uB610\uB294 \uD604\uC7AC \uD658\uACBD\uC774 \uB178\uD2B8\uBD81\uACFC \uAC19\uC740 \uB300\uD654\uD615 \uC178\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uACBD\uC6B0 \uB2E4\uC74C\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),ip.forEach(t),Ke=c(l),T(kl.$$.fragment,l),ls=c(l),Yl=n(l,"H2",{id:!0});var Up=U(Yl);Da=o(Up,"\uD30C\uC778\uD29C\uB2DD"),Up.forEach(t),ts=c(l),T(fl.$$.fragment,l),es=c(l),T(Ml.$$.fragment,l),ss=c(l),P=n(l,"H3",{class:!0});var ia=U(P);cl=n(ia,"A",{id:!0,class:!0,href:!0});var fp=U(cl);le=n(fp,"SPAN",{});var Mp=U(le);T(xl.$$.fragment,Mp),Mp.forEach(t),fp.forEach(t),ga=c(ia),te=n(ia,"SPAN",{});var cp=U(te);ka=o(cp,"Prior-preserving(\uC0AC\uC804 \uBCF4\uC874) loss\uB97C \uC0AC\uC6A9\uD55C \uD30C\uC778\uD29C\uB2DD"),cp.forEach(t),ia.forEach(t),as=c(l),hl=n(l,"P",{});var Ua=U(hl);Ya=o(Ua,"\uACFC\uC801\uD569\uACFC language drift\uB97C \uBC29\uC9C0\uD558\uAE30 \uC704\uD574 \uC0AC\uC804 \uBCF4\uC874\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4(\uAD00\uC2EC\uC774 \uC788\uB294 \uACBD\uC6B0 "),zl=n(Ua,"A",{href:!0,rel:!0});var hp=U(zl);xa=o(hp,"\uB17C\uBB38"),hp.forEach(t),za=o(Ua,"\uC744 \uCC38\uC870\uD558\uC138\uC694).  \uC0AC\uC804 \uBCF4\uC874\uC744 \uC704\uD574 \uB3D9\uC77C\uD55C \uD074\uB798\uC2A4\uC758 \uB2E4\uB978 \uC774\uBBF8\uC9C0\uB97C \uD559\uC2B5 \uD504\uB85C\uC138\uC2A4\uC758 \uC77C\uBD80\uB85C \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uC88B\uC740 \uC810\uC740 Stable Diffusion \uBAA8\uB378 \uC790\uCCB4\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774\uB7EC\uD55C \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4! \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uB294 \uC0DD\uC131\uB41C \uC774\uBBF8\uC9C0\uB97C \uC6B0\uB9AC\uAC00 \uC9C0\uC815\uD55C \uB85C\uCEEC \uACBD\uB85C\uC5D0 \uC800\uC7A5\uD569\uB2C8\uB2E4."),Ua.forEach(t),rs=c(l),Jl=n(l,"P",{});var fa=U(Jl);Oa=o(fa,"\uC800\uC790\uB4E4\uC5D0 \uB530\uB974\uBA74 \uC0AC\uC804 \uBCF4\uC874\uC744 \uC704\uD574 "),ee=n(fa,"CODE",{});var Jp=U(ee);La=o(Jp,"num_epochs * num_samples"),Jp.forEach(t),Ha=o(fa,"\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. 200-300\uAC1C\uC5D0\uC11C \uB300\uBD80\uBD84 \uC798 \uC791\uB3D9\uD569\uB2C8\uB2E4."),fa.forEach(t),os=c(l),T(ml.$$.fragment,l),ps=c(l),K=n(l,"H2",{class:!0});var Ma=U(K);ul=n(Ma,"A",{id:!0,class:!0,href:!0});var mp=U(ul);se=n(mp,"SPAN",{});var up=U(se);T(Ol.$$.fragment,up),up.forEach(t),mp.forEach(t),qa=c(Ma),ae=n(Ma,"SPAN",{});var yp=U(ae);Pa=o(yp,"\uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354\uC640 and UNet\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uAE30"),yp.forEach(t),Ma.forEach(t),ns=c(l),A=n(l,"P",{});var vl=U(A);Ka=o(vl,"\uD574\uB2F9 \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC0AC\uC6A9\uD558\uBA74 "),re=n(vl,"CODE",{});var Tp=U(re);lr=o(Tp,"unet"),Tp.forEach(t),tr=o(vl,"\uACFC \uD568\uAED8 "),oe=n(vl,"CODE",{});var dp=U(oe);er=o(dp,"text_encoder"),dp.forEach(t),sr=o(vl,"\uB97C \uD30C\uC778\uD29C\uB2DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC2E4\uD5D8\uC5D0\uC11C(\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),Ll=n(vl,"A",{href:!0,rel:!0});var _p=U(Ll);ar=o(_p,"\u{1F9E8} Diffusers\uB97C \uC0AC\uC6A9\uD574 DreamBooth\uB85C Stable Diffusion \uD559\uC2B5\uD558\uAE30"),_p.forEach(t),rr=o(vl," \uAC8C\uC2DC\uBB3C\uC744 \uD655\uC778\uD558\uC138\uC694), \uD2B9\uD788 \uC5BC\uAD74 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uC131\uD560 \uB54C \uD6E8\uC52C \uB354 \uB098\uC740 \uACB0\uACFC\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),vl.forEach(t),is=c(l),T(yl.$$.fragment,l),Us=c(l),Y=n(l,"P",{});var $t=U(Y);pe=n($t,"CODE",{});var bp=U(pe);or=o(bp,"--train_text_encoder"),bp.forEach(t),pr=o($t," \uC778\uC218\uB97C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uC804\uB2EC\uD558\uC5EC "),ne=n($t,"CODE",{});var wp=U(ne);nr=o(wp,"text_encoder"),wp.forEach(t),ir=o($t," \uBC0F "),ie=n($t,"CODE",{});var Ep=U(ie);Ur=o(Ep,"unet"),Ep.forEach(t),fr=o($t,"\uC744 \uD30C\uC778\uD29C\uB2DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),$t.forEach(t),fs=c(l),T(Tl.$$.fragment,l),Ms=c(l),ll=n(l,"H2",{class:!0});var ca=U(ll);dl=n(ca,"A",{id:!0,class:!0,href:!0});var Rp=U(dl);Ue=n(Rp,"SPAN",{});var Vp=U(Ue);T(Hl.$$.fragment,Vp),Vp.forEach(t),Rp.forEach(t),Mr=c(ca),fe=n(ca,"SPAN",{});var Cp=U(fe);cr=o(Cp,"LoRA\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uAE30"),Cp.forEach(t),ca.forEach(t),cs=c(l),_l=n(l,"P",{});var ha=U(_l);hr=o(ha,"DreamBooth\uC5D0\uC11C \uB300\uADDC\uBAA8 \uBAA8\uB378\uC758 \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 "),Gt=n(ha,"A",{href:!0});var jp=U(Gt);Jr=o(jp,"LoRA \uD559\uC2B5"),jp.forEach(t),mr=o(ha," \uAC00\uC774\uB4DC\uB97C \uCC38\uC870\uD558\uC138\uC694."),ha.forEach(t),hs=c(l),ql=n(l,"H3",{id:!0});var Ip=U(ql);ur=o(Ip,"\uD559\uC2B5 \uC911 \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC800\uC7A5\uD558\uAE30"),Ip.forEach(t),Js=c(l),Xt=n(l,"P",{});var $p=U(Xt);yr=o($p,"Dreambooth\uB85C \uD6C8\uB828\uD558\uB294 \uB3D9\uC548 \uACFC\uC801\uD569\uD558\uAE30 \uC26C\uC6B0\uBBC0\uB85C, \uB54C\uB54C\uB85C \uD559\uC2B5 \uC911\uC5D0 \uC815\uAE30\uC801\uC778 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC800\uC7A5\uD558\uB294 \uAC83\uC774 \uC720\uC6A9\uD569\uB2C8\uB2E4. \uC911\uAC04 \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC911 \uD558\uB098\uAC00 \uCD5C\uC885 \uBAA8\uB378\uBCF4\uB2E4 \uB354 \uC798 \uC791\uB3D9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4! \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC800\uC7A5 \uAE30\uB2A5\uC744 \uD65C\uC131\uD654\uD558\uB824\uBA74 \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uC804\uB2EC\uD574\uC57C \uD569\uB2C8\uB2E4:"),$p.forEach(t),ms=c(l),T(Pl.$$.fragment,l),us=c(l),D=n(l,"P",{});var Bl=U(D);Tr=o(Bl,"\uC774\uB807\uAC8C \uD558\uBA74 "),Me=n(Bl,"CODE",{});var Qp=U(Me);dr=o(Qp,"output_dir"),Qp.forEach(t),_r=o(Bl,"\uC758 \uD558\uC704 \uD3F4\uB354\uC5D0 \uC804\uCCB4 \uD559\uC2B5 \uC0C1\uD0DC\uAC00 \uC800\uC7A5\uB429\uB2C8\uB2E4. \uD558\uC704 \uD3F4\uB354 \uC774\uB984\uC740 \uC811\uB450\uC0AC "),ce=n(Bl,"CODE",{});var Np=U(ce);br=o(Np,"checkpoint-"),Np.forEach(t),wr=o(Bl,"\uB85C \uC2DC\uC791\uD558\uACE0 \uC9C0\uAE08\uAE4C\uC9C0 \uC218\uD589\uB41C step \uC218\uC785\uB2C8\uB2E4. \uC608\uC2DC\uB85C "),he=n(Bl,"CODE",{});var vp=U(he);Er=o(vp,"checkpoint-1500"),vp.forEach(t),Rr=o(Bl,"\uC740 1500 \uD559\uC2B5 step \uD6C4\uC5D0 \uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC785\uB2C8\uB2E4."),Bl.forEach(t),ys=c(l),Kl=n(l,"H4",{id:!0});var Bp=U(Kl);Vr=o(Bp,"\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uD6C8\uB828 \uC7AC\uAC1C\uD558\uAE30"),Bp.forEach(t),Ts=c(l),O=n(l,"P",{});var Ot=U(O);Cr=o(Ot,"\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uD6C8\uB828\uC744 \uC7AC\uAC1C\uD558\uB824\uBA74, "),Je=n(Ot,"CODE",{});var Gp=U(Je);jr=o(Gp,"--resume_from_checkpoint"),Gp.forEach(t),Ir=o(Ot," \uC778\uC218\uB97C \uC804\uB2EC\uD55C \uB2E4\uC74C \uC0AC\uC6A9\uD560 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC758 \uC774\uB984\uC744 \uC9C0\uC815\uD558\uBA74 \uB429\uB2C8\uB2E4. \uD2B9\uC218 \uBB38\uC790\uC5F4 "),me=n(Ot,"CODE",{});var Xp=U(me);$r=o(Xp,'"latest"'),Xp.forEach(t),Qr=o(Ot,"\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC800\uC7A5\uB41C \uB9C8\uC9C0\uB9C9 \uCCB4\uD06C\uD3EC\uC778\uD2B8(\uC989, step \uC218\uAC00 \uAC00\uC7A5 \uB9CE\uC740 \uCCB4\uD06C\uD3EC\uC778\uD2B8)\uC5D0\uC11C \uC7AC\uAC1C\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4 \uB2E4\uC74C\uC740 1500 step \uD6C4\uC5D0 \uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C\uBD80\uD130 \uD559\uC2B5\uC744 \uC7AC\uAC1C\uD569\uB2C8\uB2E4:"),Ot.forEach(t),ds=c(l),T(lt.$$.fragment,l),_s=c(l),St=n(l,"P",{});var Sp=U(St);Nr=o(Sp,"\uC6D0\uD558\uB294 \uACBD\uC6B0 \uC77C\uBD80 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC870\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Sp.forEach(t),bs=c(l),tt=n(l,"H4",{id:!0});var Zp=U(tt);vr=o(Zp,"\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860 \uC218\uD589\uD558\uAE30"),Zp.forEach(t),ws=c(l),Zt=n(l,"P",{});var Fp=U(Zt);Br=o(Fp,"\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB294 \uD6C8\uB828 \uC7AC\uAC1C\uC5D0 \uC801\uD569\uD55C \uD615\uC2DD\uC73C\uB85C \uC800\uC7A5\uB429\uB2C8\uB2E4. \uC5EC\uAE30\uC5D0\uB294 \uBAA8\uB378 \uAC00\uC911\uCE58\uBFD0\uB9CC \uC544\uB2C8\uB77C \uC635\uD2F0\uB9C8\uC774\uC800, \uB370\uC774\uD130 \uB85C\uB354 \uBC0F \uD559\uC2B5\uB960\uC758 \uC0C1\uD0DC\uB3C4 \uD3EC\uD568\uB429\uB2C8\uB2E4."),Fp.forEach(t),Es=c(l),et=n(l,"P",{});var Lo=U(et);ue=n(Lo,"STRONG",{});var Wp=U(ue);ye=n(Wp,"CODE",{});var Ap=U(ye);Gr=o(Ap,'"accelerate>=0.16.0"'),Ap.forEach(t),Wp.forEach(t),Xr=o(Lo,"\uC774 \uC124\uCE58\uB41C \uACBD\uC6B0 \uB2E4\uC74C \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC911\uAC04 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uCD94\uB860\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4."),Lo.forEach(t),Rs=c(l),T(st.$$.fragment,l),Vs=c(l),bl=n(l,"P",{});var Ja=U(bl);Sr=o(Ja,"If you have "),Te=n(Ja,"STRONG",{});var Dp=U(Te);de=n(Dp,"CODE",{});var gp=U(de);Zr=o(gp,'"accelerate<0.16.0"'),gp.forEach(t),Dp.forEach(t),Fr=o(Ja," installed, you need to convert it to an inference pipeline first:"),Ja.forEach(t),Cs=c(l),T(at.$$.fragment,l),js=c(l),tl=n(l,"H2",{class:!0});var ma=U(tl);wl=n(ma,"A",{id:!0,class:!0,href:!0});var kp=U(wl);_e=n(kp,"SPAN",{});var Yp=U(_e);T(rt.$$.fragment,Yp),Yp.forEach(t),kp.forEach(t),Wr=c(ma),be=n(ma,"SPAN",{});var xp=U(be);Ar=o(xp,"\uAC01 GPU \uC6A9\uB7C9\uC5D0\uC11C\uC758 \uCD5C\uC801\uD654"),xp.forEach(t),ma.forEach(t),Is=c(l),Ft=n(l,"P",{});var zp=U(Ft);Dr=o(zp,"\uD558\uB4DC\uC6E8\uC5B4\uC5D0 \uB530\uB77C 16GB\uC5D0\uC11C 8GB\uAE4C\uC9C0 GPU\uC5D0\uC11C DreamBooth\uB97C \uCD5C\uC801\uD654\uD558\uB294 \uBA87 \uAC00\uC9C0 \uBC29\uBC95\uC774 \uC788\uC2B5\uB2C8\uB2E4!"),zp.forEach(t),$s=c(l),el=n(l,"H3",{class:!0});var ua=U(el);El=n(ua,"A",{id:!0,class:!0,href:!0});var Op=U(El);we=n(Op,"SPAN",{});var Lp=U(we);T(ot.$$.fragment,Lp),Lp.forEach(t),Op.forEach(t),gr=c(ua),Ee=n(ua,"SPAN",{});var Hp=U(Ee);kr=o(Hp,"xFormers"),Hp.forEach(t),ua.forEach(t),Qs=c(l),x=n(l,"P",{});var Qt=U(x);pt=n(Qt,"A",{href:!0,rel:!0});var qp=U(pt);Yr=o(qp,"xFormers"),qp.forEach(t),xr=o(Qt,"\uB294 Transformers\uB97C \uCD5C\uC801\uD654\uD558\uAE30 \uC704\uD55C toolbox\uC774\uBA70, \u{1F9E8} Diffusers\uC5D0\uC11C \uC0AC\uC6A9\uB418\uB294"),nt=n(Qt,"A",{href:!0,rel:!0});var Pp=U(nt);zr=o(Pp,"memory-efficient attention"),Pp.forEach(t),Or=o(Qt,"  \uBA54\uCEE4\uB2C8\uC998\uC744 \uD3EC\uD568\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4. "),Wt=n(Qt,"A",{href:!0});var Kp=U(Wt);Lr=o(Kp,"xFormers\uB97C \uC124\uCE58"),Kp.forEach(t),Hr=o(Qt,"\uD55C \uB2E4\uC74C \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uCD94\uAC00\uD569\uB2C8\uB2E4:"),Qt.forEach(t),Ns=c(l),T(it.$$.fragment,l),vs=c(l),At=n(l,"P",{});var ln=U(At);qr=o(ln,"xFormers\uB294 Flax\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."),ln.forEach(t),Bs=c(l),Ut=n(l,"H3",{id:!0});var tn=U(Ut);Pr=o(tn,"\uADF8\uB798\uB514\uC5B8\uD2B8 \uC5C6\uC74C\uC73C\uB85C \uC124\uC815"),tn.forEach(t),Gs=c(l),g=n(l,"P",{});var Gl=U(g);Kr=o(Gl,"\uBA54\uBAA8\uB9AC \uC0AC\uC6A9\uB7C9\uC744 \uC904\uC77C \uC218 \uC788\uB294 \uB610 \uB2E4\uB978 \uBC29\uBC95\uC740 "),ft=n(Gl,"A",{href:!0,rel:!0});var en=U(ft);lo=o(en,"\uAE30\uC6B8\uAE30 \uC124\uC815"),en.forEach(t),to=o(Gl,"\uC744 0 \uB300\uC2E0 "),Re=n(Gl,"CODE",{});var sn=U(Re);eo=o(sn,"None"),sn.forEach(t),so=o(Gl,"\uC73C\uB85C \uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uC774\uB85C \uC778\uD574 \uD2B9\uC815 \uB3D9\uC791\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC73C\uBBC0\uB85C \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD558\uBA74 \uC774 \uC778\uC218\uB97C \uC81C\uAC70\uD574 \uBCF4\uC2ED\uC2DC\uC624. \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 \uB2E4\uC74C \uC778\uC218\uB97C \uCD94\uAC00\uD558\uC5EC \uADF8\uB798\uB514\uC5B8\uD2B8\uB97C "),Ve=n(Gl,"CODE",{});var an=U(Ve);ao=o(an,"None"),an.forEach(t),ro=o(Gl,"\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4."),Gl.forEach(t),Xs=c(l),T(Mt.$$.fragment,l),Ss=c(l),sl=n(l,"H3",{class:!0});var ya=U(sl);Rl=n(ya,"A",{id:!0,class:!0,href:!0});var rn=U(Rl);Ce=n(rn,"SPAN",{});var on=U(Ce);T(ct.$$.fragment,on),on.forEach(t),rn.forEach(t),oo=c(ya),je=n(ya,"SPAN",{});var pn=U(je);po=o(pn,"16GB GPU"),pn.forEach(t),ya.forEach(t),Zs=c(l),Vl=n(l,"P",{});var Ta=U(Vl);no=o(Ta,"Gradient checkpointing\uACFC "),ht=n(Ta,"A",{href:!0,rel:!0});var nn=U(ht);io=o(nn,"bitsandbytes"),nn.forEach(t),Uo=o(Ta,"\uC758 8\uBE44\uD2B8 \uC635\uD2F0\uB9C8\uC774\uC800\uC758 \uB3C4\uC6C0\uC73C\uB85C, 16GB GPU\uC5D0\uC11C dreambooth\uB97C \uD6C8\uB828\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. bitsandbytes\uAC00 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694:"),Ta.forEach(t),Fs=c(l),T(Jt.$$.fragment,l),Ws=c(l),Cl=n(l,"P",{});var da=U(Cl);fo=o(da,"\uADF8 \uB2E4\uC74C, \uD559\uC2B5 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 "),Ie=n(da,"CODE",{});var Un=U(Ie);Mo=o(Un,"--use_8bit_adam"),Un.forEach(t),co=o(da," \uC635\uC158\uC744 \uBA85\uC2DC\uD569\uB2C8\uB2E4:"),da.forEach(t),As=c(l),T(mt.$$.fragment,l),Ds=c(l),al=n(l,"H3",{class:!0});var _a=U(al);jl=n(_a,"A",{id:!0,class:!0,href:!0});var fn=U(jl);$e=n(fn,"SPAN",{});var Mn=U($e);T(ut.$$.fragment,Mn),Mn.forEach(t),fn.forEach(t),ho=c(_a),Qe=n(_a,"SPAN",{});var cn=U(Qe);Jo=o(cn,"12GB GPU"),cn.forEach(t),_a.forEach(t),gs=c(l),Il=n(l,"P",{});var ba=U(Il);mo=o(ba,"12GB GPU\uC5D0\uC11C DreamBooth\uB97C \uC2E4\uD589\uD558\uB824\uBA74 gradient checkpointing, 8\uBE44\uD2B8 \uC635\uD2F0\uB9C8\uC774\uC800, xFormers\uB97C \uD65C\uC131\uD654\uD558\uACE0 \uADF8\uB798\uB514\uC5B8\uD2B8\uB97C "),Ne=n(ba,"CODE",{});var hn=U(Ne);uo=o(hn,"None"),hn.forEach(t),yo=o(ba,"\uC73C\uB85C \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4."),ba.forEach(t),ks=c(l),T(yt.$$.fragment,l),Ys=c(l),rl=n(l,"H3",{class:!0});var wa=U(rl);$l=n(wa,"A",{id:!0,class:!0,href:!0});var Jn=U($l);ve=n(Jn,"SPAN",{});var mn=U(ve);T(Tt.$$.fragment,mn),mn.forEach(t),Jn.forEach(t),To=c(wa),Be=n(wa,"SPAN",{});var un=U(Be);_o=o(un,"8GB GPU\uC5D0\uC11C \uD559\uC2B5\uD558\uAE30"),un.forEach(t),wa.forEach(t),xs=c(l),Ql=n(l,"P",{});var Ea=U(Ql);bo=o(Ea,"8GB GPU\uC5D0 \uB300\uD574\uC11C\uB294 "),dt=n(Ea,"A",{href:!0,rel:!0});var yn=U(dt);wo=o(yn,"DeepSpeed"),yn.forEach(t),Eo=o(Ea,"\uB97C \uC0AC\uC6A9\uD574 \uC77C\uBD80 \uD150\uC11C\uB97C VRAM\uC5D0\uC11C CPU \uB610\uB294 NVME\uB85C \uC624\uD504\uB85C\uB4DC\uD558\uC5EC \uB354 \uC801\uC740 GPU \uBA54\uBAA8\uB9AC\uB85C \uD559\uC2B5\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),Ea.forEach(t),zs=c(l),Dt=n(l,"P",{});var Tn=U(Dt);Ro=o(Tn,"\u{1F917} Accelerate \uD658\uACBD\uC744 \uAD6C\uC131\uD558\uB824\uBA74 \uB2E4\uC74C \uBA85\uB839\uC744 \uC2E4\uD589\uD558\uC138\uC694:"),Tn.forEach(t),Os=c(l),T(_t.$$.fragment,l),Ls=c(l),Nl=n(l,"P",{});var Ra=U(Nl);Vo=o(Ra,`\uD658\uACBD \uAD6C\uC131 \uC911\uC5D0 DeepSpeed\uB97C \uC0AC\uC6A9\uD560 \uAC83\uC744 \uD655\uC778\uD558\uC138\uC694.
\uADF8\uB7EC\uBA74 DeepSpeed stage 2, fp16 \uD63C\uD569 \uC815\uBC00\uB3C4\uB97C \uACB0\uD569\uD558\uACE0 \uBAA8\uB378 \uB9E4\uAC1C\uBCC0\uC218\uC640 \uC635\uD2F0\uB9C8\uC774\uC800 \uC0C1\uD0DC\uB97C \uBAA8\uB450 CPU\uB85C \uC624\uD504\uB85C\uB4DC\uD558\uBA74 8GB VRAM \uBBF8\uB9CC\uC5D0\uC11C \uD559\uC2B5\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uB2E8\uC810\uC740 \uB354 \uB9CE\uC740 \uC2DC\uC2A4\uD15C RAM(\uC57D 25GB)\uC774 \uD544\uC694\uD558\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4. \uCD94\uAC00 \uAD6C\uC131 \uC635\uC158\uC740 `),bt=n(Ra,"A",{href:!0,rel:!0});var dn=U(bt);Co=o(dn,"DeepSpeed \uBB38\uC11C"),dn.forEach(t),jo=o(Ra,"\uB97C \uCC38\uC870\uD558\uC138\uC694."),Ra.forEach(t),Hs=c(l),L=n(l,"P",{});var Lt=U(L);Io=o(Lt,`\uB610\uD55C \uAE30\uBCF8 Adam \uC635\uD2F0\uB9C8\uC774\uC800\uB97C DeepSpeed\uC758 \uCD5C\uC801\uD654\uB41C Adam \uBC84\uC804\uC73C\uB85C \uBCC0\uACBD\uD574\uC57C \uD569\uB2C8\uB2E4.
\uC774\uB294 \uC0C1\uB2F9\uD55C \uC18D\uB3C4 \uD5A5\uC0C1\uC744 \uC704\uD55C Adam\uC778 `),wt=n(Lt,"A",{href:!0,rel:!0});var _n=U(wt);Ge=n(_n,"CODE",{});var bn=U(Ge);$o=o(bn,"deepspeed.ops.adam.DeepSpeedCPUAdam"),bn.forEach(t),_n.forEach(t),Qo=o(Lt,`\uC785\uB2C8\uB2E4.
`),Xe=n(Lt,"CODE",{});var wn=U(Xe);No=o(wn,"DeepSpeedCPUAdam"),wn.forEach(t),vo=o(Lt,"\uC744 \uD65C\uC131\uD654\uD558\uB824\uBA74 \uC2DC\uC2A4\uD15C\uC758 CUDA toolchain \uBC84\uC804\uC774 PyTorch\uC640 \uD568\uAED8 \uC124\uCE58\uB41C \uAC83\uACFC \uB3D9\uC77C\uD574\uC57C \uD569\uB2C8\uB2E4."),Lt.forEach(t),qs=c(l),gt=n(l,"P",{});var En=U(gt);Bo=o(En,"8\uBE44\uD2B8 \uC635\uD2F0\uB9C8\uC774\uC800\uB294 \uD604\uC7AC DeepSpeed\uC640 \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4."),En.forEach(t),Ps=c(l),kt=n(l,"P",{});var Rn=U(kt);Go=o(Rn,"\uB2E4\uC74C \uBA85\uB839\uC73C\uB85C \uD559\uC2B5\uC744 \uC2DC\uC791\uD569\uB2C8\uB2E4:"),Rn.forEach(t),Ks=c(l),T(Et.$$.fragment,l),la=c(l),Rt=n(l,"H2",{id:!0});var Vn=U(Rt);Xo=o(Vn,"\uCD94\uB860"),Vn.forEach(t),ta=c(l),k=n(l,"P",{});var Xl=U(k);So=o(Xl,"\uBAA8\uB378\uC744 \uD559\uC2B5\uD55C \uD6C4\uC5D0\uB294, \uBAA8\uB378\uC774 \uC800\uC7A5\uB41C \uACBD\uB85C\uB97C \uC9C0\uC815\uD574 "),Se=n(Xl,"CODE",{});var Cn=U(Se);Zo=o(Cn,"StableDiffusionPipeline"),Cn.forEach(t),Fo=o(Xl,"\uB85C \uCD94\uB860\uC744 \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD504\uB86C\uD504\uD2B8\uC5D0 \uD559\uC2B5\uC5D0 \uC0AC\uC6A9\uB41C \uD2B9\uC218 "),Ze=n(Xl,"CODE",{});var jn=U(Ze);Wo=o(jn,"\uC2DD\uBCC4\uC790"),jn.forEach(t),Ao=o(Xl,"(\uC774\uC804 \uC608\uC2DC\uC758 "),Fe=n(Xl,"CODE",{});var In=U(Fe);Do=o(In,"sks"),In.forEach(t),go=o(Xl,")\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694."),Xl.forEach(t),ea=c(l),Vt=n(l,"P",{});var Ho=U(Vt);We=n(Ho,"STRONG",{});var $n=U(We);Ae=n($n,"CODE",{});var Qn=U(Ae);ko=o(Qn,'"accelerate>=0.16.0"'),Qn.forEach(t),$n.forEach(t),Yo=o(Ho,"\uC774 \uC124\uCE58\uB418\uC5B4 \uC788\uB294 \uACBD\uC6B0 \uB2E4\uC74C \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC911\uAC04 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uCD94\uB860\uC744 \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Ho.forEach(t),sa=c(l),T(Ct.$$.fragment,l),aa=c(l),jt=n(l,"P",{});var qo=U(jt);Yt=n(qo,"A",{href:!0});var Nn=U(Yt);xo=o(Nn,"\uC800\uC7A5\uB41C \uD559\uC2B5 \uCCB4\uD06C\uD3EC\uC778\uD2B8"),Nn.forEach(t),zo=o(qo,"\uC5D0\uC11C\uB3C4 \uCD94\uB860\uC744 \uC2E4\uD589\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),qo.forEach(t),this.h()},h(){h(f,"name","hf:doc:metadata"),h(f,"content",JSON.stringify(ti)),h(m,"id","dreambooth"),h(m,"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"),h(m,"href","#dreambooth"),h(a,"class","relative group"),h(v,"href","https://arxiv.org/abs/2208.12242"),h(v,"rel","nofollow"),Zn(u.src,$="https://dreambooth.github.io/DreamBooth_files/teaser_static.jpg")||h(u,"src",$),h(u,"alt","\uD504\uB85C\uC81D\uD2B8 \uBE14\uB85C\uADF8\uC5D0\uC11C\uC758 DreamBooth \uC608\uC2DC"),h(q,"href","https://dreambooth.github.io"),h(Zl,"href","https://huggingface.co/CompVis/stable-diffusion-v1-4"),h(Zl,"rel","nofollow"),h(Fl,"href","https://github.com/huggingface/diffusers/tree/main/examples/dreambooth"),h(Fl,"rel","nofollow"),h(Nt,"href","../optimization/xformers"),h(Al,"href","https://github.com/huggingface/accelerate/"),h(Al,"rel","nofollow"),h(Yl,"id",""),h(cl,"id","priorpreserving-loss"),h(cl,"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"),h(cl,"href","#priorpreserving-loss"),h(P,"class","relative group"),h(zl,"href","https://arxiv.org/abs/2208.12242"),h(zl,"rel","nofollow"),h(ul,"id","and-unet"),h(ul,"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"),h(ul,"href","#and-unet"),h(K,"class","relative group"),h(Ll,"href","https://huggingface.co/blog/dreambooth"),h(Ll,"rel","nofollow"),h(dl,"id","lora"),h(dl,"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"),h(dl,"href","#lora"),h(ll,"class","relative group"),h(Gt,"href","training/lora#dreambooth"),h(ql,"id",""),h(Kl,"id",""),h(tt,"id",""),h(wl,"id","gpu"),h(wl,"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"),h(wl,"href","#gpu"),h(tl,"class","relative group"),h(El,"id","xformers"),h(El,"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"),h(El,"href","#xformers"),h(el,"class","relative group"),h(pt,"href","https://github.com/facebookresearch/xformers"),h(pt,"rel","nofollow"),h(nt,"href","https://facebookresearch.github.io/xformers/components/ops.html#module-xformers.ops"),h(nt,"rel","nofollow"),h(Wt,"href","./optimization/xformers"),h(Ut,"id",""),h(ft,"href","https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.zero_grad.html"),h(ft,"rel","nofollow"),h(Rl,"id","16gb-gpu"),h(Rl,"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"),h(Rl,"href","#16gb-gpu"),h(sl,"class","relative group"),h(ht,"href","https://github.com/TimDettmers/bitsandbytes"),h(ht,"rel","nofollow"),h(jl,"id","12gb-gpu"),h(jl,"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"),h(jl,"href","#12gb-gpu"),h(al,"class","relative group"),h($l,"id","8gb-gpu"),h($l,"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"),h($l,"href","#8gb-gpu"),h(rl,"class","relative group"),h(dt,"href","https://www.deepspeed.ai/"),h(dt,"rel","nofollow"),h(bt,"href","https://huggingface.co/docs/accelerate/usage_guides/deepspeed"),h(bt,"rel","nofollow"),h(wt,"href","https://deepspeed.readthedocs.io/en/latest/optimizers.html#adam-cpu"),h(wt,"rel","nofollow"),h(Rt,"id",""),h(Yt,"href","#inference-from-a-saved-checkpoint")},m(l,s){e(document.head,f),i(l,J,s),i(l,a,s),e(a,m),e(m,E),d(I,E,null),e(a,Q),e(a,B),e(B,X),i(l,G,s),i(l,N,s),e(N,v),e(v,F),e(N,W),i(l,S,s),i(l,Z,s),e(Z,u),i(l,R,s),i(l,C,s),e(C,H),e(C,q),e(q,pl),i(l,Sl,s),i(l,z,s),e(z,Va),e(z,Zl),e(Zl,Pt),e(Pt,Ca),e(z,ja),e(z,Fl),e(Fl,Ia),e(z,$a),i(l,Ye,s),i(l,nl,s),e(nl,Qa),e(nl,Kt),e(Kt,Na),e(nl,va),i(l,xe,s),d(Wl,l,s),i(l,ze,s),i(l,il,s),e(il,Ba),e(il,Nt),e(Nt,Ga),e(il,Xa),i(l,Oe,s),i(l,Ul,s),e(Ul,Sa),e(Ul,Al),e(Al,Za),e(Ul,Fa),i(l,Le,s),d(Dl,l,s),i(l,He,s),i(l,vt,s),e(vt,Wa),i(l,qe,s),d(gl,l,s),i(l,Pe,s),i(l,Bt,s),e(Bt,Aa),i(l,Ke,s),d(kl,l,s),i(l,ls,s),i(l,Yl,s),e(Yl,Da),i(l,ts,s),d(fl,l,s),i(l,es,s),d(Ml,l,s),i(l,ss,s),i(l,P,s),e(P,cl),e(cl,le),d(xl,le,null),e(P,ga),e(P,te),e(te,ka),i(l,as,s),i(l,hl,s),e(hl,Ya),e(hl,zl),e(zl,xa),e(hl,za),i(l,rs,s),i(l,Jl,s),e(Jl,Oa),e(Jl,ee),e(ee,La),e(Jl,Ha),i(l,os,s),d(ml,l,s),i(l,ps,s),i(l,K,s),e(K,ul),e(ul,se),d(Ol,se,null),e(K,qa),e(K,ae),e(ae,Pa),i(l,ns,s),i(l,A,s),e(A,Ka),e(A,re),e(re,lr),e(A,tr),e(A,oe),e(oe,er),e(A,sr),e(A,Ll),e(Ll,ar),e(A,rr),i(l,is,s),d(yl,l,s),i(l,Us,s),i(l,Y,s),e(Y,pe),e(pe,or),e(Y,pr),e(Y,ne),e(ne,nr),e(Y,ir),e(Y,ie),e(ie,Ur),e(Y,fr),i(l,fs,s),d(Tl,l,s),i(l,Ms,s),i(l,ll,s),e(ll,dl),e(dl,Ue),d(Hl,Ue,null),e(ll,Mr),e(ll,fe),e(fe,cr),i(l,cs,s),i(l,_l,s),e(_l,hr),e(_l,Gt),e(Gt,Jr),e(_l,mr),i(l,hs,s),i(l,ql,s),e(ql,ur),i(l,Js,s),i(l,Xt,s),e(Xt,yr),i(l,ms,s),d(Pl,l,s),i(l,us,s),i(l,D,s),e(D,Tr),e(D,Me),e(Me,dr),e(D,_r),e(D,ce),e(ce,br),e(D,wr),e(D,he),e(he,Er),e(D,Rr),i(l,ys,s),i(l,Kl,s),e(Kl,Vr),i(l,Ts,s),i(l,O,s),e(O,Cr),e(O,Je),e(Je,jr),e(O,Ir),e(O,me),e(me,$r),e(O,Qr),i(l,ds,s),d(lt,l,s),i(l,_s,s),i(l,St,s),e(St,Nr),i(l,bs,s),i(l,tt,s),e(tt,vr),i(l,ws,s),i(l,Zt,s),e(Zt,Br),i(l,Es,s),i(l,et,s),e(et,ue),e(ue,ye),e(ye,Gr),e(et,Xr),i(l,Rs,s),d(st,l,s),i(l,Vs,s),i(l,bl,s),e(bl,Sr),e(bl,Te),e(Te,de),e(de,Zr),e(bl,Fr),i(l,Cs,s),d(at,l,s),i(l,js,s),i(l,tl,s),e(tl,wl),e(wl,_e),d(rt,_e,null),e(tl,Wr),e(tl,be),e(be,Ar),i(l,Is,s),i(l,Ft,s),e(Ft,Dr),i(l,$s,s),i(l,el,s),e(el,El),e(El,we),d(ot,we,null),e(el,gr),e(el,Ee),e(Ee,kr),i(l,Qs,s),i(l,x,s),e(x,pt),e(pt,Yr),e(x,xr),e(x,nt),e(nt,zr),e(x,Or),e(x,Wt),e(Wt,Lr),e(x,Hr),i(l,Ns,s),d(it,l,s),i(l,vs,s),i(l,At,s),e(At,qr),i(l,Bs,s),i(l,Ut,s),e(Ut,Pr),i(l,Gs,s),i(l,g,s),e(g,Kr),e(g,ft),e(ft,lo),e(g,to),e(g,Re),e(Re,eo),e(g,so),e(g,Ve),e(Ve,ao),e(g,ro),i(l,Xs,s),d(Mt,l,s),i(l,Ss,s),i(l,sl,s),e(sl,Rl),e(Rl,Ce),d(ct,Ce,null),e(sl,oo),e(sl,je),e(je,po),i(l,Zs,s),i(l,Vl,s),e(Vl,no),e(Vl,ht),e(ht,io),e(Vl,Uo),i(l,Fs,s),d(Jt,l,s),i(l,Ws,s),i(l,Cl,s),e(Cl,fo),e(Cl,Ie),e(Ie,Mo),e(Cl,co),i(l,As,s),d(mt,l,s),i(l,Ds,s),i(l,al,s),e(al,jl),e(jl,$e),d(ut,$e,null),e(al,ho),e(al,Qe),e(Qe,Jo),i(l,gs,s),i(l,Il,s),e(Il,mo),e(Il,Ne),e(Ne,uo),e(Il,yo),i(l,ks,s),d(yt,l,s),i(l,Ys,s),i(l,rl,s),e(rl,$l),e($l,ve),d(Tt,ve,null),e(rl,To),e(rl,Be),e(Be,_o),i(l,xs,s),i(l,Ql,s),e(Ql,bo),e(Ql,dt),e(dt,wo),e(Ql,Eo),i(l,zs,s),i(l,Dt,s),e(Dt,Ro),i(l,Os,s),d(_t,l,s),i(l,Ls,s),i(l,Nl,s),e(Nl,Vo),e(Nl,bt),e(bt,Co),e(Nl,jo),i(l,Hs,s),i(l,L,s),e(L,Io),e(L,wt),e(wt,Ge),e(Ge,$o),e(L,Qo),e(L,Xe),e(Xe,No),e(L,vo),i(l,qs,s),i(l,gt,s),e(gt,Bo),i(l,Ps,s),i(l,kt,s),e(kt,Go),i(l,Ks,s),d(Et,l,s),i(l,la,s),i(l,Rt,s),e(Rt,Xo),i(l,ta,s),i(l,k,s),e(k,So),e(k,Se),e(Se,Zo),e(k,Fo),e(k,Ze),e(Ze,Wo),e(k,Ao),e(k,Fe),e(Fe,Do),e(k,go),i(l,ea,s),i(l,Vt,s),e(Vt,We),e(We,Ae),e(Ae,ko),e(Vt,Yo),i(l,sa,s),d(Ct,l,s),i(l,aa,s),i(l,jt,s),e(jt,Yt),e(Yt,xo),e(jt,zo),ra=!0},p(l,[s]){const It={};s&2&&(It.$$scope={dirty:s,ctx:l}),fl.$set(It);const De={};s&2&&(De.$$scope={dirty:s,ctx:l}),Ml.$set(De);const ge={};s&2&&(ge.$$scope={dirty:s,ctx:l}),ml.$set(ge);const ke={};s&2&&(ke.$$scope={dirty:s,ctx:l}),yl.$set(ke);const xt={};s&2&&(xt.$$scope={dirty:s,ctx:l}),Tl.$set(xt)},i(l){ra||(_(I.$$.fragment,l),_(Wl.$$.fragment,l),_(Dl.$$.fragment,l),_(gl.$$.fragment,l),_(kl.$$.fragment,l),_(fl.$$.fragment,l),_(Ml.$$.fragment,l),_(xl.$$.fragment,l),_(ml.$$.fragment,l),_(Ol.$$.fragment,l),_(yl.$$.fragment,l),_(Tl.$$.fragment,l),_(Hl.$$.fragment,l),_(Pl.$$.fragment,l),_(lt.$$.fragment,l),_(st.$$.fragment,l),_(at.$$.fragment,l),_(rt.$$.fragment,l),_(ot.$$.fragment,l),_(it.$$.fragment,l),_(Mt.$$.fragment,l),_(ct.$$.fragment,l),_(Jt.$$.fragment,l),_(mt.$$.fragment,l),_(ut.$$.fragment,l),_(yt.$$.fragment,l),_(Tt.$$.fragment,l),_(_t.$$.fragment,l),_(Et.$$.fragment,l),_(Ct.$$.fragment,l),ra=!0)},o(l){b(I.$$.fragment,l),b(Wl.$$.fragment,l),b(Dl.$$.fragment,l),b(gl.$$.fragment,l),b(kl.$$.fragment,l),b(fl.$$.fragment,l),b(Ml.$$.fragment,l),b(xl.$$.fragment,l),b(ml.$$.fragment,l),b(Ol.$$.fragment,l),b(yl.$$.fragment,l),b(Tl.$$.fragment,l),b(Hl.$$.fragment,l),b(Pl.$$.fragment,l),b(lt.$$.fragment,l),b(st.$$.fragment,l),b(at.$$.fragment,l),b(rt.$$.fragment,l),b(ot.$$.fragment,l),b(it.$$.fragment,l),b(Mt.$$.fragment,l),b(ct.$$.fragment,l),b(Jt.$$.fragment,l),b(mt.$$.fragment,l),b(ut.$$.fragment,l),b(yt.$$.fragment,l),b(Tt.$$.fragment,l),b(_t.$$.fragment,l),b(Et.$$.fragment,l),b(Ct.$$.fragment,l),ra=!1},d(l){t(f),l&&t(J),l&&t(a),w(I),l&&t(G),l&&t(N),l&&t(S),l&&t(Z),l&&t(R),l&&t(C),l&&t(Sl),l&&t(z),l&&t(Ye),l&&t(nl),l&&t(xe),w(Wl,l),l&&t(ze),l&&t(il),l&&t(Oe),l&&t(Ul),l&&t(Le),w(Dl,l),l&&t(He),l&&t(vt),l&&t(qe),w(gl,l),l&&t(Pe),l&&t(Bt),l&&t(Ke),w(kl,l),l&&t(ls),l&&t(Yl),l&&t(ts),w(fl,l),l&&t(es),w(Ml,l),l&&t(ss),l&&t(P),w(xl),l&&t(as),l&&t(hl),l&&t(rs),l&&t(Jl),l&&t(os),w(ml,l),l&&t(ps),l&&t(K),w(Ol),l&&t(ns),l&&t(A),l&&t(is),w(yl,l),l&&t(Us),l&&t(Y),l&&t(fs),w(Tl,l),l&&t(Ms),l&&t(ll),w(Hl),l&&t(cs),l&&t(_l),l&&t(hs),l&&t(ql),l&&t(Js),l&&t(Xt),l&&t(ms),w(Pl,l),l&&t(us),l&&t(D),l&&t(ys),l&&t(Kl),l&&t(Ts),l&&t(O),l&&t(ds),w(lt,l),l&&t(_s),l&&t(St),l&&t(bs),l&&t(tt),l&&t(ws),l&&t(Zt),l&&t(Es),l&&t(et),l&&t(Rs),w(st,l),l&&t(Vs),l&&t(bl),l&&t(Cs),w(at,l),l&&t(js),l&&t(tl),w(rt),l&&t(Is),l&&t(Ft),l&&t($s),l&&t(el),w(ot),l&&t(Qs),l&&t(x),l&&t(Ns),w(it,l),l&&t(vs),l&&t(At),l&&t(Bs),l&&t(Ut),l&&t(Gs),l&&t(g),l&&t(Xs),w(Mt,l),l&&t(Ss),l&&t(sl),w(ct),l&&t(Zs),l&&t(Vl),l&&t(Fs),w(Jt,l),l&&t(Ws),l&&t(Cl),l&&t(As),w(mt,l),l&&t(Ds),l&&t(al),w(ut),l&&t(gs),l&&t(Il),l&&t(ks),w(yt,l),l&&t(Ys),l&&t(rl),w(Tt),l&&t(xs),l&&t(Ql),l&&t(zs),l&&t(Dt),l&&t(Os),w(_t,l),l&&t(Ls),l&&t(Nl),l&&t(Hs),l&&t(L),l&&t(qs),l&&t(gt),l&&t(Ps),l&&t(kt),l&&t(Ks),w(Et,l),l&&t(la),l&&t(Rt),l&&t(ta),l&&t(k),l&&t(ea),l&&t(Vt),l&&t(sa),w(Ct,l),l&&t(aa),l&&t(jt)}}}const ti={local:"dreambooth",sections:[{local:"",sections:[{local:"priorpreserving-loss",title:"Prior-preserving(\uC0AC\uC804 \uBCF4\uC874) loss\uB97C \uC0AC\uC6A9\uD55C \uD30C\uC778\uD29C\uB2DD"}],title:"\uD30C\uC778\uD29C\uB2DD"},{local:"and-unet",title:"\uD14D\uC2A4\uD2B8 \uC778\uCF54\uB354\uC640 and UNet\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uAE30"},{local:"lora",sections:[{local:"",sections:[{local:"",title:"\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uD6C8\uB828 \uC7AC\uAC1C\uD558\uAE30"},{local:"",title:"\uC800\uC7A5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860 \uC218\uD589\uD558\uAE30"}],title:"\uD559\uC2B5 \uC911 \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC800\uC7A5\uD558\uAE30"}],title:"LoRA\uB85C \uD30C\uC778\uD29C\uB2DD\uD558\uAE30"},{local:"gpu",sections:[{local:"xformers",title:"xFormers"},{local:"",title:"\uADF8\uB798\uB514\uC5B8\uD2B8 \uC5C6\uC74C\uC73C\uB85C \uC124\uC815"},{local:"16gb-gpu",title:"16GB GPU"},{local:"12gb-gpu",title:"12GB GPU"},{local:"8gb-gpu",title:"8GB GPU\uC5D0\uC11C \uD559\uC2B5\uD558\uAE30"}],title:"\uAC01 GPU \uC6A9\uB7C9\uC5D0\uC11C\uC758 \uCD5C\uC801\uD654"},{local:"",title:"\uCD94\uB860"}],title:"DreamBooth"};function ei(V){return Fn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ni extends Bn{constructor(f){super();Gn(this,f,ei,li,Xn,{})}}export{ni as default,ti as metadata};
