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