import{S as fi,i as ci,s as Mi,e as p,k as f,w as m,t as a,M as mi,c as i,d as t,m as c,a as r,x as u,h as o,b as M,G as e,g as n,y as _,L as ui,q as d,o as y,B as w,v as _i}from"../../chunks/vendor-hf-doc-builder.js";import{I as ws}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as J}from"../../chunks/CodeBlock-hf-doc-builder.js";function di(So){let v,Ht,Z,G,rt,q,Us,nt,Js,qt,P,O,hs,bs,Pt,F,Ts,K,Es,js,Ot,N,$,ft,ll,vs,ct,Zs,Kt,I,B,Mt,tl,Ns,mt,Is,le,Ql,Cs,te,Ll,ut,Ws,ee,A,Xs,_t,Rs,Vs,se,el,ae,sl,al,Gs,Fs,oe,ol,pe,xl,$s,ie,pl,re,S,Bs,il,As,Ss,ne,rl,fe,Dl,zs,ce,nl,Me,gl,Ys,me,fl,ue,cl,ks,_e,E,Qs,Ml,Ls,xs,Hl,Ds,gs,de,U,Hs,dt,qs,Ps,yt,Os,Ks,wt,la,ta,Ut,ea,sa,Jt,aa,oa,ht,pa,ia,ye,ml,we,ql,bt,Tt,ul,ra,_l,na,fa,Ue,z,ca,Et,Ma,ma,Je,dl,he,Pl,C,ua,jt,_a,da,yl,ya,wa,be,Y,Ua,vt,Ja,ha,Te,j,k,Zt,ba,Ta,Nt,Ea,ja,va,wl,Za,It,Na,Ia,Ca,b,Wa,Ct,Xa,Ra,Wt,Va,Ga,Xt,Fa,$a,Ul,Rt,Vt,Ba,Aa,Gt,Ft,Sa,Ee,Jl,je,Q,za,hl,Ya,ka,ve,W,$t,Qa,La,bl,xa,Da,Ze,Tl,ga,Ne,X,El,Ha,qa,jl,Pa,Oa,Ie,Ol,Ka,Ce,vl,We,Kl,lo,Xe,Zl,Re,L,to,Nl,eo,so,Ve,Il,ao,Ge,T,oo,Bt,po,io,At,ro,no,St,fo,co,Fe,lt,Mo,$e,Cl,Be,tt,mo,Ae,Wl,Se,Xl,uo,ze,Rl,_o,zt,yo,Ye,Vl,ke,et,wo,Qe,Gl,Le,st,Uo,xe,Fl,De,at,Jo,ge,$l,ho,He,Bl,Yt,bo,To,qe,R,x,kt,Al,Eo,Qt,jo,Pe,D,vo,Lt,Zo,No,Oe,Sl,Io,zl,Co,Ke,Yl,Wo,ls,g,Xo,kl,Ro,Vo,ts;return q=new ws({}),ll=new ws({}),tl=new ws({}),el=new J({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRmRpZmZ1c2VycyUwQWNkJTIwZGlmZnVzZXJzJTBBcGlwJTIwaW5zdGFsbCUyMC1lJTIwLg==",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/diffusers
<span class="hljs-built_in">cd</span> diffusers
pip install -e .`}}),ol=new J({props:{code:"Y2QlMjBleGFtcGxlcyUyRmN1c3RvbV9kaWZmdXNpb24=",highlighted:'<span class="hljs-built_in">cd</span> examples/custom_diffusion'}}),pl=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1yJTIwcmVxdWlyZW1lbnRzLnR4dCUwQXBpcCUyMGluc3RhbGwlMjBjbGlwLXJldHJpZXZhbCUyMA==",highlighted:`pip install -r requirements.txt
pip install clip-retrieval `}}),rl=new J({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZw==",highlighted:"accelerate config"}}),nl=new J({props:{code:"YWNjZWxlcmF0ZSUyMGNvbmZpZyUyMGRlZmF1bHQ=",highlighted:"accelerate config default"}}),fl=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()`}}),ml=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMGNsaXAtcmV0cmlldmFsJTBBcHl0aG9uJTIwcmV0cmlldmUucHklMjAtLWNsYXNzX3Byb21wdCUyMGNhdCUyMC0tY2xhc3NfZGF0YV9kaXIlMjByZWFsX3JlZyUyRnNhbXBsZXNfY2F0JTIwLS1udW1fY2xhc3NfaW1hZ2VzJTIwMjAw",highlighted:`pip install clip-retrieval
python retrieve.py --class_prompt <span class="hljs-built_in">cat</span> --class_data_dir real_reg/samples_cat --num_class_images 200`}}),dl=new J({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBPVVRQVVRfRElSJTNEJTIycGF0aC10by1zYXZlLW1vZGVsJTIyJTBBZXhwb3J0JTIwSU5TVEFOQ0VfRElSJTNEJTIyLiUyRmRhdGElMkZjYXQlMjIlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwdHJhaW5fY3VzdG9tX2RpZmZ1c2lvbi5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTIwJTVDJTBBJTIwJTIwLS1pbnN0YW5jZV9kYXRhX2RpciUzRCUyNElOU1RBTkNFX0RJUiUyMCU1QyUwQSUyMCUyMC0tb3V0cHV0X2RpciUzRCUyNE9VVFBVVF9ESVIlMjAlNUMlMEElMjAlMjAtLWNsYXNzX2RhdGFfZGlyJTNELiUyRnJlYWxfcmVnJTJGc2FtcGxlc19jYXQlMkYlMjAlNUMlMEElMjAlMjAtLXdpdGhfcHJpb3JfcHJlc2VydmF0aW9uJTIwLS1yZWFsX3ByaW9yJTIwLS1wcmlvcl9sb3NzX3dlaWdodCUzRDEuMCUyMCU1QyUwQSUyMCUyMC0tY2xhc3NfcHJvbXB0JTNEJTIyY2F0JTIyJTIwLS1udW1fY2xhc3NfaW1hZ2VzJTNEMjAwJTIwJTVDJTBBJTIwJTIwLS1pbnN0YW5jZV9wcm9tcHQlM0QlMjJwaG90byUyMG9mJTIwYSUyMCUzQ25ldzElM0UlMjBjYXQlMjIlMjAlMjAlNUMlMEElMjAlMjAtLXJlc29sdXRpb24lM0Q1MTIlMjAlMjAlNUMlMEElMjAlMjAtLXRyYWluX2JhdGNoX3NpemUlM0QyJTIwJTIwJTVDJTBBJTIwJTIwLS1sZWFybmluZ19yYXRlJTNEMWUtNSUyMCUyMCU1QyUwQSUyMCUyMC0tbHJfd2FybXVwX3N0ZXBzJTNEMCUyMCU1QyUwQSUyMCUyMC0tbWF4X3RyYWluX3N0ZXBzJTNEMjUwJTIwJTVDJTBBJTIwJTIwLS1zY2FsZV9sciUyMC0taGZsaXAlMjAlMjAlNUMlMEElMjAlMjAtLW1vZGlmaWVyX3Rva2VuJTIwJTIyJTNDbmV3MSUzRSUyMiUyMCU1QyUwQSUyMCUyMC0tcHVzaF90b19odWI=",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> OUTPUT_DIR=<span class="hljs-string">&quot;path-to-save-model&quot;</span>
<span class="hljs-built_in">export</span> INSTANCE_DIR=<span class="hljs-string">&quot;./data/cat&quot;</span>

accelerate launch train_custom_diffusion.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> \\
  --class_data_dir=./real_reg/samples_cat/ \\
  --with_prior_preservation --real_prior --prior_loss_weight=1.0 \\
  --class_prompt=<span class="hljs-string">&quot;cat&quot;</span> --num_class_images=200 \\
  --instance_prompt=<span class="hljs-string">&quot;photo of a &lt;new1&gt; cat&quot;</span>  \\
  --resolution=512  \\
  --train_batch_size=2  \\
  --learning_rate=1e-5  \\
  --lr_warmup_steps=0 \\
  --max_train_steps=250 \\
  --scale_lr --hflip  \\
  --modifier_token <span class="hljs-string">&quot;&lt;new1&gt;&quot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Q25ldzElM0UlMjIlMjAlNUMlMEElMjAlMjAtLXZhbGlkYXRpb25fcHJvbXB0JTNEJTIyJTNDbmV3MSUzRSUyMGNhdCUyMHNpdHRpbmclMjBpbiUyMGElMjBidWNrZXQlMjIlMjAlNUMlMEElMjAlMjAtLXJlcG9ydF90byUzRCUyMndhbmRiJTIyJTIwJTVDJTBBJTIwJTIwLS1wdXNoX3RvX2h1Yg==",highlighted:`accelerate launch train_custom_diffusion.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> \\
  --class_data_dir=./real_reg/samples_cat/ \\
  --with_prior_preservation --real_prior --prior_loss_weight=1.0 \\
  --class_prompt=<span class="hljs-string">&quot;cat&quot;</span> --num_class_images=200 \\
  --instance_prompt=<span class="hljs-string">&quot;photo of a &lt;new1&gt; cat&quot;</span>  \\
  --resolution=512  \\
  --train_batch_size=2  \\
  --learning_rate=1e-5  \\
  --lr_warmup_steps=0 \\
  --max_train_steps=250 \\
  --scale_lr --hflip  \\
  --modifier_token <span class="hljs-string">&quot;&lt;new1&gt;&quot;</span> \\
  --validation_prompt=<span class="hljs-string">&quot;&lt;new1&gt; cat sitting in a bucket&quot;</span> \\
  --report_to=<span class="hljs-string">&quot;wandb&quot;</span> \\
  --push_to_hub`}}),vl=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMGNsaXAtcmV0cmlldmFsJTBBcHl0aG9uJTIwcmV0cmlldmUucHklMjAtLWNsYXNzX3Byb21wdCUyMCU3QiU3RCUyMC0tY2xhc3NfZGF0YV9kaXIlMjAlN0IlN0QlMjAtLW51bV9jbGFzc19pbWFnZXMlMjAyMDA=",highlighted:`pip install clip-retrieval
python retrieve.py --class_prompt {} --class_data_dir {} --num_class_images 200`}}),Zl=new J({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXB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>
<span class="hljs-built_in">export</span> OUTPUT_DIR=<span class="hljs-string">&quot;path-to-save-model&quot;</span>

accelerate launch train_custom_diffusion.py \\
  --pretrained_model_name_or_path=<span class="hljs-variable">$MODEL_NAME</span>  \\
  --output_dir=<span class="hljs-variable">$OUTPUT_DIR</span> \\
  --concepts_list=./concept_list.json \\
  --with_prior_preservation --real_prior --prior_loss_weight=1.0 \\
  --resolution=512  \\
  --train_batch_size=2  \\
  --learning_rate=1e-5  \\
  --lr_warmup_steps=0 \\
  --max_train_steps=500 \\
  --num_class_images=200 \\
  --scale_lr --hflip  \\
  --modifier_token <span class="hljs-string">&quot;&lt;new1&gt;+&lt;new2&gt;&quot;</span> \\
  --push_to_hub`}}),Cl=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMGNsaXAtcmV0cmlldmFsJTBBcHl0aG9uJTIwcmV0cmlldmUucHklMjAtLWNsYXNzX3Byb21wdCUyMHBlcnNvbiUyMC0tY2xhc3NfZGF0YV9kaXIlMjByZWFsX3JlZyUyRnNhbXBsZXNfcGVyc29uJTIwLS1udW1fY2xhc3NfaW1hZ2VzJTIwMjAw",highlighted:`pip install clip-retrieval
python retrieve.py --class_prompt person --class_data_dir real_reg/samples_person --num_class_images 200`}}),Wl=new J({props:{code:"ZXhwb3J0JTIwTU9ERUxfTkFNRSUzRCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMEFleHBvcnQlMjBPVVRQVVRfRElSJTNEJTIycGF0aC10by1zYXZlLW1vZGVsJTIyJTBBZXhwb3J0JTIwSU5TVEFOQ0VfRElSJTNEJTIycGF0aC10by1pbWFnZXMlMjIlMEElMEFhY2NlbGVyYXRlJTIwbGF1bmNoJTIwdHJhaW5fY3VzdG9tX2RpZmZ1c2lvbi5weSUyMCU1QyUwQSUyMCUyMC0tcHJldHJhaW5lZF9tb2RlbF9uYW1lX29yX3BhdGglM0QlMjRNT0RFTF9OQU1FJTIwJTIwJTVDJTBBJTIwJTIw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I=",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> OUTPUT_DIR=<span class="hljs-string">&quot;path-to-save-model&quot;</span>
<span class="hljs-built_in">export</span> INSTANCE_DIR=<span class="hljs-string">&quot;path-to-images&quot;</span>

accelerate launch train_custom_diffusion.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> \\
  --class_data_dir=./real_reg/samples_person/ \\
  --with_prior_preservation --real_prior --prior_loss_weight=1.0 \\
  --class_prompt=<span class="hljs-string">&quot;person&quot;</span> --num_class_images=200 \\
  --instance_prompt=<span class="hljs-string">&quot;photo of a &lt;new1&gt; person&quot;</span>  \\
  --resolution=512  \\
  --train_batch_size=2  \\
  --learning_rate=5e-6  \\
  --lr_warmup_steps=0 \\
  --max_train_steps=1000 \\
  --scale_lr --hflip --noaug \\
  --freeze_model crossattn \\
  --modifier_token <span class="hljs-string">&quot;&lt;new1&gt;&quot;</span> \\
  --enable_xformers_memory_efficient_attention \\
  --push_to_hub`}}),Vl=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZS51bmV0LmxvYWRfYXR0bl9wcm9jcyglMjJwYXRoLXRvLXNhdmUtbW9kZWwlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMnB5dG9yY2hfY3VzdG9tX2RpZmZ1c2lvbl93ZWlnaHRzLmJpbiUyMiklMEFwaXBlLmxvYWRfdGV4dHVhbF9pbnZlcnNpb24oJTIycGF0aC10by1zYXZlLW1vZGVsJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjIlM0NuZXcxJTNFLmJpbiUyMiklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwJTIyJTNDbmV3MSUzRSUyMGNhdCUyMHNpdHRpbmclMjBpbiUyMGElMjBidWNrZXQlMjIlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMTAwJTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q2LjAlMkMlMEElMjAlMjAlMjAlMjBldGElM0QxLjAlMkMlMEEpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNhdC5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe.unet.load_attn_procs(<span class="hljs-string">&quot;path-to-save-model&quot;</span>, weight_name=<span class="hljs-string">&quot;pytorch_custom_diffusion_weights.bin&quot;</span>)
pipe.load_textual_inversion(<span class="hljs-string">&quot;path-to-save-model&quot;</span>, weight_name=<span class="hljs-string">&quot;&lt;new1&gt;.bin&quot;</span>)

image = pipe(
    <span class="hljs-string">&quot;&lt;new1&gt; cat sitting in a bucket&quot;</span>,
    num_inference_steps=<span class="hljs-number">100</span>,
    guidance_scale=<span class="hljs-number">6.0</span>,
    eta=<span class="hljs-number">1.0</span>,
).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;cat.png&quot;</span>)`}}),Gl=new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kuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIyY2F0LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> huggingface_hub.repocard <span class="hljs-keyword">import</span> RepoCard
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

model_id = <span class="hljs-string">&quot;sayakpaul/custom-diffusion-cat&quot;</span>
card = RepoCard.load(model_id)
base_model_id = card.data.to_dict()[<span class="hljs-string">&quot;base_model&quot;</span>]

pipe = DiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe.unet.load_attn_procs(model_id, weight_name=<span class="hljs-string">&quot;pytorch_custom_diffusion_weights.bin&quot;</span>)
pipe.load_textual_inversion(model_id, weight_name=<span class="hljs-string">&quot;&lt;new1&gt;.bin&quot;</span>)

image = pipe(
    <span class="hljs-string">&quot;&lt;new1&gt; cat sitting in a bucket&quot;</span>,
    num_inference_steps=<span class="hljs-number">100</span>,
    guidance_scale=<span class="hljs-number">6.0</span>,
    eta=<span class="hljs-number">1.0</span>,
).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;cat.png&quot;</span>)`}}),Fl=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwaHVnZ2luZ2ZhY2VfaHViLnJlcG9jYXJkJTIwaW1wb3J0JTIwUmVwb0NhcmQlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnNheWFrcGF1bCUyRmN1c3RvbS1kaWZmdXNpb24tY2F0LXdvb2Rlbi1wb3QlMjIlMEFjYXJkJTIwJTNEJTIwUmVwb0NhcmQubG9hZChtb2RlbF9pZCklMEFiYXNlX21vZGVsX2lkJTIwJTNEJTIwY2FyZC5kYXRhLnRvX2RpY3QoKSU1QiUyMmJhc2VfbW9kZWwlMjIlNUQlMEElMEFwaXBlJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKGJhc2VfbW9kZWxfaWQlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZS51bmV0LmxvYWRfYXR0bl9wcm9jcyhtb2RlbF9pZCUyQyUyMHdlaWdodF9uYW1lJTNEJTIycHl0b3JjaF9jdXN0b21fZGlmZnVzaW9uX3dlaWdodHMuYmluJTIyKSUwQXBpcGUubG9hZF90ZXh0dWFsX2ludmVyc2lvbihtb2RlbF9pZCUyQyUyMHdlaWdodF9uYW1lJTNEJTIyJTNDbmV3MSUzRS5iaW4lMjIpJTBBcGlwZS5sb2FkX3RleHR1YWxfaW52ZXJzaW9uKG1vZGVsX2lkJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjIlM0NuZXcyJTNFLmJpbiUyMiklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwJTIydGhlJTIwJTNDbmV3MSUzRSUyMGNhdCUyMHNjdWxwdHVyZSUyMGluJTIwdGhlJTIwc3R5bGUlMjBvZiUyMGElMjAlM0NuZXcyJTNFJTIwd29vZGVuJTIwcG90JTIyJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDEwMCUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNENi4wJTJDJTBBJTIwJTIwJTIwJTIwZXRhJTNEMS4wJTJDJTBBKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJtdWx0aS1zdWJqZWN0LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> huggingface_hub.repocard <span class="hljs-keyword">import</span> RepoCard
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

model_id = <span class="hljs-string">&quot;sayakpaul/custom-diffusion-cat-wooden-pot&quot;</span>
card = RepoCard.load(model_id)
base_model_id = card.data.to_dict()[<span class="hljs-string">&quot;base_model&quot;</span>]

pipe = DiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe.unet.load_attn_procs(model_id, weight_name=<span class="hljs-string">&quot;pytorch_custom_diffusion_weights.bin&quot;</span>)
pipe.load_textual_inversion(model_id, weight_name=<span class="hljs-string">&quot;&lt;new1&gt;.bin&quot;</span>)
pipe.load_textual_inversion(model_id, weight_name=<span class="hljs-string">&quot;&lt;new2&gt;.bin&quot;</span>)

image = pipe(
    <span class="hljs-string">&quot;the &lt;new1&gt; cat sculpture in the style of a &lt;new2&gt; wooden pot&quot;</span>,
    num_inference_steps=<span class="hljs-number">100</span>,
    guidance_scale=<span class="hljs-number">6.0</span>,
    eta=<span class="hljs-number">1.0</span>,
).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;multi-subject.png&quot;</span>)`}}),Al=new ws({}),{c(){v=p("meta"),Ht=f(),Z=p("h1"),G=p("a"),rt=p("span"),m(q.$$.fragment),Us=f(),nt=p("span"),Js=a("\uCEE4\uC2A4\uD140 Diffusion \uD559\uC2B5 \uC608\uC81C"),qt=f(),P=p("p"),O=p("a"),hs=a("\uCEE4\uC2A4\uD140 Diffusion"),bs=a(`\uC740 \uD53C\uC0AC\uCCB4\uC758 \uC774\uBBF8\uC9C0 \uBA87 \uC7A5(4~5\uC7A5)\uB9CC \uC8FC\uC5B4\uC9C0\uBA74 Stable Diffusion\uCC98\uB7FC text-to-image \uBAA8\uB378\uC744 \uCEE4\uC2A4\uD130\uB9C8\uC774\uC9D5\uD558\uB294 \uBC29\uBC95\uC785\uB2C8\uB2E4.
\u2018train_custom_diffusion.py\u2019 \uC2A4\uD06C\uB9BD\uD2B8\uB294 \uD559\uC2B5 \uACFC\uC815\uC744 \uAD6C\uD604\uD558\uACE0 \uC774\uB97C Stable Diffusion\uC5D0 \uB9DE\uAC8C \uC870\uC815\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.`),Pt=f(),F=p("p"),Ts=a("\uC774 \uAD50\uC721 \uC0AC\uB840\uB294 "),K=p("a"),Es=a("Nupur Kumari"),js=a("\uAC00 \uC81C\uACF5\uD558\uC600\uC2B5\uB2C8\uB2E4. (Custom Diffusion\uC758 \uC800\uC790 \uC911 \uD55C\uBA85)."),Ot=f(),N=p("h2"),$=p("a"),ft=p("span"),m(ll.$$.fragment),vs=f(),ct=p("span"),Zs=a("\uB85C\uCEEC\uC5D0\uC11C PyTorch\uB85C \uC2E4\uD589\uD558\uAE30"),Kt=f(),I=p("h3"),B=p("a"),Mt=p("span"),m(tl.$$.fragment),Ns=f(),mt=p("span"),Is=a("Dependencies \uC124\uCE58\uD558\uAE30"),le=f(),Ql=p("p"),Cs=a("\uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD558\uAE30 \uC804\uC5D0 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC758 \uD559\uC2B5 dependencies\uB97C \uC124\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4:"),te=f(),Ll=p("p"),ut=p("strong"),Ws=a("\uC911\uC694"),ee=f(),A=p("p"),Xs=a("\uC608\uC81C \uC2A4\uD06C\uB9BD\uD2B8\uC758 \uCD5C\uC2E0 \uBC84\uC804\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC2E4\uD589\uD558\uB824\uBA74 "),_t=p("strong"),Rs=a("\uC18C\uC2A4\uB85C\uBD80\uD130 \uC124\uCE58"),Vs=a("\uD558\uB294 \uAC83\uC744 \uB9E4\uC6B0 \uAD8C\uC7A5\uD558\uBA70, \uC608\uC81C \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC790\uC8FC \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uB9CC\uD07C \uC77C\uBD80 \uC608\uC81C\uBCC4 \uC694\uAD6C \uC0AC\uD56D\uC744 \uC124\uCE58\uD558\uACE0 \uC124\uCE58\uB97C \uCD5C\uC2E0 \uC0C1\uD0DC\uB85C \uC720\uC9C0\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uC774\uB97C \uC704\uD574 \uC0C8 \uAC00\uC0C1 \uD658\uACBD\uC5D0\uC11C \uB2E4\uC74C \uB2E8\uACC4\uB97C \uC2E4\uD589\uD558\uC138\uC694:"),se=f(),m(el.$$.fragment),ae=f(),sl=p("p"),al=p("a"),Gs=a("example folder"),Fs=a("\uB85C cd\uD558\uC5EC \uC774\uB3D9\uD558\uC138\uC694."),oe=f(),m(ol.$$.fragment),pe=f(),xl=p("p"),$s=a("\uC774\uC81C \uC2E4\uD589"),ie=f(),m(pl.$$.fragment),re=f(),S=p("p"),Bs=a("\uADF8\uB9AC\uACE0 "),il=p("a"),As=a("\u{1F917}Accelerate"),Ss=a(" \uD658\uACBD\uC744 \uCD08\uAE30\uD654:"),ne=f(),m(rl.$$.fragment),fe=f(),Dl=p("p"),zs=a("\uB610\uB294 \uC0AC\uC6A9\uC790 \uD658\uACBD\uC5D0 \uB300\uD55C \uC9C8\uBB38\uC5D0 \uB2F5\uD558\uC9C0 \uC54A\uACE0 \uAE30\uBCF8 \uAC00\uC18D \uAD6C\uC131\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uB2E4\uC74C\uACFC \uAC19\uC774 \uD558\uC138\uC694."),ce=f(),m(nl.$$.fragment),Me=f(),gl=p("p"),Ys=a("\uB610\uB294 \uC0AC\uC6A9 \uC911\uC778 \uD658\uACBD\uC774 \uB300\uD654\uD615 \uC178\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uACBD\uC6B0(\uC608: jupyter notebook)"),me=f(),m(fl.$$.fragment),ue=f(),cl=p("h3"),ks=a("\uACE0\uC591\uC774 \uC608\uC81C \u{1F63A}"),_e=f(),E=p("p"),Qs=a("\uC774\uC81C \uB370\uC774\uD130\uC14B\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4. "),Ml=p("a"),Ls=a("\uC5EC\uAE30"),xs=a("\uC5D0\uC11C \uB370\uC774\uD130\uC14B\uC744 \uB2E4\uC6B4\uB85C\uB4DC\uD558\uACE0 \uC555\uCD95\uC744 \uD489\uB2C8\uB2E4. \uC9C1\uC811 \uB370\uC774\uD130\uC14B\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 "),Hl=p("a"),Ds=a("\uD559\uC2B5\uC6A9 \uB370\uC774\uD130\uC14B \uC0DD\uC131\uD558\uAE30"),gs=a(" \uAC00\uC774\uB4DC\uB97C \uCC38\uACE0\uD558\uC138\uC694."),de=f(),U=p("p"),Hs=a("\uB610\uD55C \u2018clip-retrieval\u2019\uC744 \uC0AC\uC6A9\uD558\uC5EC 200\uAC1C\uC758 \uC2E4\uC81C \uC774\uBBF8\uC9C0\uB97C \uC218\uC9D1\uD558\uACE0, regularization\uC73C\uB85C\uC11C \uC774\uB97C \uD559\uC2B5 \uB370\uC774\uD130\uC14B\uC758 \uD0C0\uAC9F \uC774\uBBF8\uC9C0\uC640 \uACB0\uD569\uD569\uB2C8\uB2E4. \uC774\uB807\uAC8C \uD558\uBA74 \uC8FC\uC5B4\uC9C4 \uD0C0\uAC9F \uC774\uBBF8\uC9C0\uC5D0 \uB300\uD55C \uACFC\uC801\uD569\uC744 \uBC29\uC9C0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB2E4\uC74C \uD50C\uB798\uADF8\uB97C \uC0AC\uC6A9\uD558\uBA74 "),dt=p("code"),qs=a("prior_loss_weight=1."),Ps=a("\uB85C "),yt=p("code"),Os=a("prior_preservation"),Ks=a(", "),wt=p("code"),la=a("real_prior"),ta=a(` regularization\uC744 \uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uD074\uB798\uC2A4_\uD504\uB86C\uD504\uD2B8`),Ut=p("code"),ea=a("\uB294 \uB300\uC0C1 \uC774\uBBF8\uC9C0\uC640 \uB3D9\uC77C\uD55C \uCE74\uD14C\uACE0\uB9AC \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uC218\uC9D1\uB41C \uC2E4\uC81C \uC774\uBBF8\uC9C0\uC5D0\uB294 "),sa=a("class_prompt"),Jt=p("code"),aa=a("\uC640 \uC720\uC0AC\uD55C \uD14D\uC2A4\uD2B8 \uCEA1\uC158\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uAC80\uC0C9\uB41C \uC774\uBBF8\uC9C0\uB294 "),oa=a("class_data_dir"),ht=p("code"),pa=a("\uC5D0 \uC800\uC7A5\uB429\uB2C8\uB2E4. \uC0DD\uC131\uB41C \uC774\uBBF8\uC9C0\uB97C regularization\uC73C\uB85C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574 "),ia=a("real_prior`\uB97C \uBE44\uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC2E4\uC81C \uC774\uBBF8\uC9C0\uB97C \uC218\uC9D1\uD558\uB824\uBA74 \uD6C8\uB828 \uC804\uC5D0 \uC774 \uBA85\uB839\uC744 \uBA3C\uC800 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."),ye=f(),m(ml.$$.fragment),we=f(),ql=p("p"),bt=p("strong"),Tt=p("strong"),ul=p("em"),ra=a("\uCC38\uACE0: "),_l=p("a"),na=a("stable-diffusion-2"),fa=a(" 768x768 \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uB294 \uACBD\uC6B0 \u2018\uD574\uC0C1\uB3C4\u2019\uB97C 768\uB85C \uBCC0\uACBD\uD558\uC138\uC694."),Ue=f(),z=p("p"),ca=a("\uC2A4\uD06C\uB9BD\uD2B8\uB294 \uBAA8\uB378 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC640 "),Et=p("code"),Ma=a("pytorch_custom_diffusion_weights.bin"),ma=a(" \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uC5EC \uC800\uC7A5\uC18C\uC5D0 \uC800\uC7A5\uD569\uB2C8\uB2E4."),Je=f(),m(dl.$$.fragment),he=f(),Pl=p("p"),C=p("strong"),ua=a("\uB354 \uB0AE\uC740 VRAM \uC694\uAD6C \uC0AC\uD56D(GPU\uB2F9 16GB)\uC73C\uB85C \uB354 \uBE60\uB974\uAC8C \uD6C8\uB828\uD558\uB824\uBA74 "),jt=p("code"),_a=a("--enable_xformers_memory_efficient_attention"),da=a("\uC744 \uC0AC\uC6A9\uD558\uC138\uC694. \uC124\uCE58 \uBC29\uBC95\uC740 "),yl=p("a"),ya=a("\uAC00\uC774\uB4DC"),wa=a("\uB97C \uB530\uB974\uC138\uC694."),be=f(),Y=p("p"),Ua=a("\uAC00\uC911\uCE58 \uBC0F \uD3B8\uD5A5("),vt=p("code"),Ja=a("wandb"),ha=a(")\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC2E4\uD5D8\uC744 \uCD94\uC801\uD558\uACE0 \uC911\uAC04 \uACB0\uACFC\uB97C \uC800\uC7A5\uD558\uB824\uBA74(\uAC15\uB825\uD788 \uAD8C\uC7A5\uD569\uB2C8\uB2E4) \uB2E4\uC74C \uB2E8\uACC4\uB97C \uB530\uB974\uC138\uC694:"),Te=f(),j=p("ul"),k=p("li"),Zt=p("code"),ba=a("wandb"),Ta=a(" \uC124\uCE58: "),Nt=p("code"),Ea=a("pip install wandb"),ja=a("."),va=f(),wl=p("li"),Za=a("\uB85C\uADF8\uC778 : "),It=p("code"),Na=a("wandb login"),Ia=a("."),Ca=f(),b=p("li"),Wa=a("\uADF8\uB7F0 \uB2E4\uC74C \uD2B8\uB808\uC774\uB2DD\uC744 \uC2DC\uC791\uD558\uB294 \uB3D9\uC548 "),Ct=p("code"),Xa=a("validation_prompt"),Ra=a("\uB97C \uC9C0\uC815\uD558\uACE0 "),Wt=p("code"),Va=a("report_to"),Ga=a("\uB97C "),Xt=p("code"),Fa=a("wandb"),$a=a("\uB85C \uC124\uC815\uD569\uB2C8\uB2E4. \uB2E4\uC74C\uACFC \uAC19\uC740 \uAD00\uB828 \uC778\uC218\uB97C \uAD6C\uC131\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4:"),Ul=p("ul"),Rt=p("li"),Vt=p("code"),Ba=a("num_validation_images"),Aa=f(),Gt=p("li"),Ft=p("code"),Sa=a("validation_steps"),Ee=f(),m(Jl.$$.fragment),je=f(),Q=p("p"),za=a("\uB2E4\uC74C\uC740 "),hl=p("a"),Ya=a("Weights and Biases page"),ka=a("\uC758 \uC608\uC2DC\uC774\uBA70, \uC5EC\uB7EC \uD559\uC2B5 \uC138\uBD80 \uC815\uBCF4\uC640 \uD568\uAED8 \uC911\uAC04 \uACB0\uACFC\uB4E4\uC744 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ve=f(),W=p("p"),$t=p("code"),Qa=a("--push_to_hub"),La=a("\uB97C \uC9C0\uC815\uD558\uBA74 \uD559\uC2B5\uB41C \uD30C\uB77C\uBBF8\uD130\uAC00 \uD5C8\uAE45 \uD398\uC774\uC2A4 \uD5C8\uBE0C\uC758 \uB9AC\uD3EC\uC9C0\uD1A0\uB9AC\uC5D0 \uD478\uC2DC\uB429\uB2C8\uB2E4. \uB2E4\uC74C\uC740 "),bl=p("a"),xa=a("\uC608\uC81C \uB9AC\uD3EC\uC9C0\uD1A0\uB9AC"),Da=a("\uC785\uB2C8\uB2E4."),Ze=f(),Tl=p("h3"),ga=a("\uBA40\uD2F0 \uCEE8\uC149\uC5D0 \uB300\uD55C \uD559\uC2B5 \u{1F431}\u{1FAB5}"),Ne=f(),X=p("p"),El=p("a"),Ha=a("this"),qa=a("\uC640 \uC720\uC0AC\uD558\uAC8C \uAC01 \uCEE8\uC149\uC5D0 \uB300\uD55C \uC815\uBCF4\uAC00 \uD3EC\uD568\uB41C "),jl=p("a"),Pa=a("json"),Oa=a(" \uD30C\uC77C\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4."),Ie=f(),Ol=p("p"),Ka=a("\uC2E4\uC81C \uC774\uBBF8\uC9C0\uB97C \uC218\uC9D1\uD558\uB824\uBA74 json \uD30C\uC77C\uC758 \uAC01 \uCEE8\uC149\uC5D0 \uB300\uD574 \uC774 \uBA85\uB839\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4."),Ce=f(),m(vl.$$.fragment),We=f(),Kl=p("p"),lo=a("\uADF8\uB7FC \uC6B0\uB9AC\uB294 \uD559\uC2B5\uC2DC\uD0AC \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4!"),Xe=f(),m(Zl.$$.fragment),Re=f(),L=p("p"),to=a("\uB2E4\uC74C\uC740 "),Nl=p("a"),eo=a("Weights and Biases page"),so=a("\uC758 \uC608\uC2DC\uC774\uBA70, \uB2E4\uB978 \uD559\uC2B5 \uC138\uBD80 \uC815\uBCF4\uC640 \uD568\uAED8 \uC911\uAC04 \uACB0\uACFC\uB4E4\uC744 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ve=f(),Il=p("h3"),ao=a("\uC0AC\uB78C \uC5BC\uAD74\uC5D0 \uB300\uD55C \uD559\uC2B5"),Ge=f(),T=p("p"),oo=a("\uC0AC\uB78C \uC5BC\uAD74\uC5D0 \uB300\uD55C \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD574 \uB2E4\uC74C\uACFC \uAC19\uC740 \uC124\uC815\uC774 \uB354 \uD6A8\uACFC\uC801\uC774\uB77C\uB294 \uAC83\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4: "),Bt=p("code"),po=a("learning_rate=5e-6"),io=a(", "),At=p("code"),ro=a("max_train_steps=1000 to 2000"),no=a(", "),St=p("code"),fo=a("freeze_model=crossattn"),co=a("\uC744 \uCD5C\uC18C 15~20\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB85C \uC124\uC815\uD569\uB2C8\uB2E4."),Fe=f(),lt=p("p"),Mo=a("\uC2E4\uC81C \uC774\uBBF8\uC9C0\uB97C \uC218\uC9D1\uD558\uB824\uBA74 \uD6C8\uB828 \uC804\uC5D0 \uC774 \uBA85\uB839\uC744 \uBA3C\uC800 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."),$e=f(),m(Cl.$$.fragment),Be=f(),tt=p("p"),mo=a("\uC774\uC81C \uD559\uC2B5\uC744 \uC2DC\uC791\uD558\uC138\uC694!"),Ae=f(),m(Wl.$$.fragment),Se=f(),Xl=p("h2"),uo=a("\uCD94\uB860"),ze=f(),Rl=p("p"),_o=a("\uC704 \uD504\uB86C\uD504\uD2B8\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uD559\uC2B5\uC2DC\uD0A8 \uD6C4\uC5D0\uB294 \uC544\uB798 \uD504\uB86C\uD504\uD2B8\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uC744 \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD504\uB86C\uD504\uD2B8\uC5D0 \u2018modifier token\u2019(\uC608: \uC704 \uC608\uC81C\uC5D0\uC11C\uB294 \\"),zt=p("new1"),yo=a(")\uC744 \uBC18\uB4DC\uC2DC \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4."),Ye=f(),m(Vl.$$.fragment),ke=f(),et=p("p"),wo=a("\uD5C8\uBE0C \uB9AC\uD3EC\uC9C0\uD1A0\uB9AC\uC5D0\uC11C \uC774\uB7EC\uD55C \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC9C1\uC811 \uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Qe=f(),m(Gl.$$.fragment),Le=f(),st=p("p"),Uo=a("\uB2E4\uC74C\uC740 \uC5EC\uB7EC \uCEE8\uC149\uC73C\uB85C \uCD94\uB860\uC744 \uC218\uD589\uD558\uB294 \uC608\uC81C\uC785\uB2C8\uB2E4:"),xe=f(),m(Fl.$$.fragment),De=f(),at=p("p"),Jo=a("\uC5EC\uAE30\uC11C \u2018\uACE0\uC591\uC774\u2019\uC640 \u2018\uB098\uBB34 \uB0C4\uBE44\u2019\uB294 \uC5EC\uB7EC \uCEE8\uC149\uC744 \uB9D0\uD569\uB2C8\uB2E4."),ge=f(),$l=p("h3"),ho=a("\uD559\uC2B5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uCD94\uB860\uD558\uAE30"),He=f(),Bl=p("p"),Yt=p("code"),bo=a("--checkpointing_steps"),To=a("  \uC778\uC218\uB97C \uC0AC\uC6A9\uD55C \uACBD\uC6B0 \uD559\uC2B5 \uACFC\uC815\uC5D0\uC11C \uC800\uC7A5\uB41C \uC804\uCCB4 \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC911 \uD558\uB098\uC5D0\uC11C \uCD94\uB860\uC744 \uC218\uD589\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),qe=f(),R=p("h2"),x=p("a"),kt=p("span"),m(Al.$$.fragment),Eo=f(),Qt=p("span"),jo=a("Grads\uB97C None\uC73C\uB85C \uC124\uC815"),Pe=f(),D=p("p"),vo=a("\uB354 \uB9CE\uC740 \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD558\uB824\uBA74 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 "),Lt=p("code"),Zo=a("--set_grads_to_none"),No=a(" \uC778\uC218\uB97C \uC804\uB2EC\uD558\uC138\uC694. \uC774\uB807\uAC8C \uD558\uBA74 \uC131\uC801\uC774 0\uC774 \uC544\uB2CC \uC5C6\uC74C\uC73C\uB85C \uC124\uC815\uB429\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uD2B9\uC815 \uB3D9\uC791\uC774 \uBCC0\uACBD\uB418\uBBC0\uB85C \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD558\uBA74 \uC774 \uC778\uC218\uB97C \uC81C\uAC70\uD558\uC138\uC694."),Oe=f(),Sl=p("p"),Io=a("\uC790\uC138\uD55C \uC815\uBCF4: "),zl=p("a"),Co=a("https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.zero_grad.html"),Ke=f(),Yl=p("h2"),Wo=a("\uC2E4\uD5D8 \uACB0\uACFC"),ls=f(),g=p("p"),Xo=a("\uC2E4\uD5D8\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),kl=p("a"),Ro=a("\uB2F9\uC0AC \uC6F9\uD398\uC774\uC9C0"),Vo=a("\uB97C \uCC38\uC870\uD558\uC138\uC694."),this.h()},l(l){const s=mi('[data-svelte="svelte-1phssyn"]',document.head);v=i(s,"META",{name:!0,content:!0}),s.forEach(t),Ht=c(l),Z=i(l,"H1",{class:!0});var es=r(Z);G=i(es,"A",{id:!0,class:!0,href:!0});var zo=r(G);rt=i(zo,"SPAN",{});var Yo=r(rt);u(q.$$.fragment,Yo),Yo.forEach(t),zo.forEach(t),Us=c(es),nt=i(es,"SPAN",{});var ko=r(nt);Js=o(ko,"\uCEE4\uC2A4\uD140 Diffusion \uD559\uC2B5 \uC608\uC81C"),ko.forEach(t),es.forEach(t),qt=c(l),P=i(l,"P",{});var Go=r(P);O=i(Go,"A",{href:!0,rel:!0});var Qo=r(O);hs=o(Qo,"\uCEE4\uC2A4\uD140 Diffusion"),Qo.forEach(t),bs=o(Go,`\uC740 \uD53C\uC0AC\uCCB4\uC758 \uC774\uBBF8\uC9C0 \uBA87 \uC7A5(4~5\uC7A5)\uB9CC \uC8FC\uC5B4\uC9C0\uBA74 Stable Diffusion\uCC98\uB7FC text-to-image \uBAA8\uB378\uC744 \uCEE4\uC2A4\uD130\uB9C8\uC774\uC9D5\uD558\uB294 \uBC29\uBC95\uC785\uB2C8\uB2E4.
\u2018train_custom_diffusion.py\u2019 \uC2A4\uD06C\uB9BD\uD2B8\uB294 \uD559\uC2B5 \uACFC\uC815\uC744 \uAD6C\uD604\uD558\uACE0 \uC774\uB97C Stable Diffusion\uC5D0 \uB9DE\uAC8C \uC870\uC815\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.`),Go.forEach(t),Pt=c(l),F=i(l,"P",{});var ss=r(F);Ts=o(ss,"\uC774 \uAD50\uC721 \uC0AC\uB840\uB294 "),K=i(ss,"A",{href:!0,rel:!0});var Lo=r(K);Es=o(Lo,"Nupur Kumari"),Lo.forEach(t),js=o(ss,"\uAC00 \uC81C\uACF5\uD558\uC600\uC2B5\uB2C8\uB2E4. (Custom Diffusion\uC758 \uC800\uC790 \uC911 \uD55C\uBA85)."),ss.forEach(t),Ot=c(l),N=i(l,"H2",{class:!0});var as=r(N);$=i(as,"A",{id:!0,class:!0,href:!0});var xo=r($);ft=i(xo,"SPAN",{});var Do=r(ft);u(ll.$$.fragment,Do),Do.forEach(t),xo.forEach(t),vs=c(as),ct=i(as,"SPAN",{});var go=r(ct);Zs=o(go,"\uB85C\uCEEC\uC5D0\uC11C PyTorch\uB85C \uC2E4\uD589\uD558\uAE30"),go.forEach(t),as.forEach(t),Kt=c(l),I=i(l,"H3",{class:!0});var os=r(I);B=i(os,"A",{id:!0,class:!0,href:!0});var Ho=r(B);Mt=i(Ho,"SPAN",{});var qo=r(Mt);u(tl.$$.fragment,qo),qo.forEach(t),Ho.forEach(t),Ns=c(os),mt=i(os,"SPAN",{});var Po=r(mt);Is=o(Po,"Dependencies \uC124\uCE58\uD558\uAE30"),Po.forEach(t),os.forEach(t),le=c(l),Ql=i(l,"P",{});var Oo=r(Ql);Cs=o(Oo,"\uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC2E4\uD589\uD558\uAE30 \uC804\uC5D0 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC758 \uD559\uC2B5 dependencies\uB97C \uC124\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4:"),Oo.forEach(t),te=c(l),Ll=i(l,"P",{});var Ko=r(Ll);ut=i(Ko,"STRONG",{});var lp=r(ut);Ws=o(lp,"\uC911\uC694"),lp.forEach(t),Ko.forEach(t),ee=c(l),A=i(l,"P",{});var ps=r(A);Xs=o(ps,"\uC608\uC81C \uC2A4\uD06C\uB9BD\uD2B8\uC758 \uCD5C\uC2E0 \uBC84\uC804\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC2E4\uD589\uD558\uB824\uBA74 "),_t=i(ps,"STRONG",{});var tp=r(_t);Rs=o(tp,"\uC18C\uC2A4\uB85C\uBD80\uD130 \uC124\uCE58"),tp.forEach(t),Vs=o(ps,"\uD558\uB294 \uAC83\uC744 \uB9E4\uC6B0 \uAD8C\uC7A5\uD558\uBA70, \uC608\uC81C \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC790\uC8FC \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uB9CC\uD07C \uC77C\uBD80 \uC608\uC81C\uBCC4 \uC694\uAD6C \uC0AC\uD56D\uC744 \uC124\uCE58\uD558\uACE0 \uC124\uCE58\uB97C \uCD5C\uC2E0 \uC0C1\uD0DC\uB85C \uC720\uC9C0\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uC774\uB97C \uC704\uD574 \uC0C8 \uAC00\uC0C1 \uD658\uACBD\uC5D0\uC11C \uB2E4\uC74C \uB2E8\uACC4\uB97C \uC2E4\uD589\uD558\uC138\uC694:"),ps.forEach(t),se=c(l),u(el.$$.fragment,l),ae=c(l),sl=i(l,"P",{});var Fo=r(sl);al=i(Fo,"A",{href:!0,rel:!0});var ep=r(al);Gs=o(ep,"example folder"),ep.forEach(t),Fs=o(Fo,"\uB85C cd\uD558\uC5EC \uC774\uB3D9\uD558\uC138\uC694."),Fo.forEach(t),oe=c(l),u(ol.$$.fragment,l),pe=c(l),xl=i(l,"P",{});var sp=r(xl);$s=o(sp,"\uC774\uC81C \uC2E4\uD589"),sp.forEach(t),ie=c(l),u(pl.$$.fragment,l),re=c(l),S=i(l,"P",{});var is=r(S);Bs=o(is,"\uADF8\uB9AC\uACE0 "),il=i(is,"A",{href:!0,rel:!0});var ap=r(il);As=o(ap,"\u{1F917}Accelerate"),ap.forEach(t),Ss=o(is," \uD658\uACBD\uC744 \uCD08\uAE30\uD654:"),is.forEach(t),ne=c(l),u(rl.$$.fragment,l),fe=c(l),Dl=i(l,"P",{});var op=r(Dl);zs=o(op,"\uB610\uB294 \uC0AC\uC6A9\uC790 \uD658\uACBD\uC5D0 \uB300\uD55C \uC9C8\uBB38\uC5D0 \uB2F5\uD558\uC9C0 \uC54A\uACE0 \uAE30\uBCF8 \uAC00\uC18D \uAD6C\uC131\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uB2E4\uC74C\uACFC \uAC19\uC774 \uD558\uC138\uC694."),op.forEach(t),ce=c(l),u(nl.$$.fragment,l),Me=c(l),gl=i(l,"P",{});var pp=r(gl);Ys=o(pp,"\uB610\uB294 \uC0AC\uC6A9 \uC911\uC778 \uD658\uACBD\uC774 \uB300\uD654\uD615 \uC178\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uACBD\uC6B0(\uC608: jupyter notebook)"),pp.forEach(t),me=c(l),u(fl.$$.fragment,l),ue=c(l),cl=i(l,"H3",{id:!0});var ip=r(cl);ks=o(ip,"\uACE0\uC591\uC774 \uC608\uC81C \u{1F63A}"),ip.forEach(t),_e=c(l),E=i(l,"P",{});var ot=r(E);Qs=o(ot,"\uC774\uC81C \uB370\uC774\uD130\uC14B\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4. "),Ml=i(ot,"A",{href:!0,rel:!0});var rp=r(Ml);Ls=o(rp,"\uC5EC\uAE30"),rp.forEach(t),xs=o(ot,"\uC5D0\uC11C \uB370\uC774\uD130\uC14B\uC744 \uB2E4\uC6B4\uB85C\uB4DC\uD558\uACE0 \uC555\uCD95\uC744 \uD489\uB2C8\uB2E4. \uC9C1\uC811 \uB370\uC774\uD130\uC14B\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 "),Hl=i(ot,"A",{href:!0});var np=r(Hl);Ds=o(np,"\uD559\uC2B5\uC6A9 \uB370\uC774\uD130\uC14B \uC0DD\uC131\uD558\uAE30"),np.forEach(t),gs=o(ot," \uAC00\uC774\uB4DC\uB97C \uCC38\uACE0\uD558\uC138\uC694."),ot.forEach(t),de=c(l),U=i(l,"P",{});var h=r(U);Hs=o(h,"\uB610\uD55C \u2018clip-retrieval\u2019\uC744 \uC0AC\uC6A9\uD558\uC5EC 200\uAC1C\uC758 \uC2E4\uC81C \uC774\uBBF8\uC9C0\uB97C \uC218\uC9D1\uD558\uACE0, regularization\uC73C\uB85C\uC11C \uC774\uB97C \uD559\uC2B5 \uB370\uC774\uD130\uC14B\uC758 \uD0C0\uAC9F \uC774\uBBF8\uC9C0\uC640 \uACB0\uD569\uD569\uB2C8\uB2E4. \uC774\uB807\uAC8C \uD558\uBA74 \uC8FC\uC5B4\uC9C4 \uD0C0\uAC9F \uC774\uBBF8\uC9C0\uC5D0 \uB300\uD55C \uACFC\uC801\uD569\uC744 \uBC29\uC9C0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB2E4\uC74C \uD50C\uB798\uADF8\uB97C \uC0AC\uC6A9\uD558\uBA74 "),dt=i(h,"CODE",{});var fp=r(dt);qs=o(fp,"prior_loss_weight=1."),fp.forEach(t),Ps=o(h,"\uB85C "),yt=i(h,"CODE",{});var cp=r(yt);Os=o(cp,"prior_preservation"),cp.forEach(t),Ks=o(h,", "),wt=i(h,"CODE",{});var Mp=r(wt);la=o(Mp,"real_prior"),Mp.forEach(t),ta=o(h,` regularization\uC744 \uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uD074\uB798\uC2A4_\uD504\uB86C\uD504\uD2B8`),Ut=i(h,"CODE",{});var mp=r(Ut);ea=o(mp,"\uB294 \uB300\uC0C1 \uC774\uBBF8\uC9C0\uC640 \uB3D9\uC77C\uD55C \uCE74\uD14C\uACE0\uB9AC \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uC218\uC9D1\uB41C \uC2E4\uC81C \uC774\uBBF8\uC9C0\uC5D0\uB294 "),mp.forEach(t),sa=o(h,"class_prompt"),Jt=i(h,"CODE",{});var up=r(Jt);aa=o(up,"\uC640 \uC720\uC0AC\uD55C \uD14D\uC2A4\uD2B8 \uCEA1\uC158\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uAC80\uC0C9\uB41C \uC774\uBBF8\uC9C0\uB294 "),up.forEach(t),oa=o(h,"class_data_dir"),ht=i(h,"CODE",{});var _p=r(ht);pa=o(_p,"\uC5D0 \uC800\uC7A5\uB429\uB2C8\uB2E4. \uC0DD\uC131\uB41C \uC774\uBBF8\uC9C0\uB97C regularization\uC73C\uB85C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574 "),_p.forEach(t),ia=o(h,"real_prior`\uB97C \uBE44\uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC2E4\uC81C \uC774\uBBF8\uC9C0\uB97C \uC218\uC9D1\uD558\uB824\uBA74 \uD6C8\uB828 \uC804\uC5D0 \uC774 \uBA85\uB839\uC744 \uBA3C\uC800 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."),h.forEach(t),ye=c(l),u(ml.$$.fragment,l),we=c(l),ql=i(l,"P",{});var dp=r(ql);bt=i(dp,"STRONG",{});var yp=r(bt);Tt=i(yp,"STRONG",{});var wp=r(Tt);ul=i(wp,"EM",{});var rs=r(ul);ra=o(rs,"\uCC38\uACE0: "),_l=i(rs,"A",{href:!0,rel:!0});var Up=r(_l);na=o(Up,"stable-diffusion-2"),Up.forEach(t),fa=o(rs," 768x768 \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uB294 \uACBD\uC6B0 \u2018\uD574\uC0C1\uB3C4\u2019\uB97C 768\uB85C \uBCC0\uACBD\uD558\uC138\uC694."),rs.forEach(t),wp.forEach(t),yp.forEach(t),dp.forEach(t),Ue=c(l),z=i(l,"P",{});var ns=r(z);ca=o(ns,"\uC2A4\uD06C\uB9BD\uD2B8\uB294 \uBAA8\uB378 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC640 "),Et=i(ns,"CODE",{});var Jp=r(Et);Ma=o(Jp,"pytorch_custom_diffusion_weights.bin"),Jp.forEach(t),ma=o(ns," \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uC5EC \uC800\uC7A5\uC18C\uC5D0 \uC800\uC7A5\uD569\uB2C8\uB2E4."),ns.forEach(t),Je=c(l),u(dl.$$.fragment,l),he=c(l),Pl=i(l,"P",{});var hp=r(Pl);C=i(hp,"STRONG",{});var pt=r(C);ua=o(pt,"\uB354 \uB0AE\uC740 VRAM \uC694\uAD6C \uC0AC\uD56D(GPU\uB2F9 16GB)\uC73C\uB85C \uB354 \uBE60\uB974\uAC8C \uD6C8\uB828\uD558\uB824\uBA74 "),jt=i(pt,"CODE",{});var bp=r(jt);_a=o(bp,"--enable_xformers_memory_efficient_attention"),bp.forEach(t),da=o(pt,"\uC744 \uC0AC\uC6A9\uD558\uC138\uC694. \uC124\uCE58 \uBC29\uBC95\uC740 "),yl=i(pt,"A",{href:!0,rel:!0});var Tp=r(yl);ya=o(Tp,"\uAC00\uC774\uB4DC"),Tp.forEach(t),wa=o(pt,"\uB97C \uB530\uB974\uC138\uC694."),pt.forEach(t),hp.forEach(t),be=c(l),Y=i(l,"P",{});var fs=r(Y);Ua=o(fs,"\uAC00\uC911\uCE58 \uBC0F \uD3B8\uD5A5("),vt=i(fs,"CODE",{});var Ep=r(vt);Ja=o(Ep,"wandb"),Ep.forEach(t),ha=o(fs,")\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC2E4\uD5D8\uC744 \uCD94\uC801\uD558\uACE0 \uC911\uAC04 \uACB0\uACFC\uB97C \uC800\uC7A5\uD558\uB824\uBA74(\uAC15\uB825\uD788 \uAD8C\uC7A5\uD569\uB2C8\uB2E4) \uB2E4\uC74C \uB2E8\uACC4\uB97C \uB530\uB974\uC138\uC694:"),fs.forEach(t),Te=c(l),j=i(l,"UL",{});var it=r(j);k=i(it,"LI",{});var xt=r(k);Zt=i(xt,"CODE",{});var jp=r(Zt);ba=o(jp,"wandb"),jp.forEach(t),Ta=o(xt," \uC124\uCE58: "),Nt=i(xt,"CODE",{});var vp=r(Nt);Ea=o(vp,"pip install wandb"),vp.forEach(t),ja=o(xt,"."),xt.forEach(t),va=c(it),wl=i(it,"LI",{});var cs=r(wl);Za=o(cs,"\uB85C\uADF8\uC778 : "),It=i(cs,"CODE",{});var Zp=r(It);Na=o(Zp,"wandb login"),Zp.forEach(t),Ia=o(cs,"."),cs.forEach(t),Ca=c(it),b=i(it,"LI",{});var V=r(b);Wa=o(V,"\uADF8\uB7F0 \uB2E4\uC74C \uD2B8\uB808\uC774\uB2DD\uC744 \uC2DC\uC791\uD558\uB294 \uB3D9\uC548 "),Ct=i(V,"CODE",{});var Np=r(Ct);Xa=o(Np,"validation_prompt"),Np.forEach(t),Ra=o(V,"\uB97C \uC9C0\uC815\uD558\uACE0 "),Wt=i(V,"CODE",{});var Ip=r(Wt);Va=o(Ip,"report_to"),Ip.forEach(t),Ga=o(V,"\uB97C "),Xt=i(V,"CODE",{});var Cp=r(Xt);Fa=o(Cp,"wandb"),Cp.forEach(t),$a=o(V,"\uB85C \uC124\uC815\uD569\uB2C8\uB2E4. \uB2E4\uC74C\uACFC \uAC19\uC740 \uAD00\uB828 \uC778\uC218\uB97C \uAD6C\uC131\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4:"),Ul=i(V,"UL",{});var Ms=r(Ul);Rt=i(Ms,"LI",{});var Wp=r(Rt);Vt=i(Wp,"CODE",{});var Xp=r(Vt);Ba=o(Xp,"num_validation_images"),Xp.forEach(t),Wp.forEach(t),Aa=c(Ms),Gt=i(Ms,"LI",{});var Rp=r(Gt);Ft=i(Rp,"CODE",{});var Vp=r(Ft);Sa=o(Vp,"validation_steps"),Vp.forEach(t),Rp.forEach(t),Ms.forEach(t),V.forEach(t),it.forEach(t),Ee=c(l),u(Jl.$$.fragment,l),je=c(l),Q=i(l,"P",{});var ms=r(Q);za=o(ms,"\uB2E4\uC74C\uC740 "),hl=i(ms,"A",{href:!0,rel:!0});var Gp=r(hl);Ya=o(Gp,"Weights and Biases page"),Gp.forEach(t),ka=o(ms,"\uC758 \uC608\uC2DC\uC774\uBA70, \uC5EC\uB7EC \uD559\uC2B5 \uC138\uBD80 \uC815\uBCF4\uC640 \uD568\uAED8 \uC911\uAC04 \uACB0\uACFC\uB4E4\uC744 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ms.forEach(t),ve=c(l),W=i(l,"P",{});var Dt=r(W);$t=i(Dt,"CODE",{});var Fp=r($t);Qa=o(Fp,"--push_to_hub"),Fp.forEach(t),La=o(Dt,"\uB97C \uC9C0\uC815\uD558\uBA74 \uD559\uC2B5\uB41C \uD30C\uB77C\uBBF8\uD130\uAC00 \uD5C8\uAE45 \uD398\uC774\uC2A4 \uD5C8\uBE0C\uC758 \uB9AC\uD3EC\uC9C0\uD1A0\uB9AC\uC5D0 \uD478\uC2DC\uB429\uB2C8\uB2E4. \uB2E4\uC74C\uC740 "),bl=i(Dt,"A",{href:!0,rel:!0});var $p=r(bl);xa=o($p,"\uC608\uC81C \uB9AC\uD3EC\uC9C0\uD1A0\uB9AC"),$p.forEach(t),Da=o(Dt,"\uC785\uB2C8\uB2E4."),Dt.forEach(t),Ze=c(l),Tl=i(l,"H3",{id:!0});var Bp=r(Tl);ga=o(Bp,"\uBA40\uD2F0 \uCEE8\uC149\uC5D0 \uB300\uD55C \uD559\uC2B5 \u{1F431}\u{1FAB5}"),Bp.forEach(t),Ne=c(l),X=i(l,"P",{});var gt=r(X);El=i(gt,"A",{href:!0,rel:!0});var Ap=r(El);Ha=o(Ap,"this"),Ap.forEach(t),qa=o(gt,"\uC640 \uC720\uC0AC\uD558\uAC8C \uAC01 \uCEE8\uC149\uC5D0 \uB300\uD55C \uC815\uBCF4\uAC00 \uD3EC\uD568\uB41C "),jl=i(gt,"A",{href:!0,rel:!0});var Sp=r(jl);Pa=o(Sp,"json"),Sp.forEach(t),Oa=o(gt," \uD30C\uC77C\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4."),gt.forEach(t),Ie=c(l),Ol=i(l,"P",{});var zp=r(Ol);Ka=o(zp,"\uC2E4\uC81C \uC774\uBBF8\uC9C0\uB97C \uC218\uC9D1\uD558\uB824\uBA74 json \uD30C\uC77C\uC758 \uAC01 \uCEE8\uC149\uC5D0 \uB300\uD574 \uC774 \uBA85\uB839\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4."),zp.forEach(t),Ce=c(l),u(vl.$$.fragment,l),We=c(l),Kl=i(l,"P",{});var Yp=r(Kl);lo=o(Yp,"\uADF8\uB7FC \uC6B0\uB9AC\uB294 \uD559\uC2B5\uC2DC\uD0AC \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4!"),Yp.forEach(t),Xe=c(l),u(Zl.$$.fragment,l),Re=c(l),L=i(l,"P",{});var us=r(L);to=o(us,"\uB2E4\uC74C\uC740 "),Nl=i(us,"A",{href:!0,rel:!0});var kp=r(Nl);eo=o(kp,"Weights and Biases page"),kp.forEach(t),so=o(us,"\uC758 \uC608\uC2DC\uC774\uBA70, \uB2E4\uB978 \uD559\uC2B5 \uC138\uBD80 \uC815\uBCF4\uC640 \uD568\uAED8 \uC911\uAC04 \uACB0\uACFC\uB4E4\uC744 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),us.forEach(t),Ve=c(l),Il=i(l,"H3",{id:!0});var Qp=r(Il);ao=o(Qp,"\uC0AC\uB78C \uC5BC\uAD74\uC5D0 \uB300\uD55C \uD559\uC2B5"),Qp.forEach(t),Ge=c(l),T=i(l,"P",{});var H=r(T);oo=o(H,"\uC0AC\uB78C \uC5BC\uAD74\uC5D0 \uB300\uD55C \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD574 \uB2E4\uC74C\uACFC \uAC19\uC740 \uC124\uC815\uC774 \uB354 \uD6A8\uACFC\uC801\uC774\uB77C\uB294 \uAC83\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4: "),Bt=i(H,"CODE",{});var Lp=r(Bt);po=o(Lp,"learning_rate=5e-6"),Lp.forEach(t),io=o(H,", "),At=i(H,"CODE",{});var xp=r(At);ro=o(xp,"max_train_steps=1000 to 2000"),xp.forEach(t),no=o(H,", "),St=i(H,"CODE",{});var Dp=r(St);fo=o(Dp,"freeze_model=crossattn"),Dp.forEach(t),co=o(H,"\uC744 \uCD5C\uC18C 15~20\uAC1C\uC758 \uC774\uBBF8\uC9C0\uB85C \uC124\uC815\uD569\uB2C8\uB2E4."),H.forEach(t),Fe=c(l),lt=i(l,"P",{});var gp=r(lt);Mo=o(gp,"\uC2E4\uC81C \uC774\uBBF8\uC9C0\uB97C \uC218\uC9D1\uD558\uB824\uBA74 \uD6C8\uB828 \uC804\uC5D0 \uC774 \uBA85\uB839\uC744 \uBA3C\uC800 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."),gp.forEach(t),$e=c(l),u(Cl.$$.fragment,l),Be=c(l),tt=i(l,"P",{});var Hp=r(tt);mo=o(Hp,"\uC774\uC81C \uD559\uC2B5\uC744 \uC2DC\uC791\uD558\uC138\uC694!"),Hp.forEach(t),Ae=c(l),u(Wl.$$.fragment,l),Se=c(l),Xl=i(l,"H2",{id:!0});var qp=r(Xl);uo=o(qp,"\uCD94\uB860"),qp.forEach(t),ze=c(l),Rl=i(l,"P",{});var $o=r(Rl);_o=o($o,"\uC704 \uD504\uB86C\uD504\uD2B8\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uD559\uC2B5\uC2DC\uD0A8 \uD6C4\uC5D0\uB294 \uC544\uB798 \uD504\uB86C\uD504\uD2B8\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uC744 \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD504\uB86C\uD504\uD2B8\uC5D0 \u2018modifier token\u2019(\uC608: \uC704 \uC608\uC81C\uC5D0\uC11C\uB294 \\"),zt=i($o,"NEW1",{});var Pp=r(zt);yo=o(Pp,")\uC744 \uBC18\uB4DC\uC2DC \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4."),Pp.forEach(t),$o.forEach(t),Ye=c(l),u(Vl.$$.fragment,l),ke=c(l),et=i(l,"P",{});var Op=r(et);wo=o(Op,"\uD5C8\uBE0C \uB9AC\uD3EC\uC9C0\uD1A0\uB9AC\uC5D0\uC11C \uC774\uB7EC\uD55C \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC9C1\uC811 \uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Op.forEach(t),Qe=c(l),u(Gl.$$.fragment,l),Le=c(l),st=i(l,"P",{});var Kp=r(st);Uo=o(Kp,"\uB2E4\uC74C\uC740 \uC5EC\uB7EC \uCEE8\uC149\uC73C\uB85C \uCD94\uB860\uC744 \uC218\uD589\uD558\uB294 \uC608\uC81C\uC785\uB2C8\uB2E4:"),Kp.forEach(t),xe=c(l),u(Fl.$$.fragment,l),De=c(l),at=i(l,"P",{});var li=r(at);Jo=o(li,"\uC5EC\uAE30\uC11C \u2018\uACE0\uC591\uC774\u2019\uC640 \u2018\uB098\uBB34 \uB0C4\uBE44\u2019\uB294 \uC5EC\uB7EC \uCEE8\uC149\uC744 \uB9D0\uD569\uB2C8\uB2E4."),li.forEach(t),ge=c(l),$l=i(l,"H3",{id:!0});var ti=r($l);ho=o(ti,"\uD559\uC2B5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uCD94\uB860\uD558\uAE30"),ti.forEach(t),He=c(l),Bl=i(l,"P",{});var Bo=r(Bl);Yt=i(Bo,"CODE",{});var ei=r(Yt);bo=o(ei,"--checkpointing_steps"),ei.forEach(t),To=o(Bo,"  \uC778\uC218\uB97C \uC0AC\uC6A9\uD55C \uACBD\uC6B0 \uD559\uC2B5 \uACFC\uC815\uC5D0\uC11C \uC800\uC7A5\uB41C \uC804\uCCB4 \uCCB4\uD06C\uD3EC\uC778\uD2B8 \uC911 \uD558\uB098\uC5D0\uC11C \uCD94\uB860\uC744 \uC218\uD589\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4."),Bo.forEach(t),qe=c(l),R=i(l,"H2",{class:!0});var _s=r(R);x=i(_s,"A",{id:!0,class:!0,href:!0});var si=r(x);kt=i(si,"SPAN",{});var ai=r(kt);u(Al.$$.fragment,ai),ai.forEach(t),si.forEach(t),Eo=c(_s),Qt=i(_s,"SPAN",{});var oi=r(Qt);jo=o(oi,"Grads\uB97C None\uC73C\uB85C \uC124\uC815"),oi.forEach(t),_s.forEach(t),Pe=c(l),D=i(l,"P",{});var ds=r(D);vo=o(ds,"\uB354 \uB9CE\uC740 \uBA54\uBAA8\uB9AC\uB97C \uC808\uC57D\uD558\uB824\uBA74 \uC2A4\uD06C\uB9BD\uD2B8\uC5D0 "),Lt=i(ds,"CODE",{});var pi=r(Lt);Zo=o(pi,"--set_grads_to_none"),pi.forEach(t),No=o(ds," \uC778\uC218\uB97C \uC804\uB2EC\uD558\uC138\uC694. \uC774\uB807\uAC8C \uD558\uBA74 \uC131\uC801\uC774 0\uC774 \uC544\uB2CC \uC5C6\uC74C\uC73C\uB85C \uC124\uC815\uB429\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uD2B9\uC815 \uB3D9\uC791\uC774 \uBCC0\uACBD\uB418\uBBC0\uB85C \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD558\uBA74 \uC774 \uC778\uC218\uB97C \uC81C\uAC70\uD558\uC138\uC694."),ds.forEach(t),Oe=c(l),Sl=i(l,"P",{});var Ao=r(Sl);Io=o(Ao,"\uC790\uC138\uD55C \uC815\uBCF4: "),zl=i(Ao,"A",{href:!0,rel:!0});var ii=r(zl);Co=o(ii,"https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.zero_grad.html"),ii.forEach(t),Ao.forEach(t),Ke=c(l),Yl=i(l,"H2",{id:!0});var ri=r(Yl);Wo=o(ri,"\uC2E4\uD5D8 \uACB0\uACFC"),ri.forEach(t),ls=c(l),g=i(l,"P",{});var ys=r(g);Xo=o(ys,"\uC2E4\uD5D8\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),kl=i(ys,"A",{href:!0,rel:!0});var ni=r(kl);Ro=o(ni,"\uB2F9\uC0AC \uC6F9\uD398\uC774\uC9C0"),ni.forEach(t),Vo=o(ys,"\uB97C \uCC38\uC870\uD558\uC138\uC694."),ys.forEach(t),this.h()},h(){M(v,"name","hf:doc:metadata"),M(v,"content",JSON.stringify(yi)),M(G,"id","diffusion"),M(G,"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"),M(G,"href","#diffusion"),M(Z,"class","relative group"),M(O,"href","https://arxiv.org/abs/2212.04488"),M(O,"rel","nofollow"),M(K,"href","https://nupurkmr9.github.io/"),M(K,"rel","nofollow"),M($,"id","pytorch"),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"),M($,"href","#pytorch"),M(N,"class","relative group"),M(B,"id","dependencies"),M(B,"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"),M(B,"href","#dependencies"),M(I,"class","relative group"),M(al,"href","https://github.com/huggingface/diffusers/tree/main/examples/custom_diffusion"),M(al,"rel","nofollow"),M(il,"href","https://github.com/huggingface/accelerate/"),M(il,"rel","nofollow"),M(cl,"id",""),M(Ml,"href","https://www.cs.cmu.edu/~custom-diffusion/assets/data.zip"),M(Ml,"rel","nofollow"),M(Hl,"href","create_dataset"),M(_l,"href","https://huggingface.co/stabilityai/stable-diffusion-2"),M(_l,"rel","nofollow"),M(yl,"href","https://github.com/facebookresearch/xformers"),M(yl,"rel","nofollow"),M(hl,"href","https://wandb.ai/sayakpaul/custom-diffusion/runs/26ghrcau"),M(hl,"rel","nofollow"),M(bl,"href","https://huggingface.co/sayakpaul/custom-diffusion-cat"),M(bl,"rel","nofollow"),M(Tl,"id",""),M(El,"href","https://github.com/ShivamShrirao/diffusers/blob/main/examples/dreambooth/train_dreambooth.py"),M(El,"rel","nofollow"),M(jl,"href","https://github.com/adobe-research/custom-diffusion/blob/main/assets/concept_list.json"),M(jl,"rel","nofollow"),M(Nl,"href","https://wandb.ai/sayakpaul/custom-diffusion/runs/3990tzkg"),M(Nl,"rel","nofollow"),M(Il,"id",""),M(Xl,"id",""),M($l,"id",""),M(x,"id","grads-none"),M(x,"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"),M(x,"href","#grads-none"),M(R,"class","relative group"),M(zl,"href","https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.zero_grad.html"),M(zl,"rel","nofollow"),M(Yl,"id",""),M(kl,"href","https://www.cs.cmu.edu/~custom-diffusion/"),M(kl,"rel","nofollow")},m(l,s){e(document.head,v),n(l,Ht,s),n(l,Z,s),e(Z,G),e(G,rt),_(q,rt,null),e(Z,Us),e(Z,nt),e(nt,Js),n(l,qt,s),n(l,P,s),e(P,O),e(O,hs),e(P,bs),n(l,Pt,s),n(l,F,s),e(F,Ts),e(F,K),e(K,Es),e(F,js),n(l,Ot,s),n(l,N,s),e(N,$),e($,ft),_(ll,ft,null),e(N,vs),e(N,ct),e(ct,Zs),n(l,Kt,s),n(l,I,s),e(I,B),e(B,Mt),_(tl,Mt,null),e(I,Ns),e(I,mt),e(mt,Is),n(l,le,s),n(l,Ql,s),e(Ql,Cs),n(l,te,s),n(l,Ll,s),e(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t),_(Al,kt,null),e(R,Eo),e(R,Qt),e(Qt,jo),n(l,Pe,s),n(l,D,s),e(D,vo),e(D,Lt),e(Lt,Zo),e(D,No),n(l,Oe,s),n(l,Sl,s),e(Sl,Io),e(Sl,zl),e(zl,Co),n(l,Ke,s),n(l,Yl,s),e(Yl,Wo),n(l,ls,s),n(l,g,s),e(g,Xo),e(g,kl),e(kl,Ro),e(g,Vo),ts=!0},p:ui,i(l){ts||(d(q.$$.fragment,l),d(ll.$$.fragment,l),d(tl.$$.fragment,l),d(el.$$.fragment,l),d(ol.$$.fragment,l),d(pl.$$.fragment,l),d(rl.$$.fragment,l),d(nl.$$.fragment,l),d(fl.$$.fragment,l),d(ml.$$.fragment,l),d(dl.$$.fragment,l),d(Jl.$$.fragment,l),d(vl.$$.fragment,l),d(Zl.$$.fragment,l),d(Cl.$$.fragment,l),d(Wl.$$.fragment,l),d(Vl.$$.fragment,l),d(Gl.$$.fragment,l),d(Fl.$$.fragment,l),d(Al.$$.fragment,l),ts=!0)},o(l){y(q.$$.fragment,l),y(ll.$$.fragment,l),y(tl.$$.fragment,l),y(el.$$.fragment,l),y(ol.$$.fragment,l),y(pl.$$.fragment,l),y(rl.$$.fragment,l),y(nl.$$.fragment,l),y(fl.$$.fragment,l),y(ml.$$.fragment,l),y(dl.$$.fragment,l),y(Jl.$$.fragment,l),y(vl.$$.fragment,l),y(Zl.$$.fragment,l),y(Cl.$$.fragment,l),y(Wl.$$.fragment,l),y(Vl.$$.fragment,l),y(Gl.$$.fragment,l),y(Fl.$$.fragment,l),y(Al.$$.fragment,l),ts=!1},d(l){t(v),l&&t(Ht),l&&t(Z),w(q),l&&t(qt),l&&t(P),l&&t(Pt),l&&t(F),l&&t(Ot),l&&t(N),w(ll),l&&t(Kt),l&&t(I),w(tl),l&&t(le),l&&t(Ql),l&&t(te),l&&t(Ll),l&&t(ee),l&&t(A),l&&t(se),w(el,l),l&&t(ae),l&&t(sl),l&&t(oe),w(ol,l),l&&t(pe),l&&t(xl),l&&t(ie),w(pl,l),l&&t(re),l&&t(S),l&&t(ne),w(rl,l),l&&t(fe),l&&t(Dl),l&&t(ce),w(nl,l),l&&t(Me),l&&t(gl),l&&t(me),w(fl,l),l&&t(ue),l&&t(cl),l&&t(_e),l&&t(E),l&&t(de),l&&t(U),l&&t(ye),w(ml,l),l&&t(we),l&&t(ql),l&&t(Ue),l&&t(z),l&&t(Je),w(dl,l),l&&t(he),l&&t(Pl),l&&t(be),l&&t(Y),l&&t(Te),l&&t(j),l&&t(Ee),w(Jl,l),l&&t(je),l&&t(Q),l&&t(ve),l&&t(W),l&&t(Ze),l&&t(Tl),l&&t(Ne),l&&t(X),l&&t(Ie),l&&t(Ol),l&&t(Ce),w(vl,l),l&&t(We),l&&t(Kl),l&&t(Xe),w(Zl,l),l&&t(Re),l&&t(L),l&&t(Ve),l&&t(Il),l&&t(Ge),l&&t(T),l&&t(Fe),l&&t(lt),l&&t($e),w(Cl,l),l&&t(Be),l&&t(tt),l&&t(Ae),w(Wl,l),l&&t(Se),l&&t(Xl),l&&t(ze),l&&t(Rl),l&&t(Ye),w(Vl,l),l&&t(ke),l&&t(et),l&&t(Qe),w(Gl,l),l&&t(Le),l&&t(st),l&&t(xe),w(Fl,l),l&&t(De),l&&t(at),l&&t(ge),l&&t($l),l&&t(He),l&&t(Bl),l&&t(qe),l&&t(R),w(Al),l&&t(Pe),l&&t(D),l&&t(Oe),l&&t(Sl),l&&t(Ke),l&&t(Yl),l&&t(ls),l&&t(g)}}}const yi={local:"diffusion",sections:[{local:"pytorch",sections:[{local:"dependencies",title:"Dependencies \uC124\uCE58\uD558\uAE30"},{local:"",title:"\uACE0\uC591\uC774 \uC608\uC81C \u{1F63A}"},{local:"",title:"\uBA40\uD2F0 \uCEE8\uC149\uC5D0 \uB300\uD55C \uD559\uC2B5 \u{1F431}\u{1FAB5}"},{local:"",title:"\uC0AC\uB78C \uC5BC\uAD74\uC5D0 \uB300\uD55C \uD559\uC2B5"}],title:"\uB85C\uCEEC\uC5D0\uC11C PyTorch\uB85C \uC2E4\uD589\uD558\uAE30"},{local:"",sections:[{local:"",title:"\uD559\uC2B5\uB41C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uC5D0\uC11C \uCD94\uB860\uD558\uAE30"}],title:"\uCD94\uB860"},{local:"grads-none",title:"Grads\uB97C None\uC73C\uB85C \uC124\uC815"},{local:"",title:"\uC2E4\uD5D8 \uACB0\uACFC"}],title:"\uCEE4\uC2A4\uD140 Diffusion \uD559\uC2B5 \uC608\uC81C "};function wi(So){return _i(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bi extends fi{constructor(v){super();ci(this,v,wi,di,Mi,{})}}export{bi as default,yi as metadata};
