import{s as Ot,o as Pt,n as zt}from"../chunks/scheduler.23542ac5.js";import{S as Kt,i as ls,e as n,s as a,c as U,h as es,a as p,d as t,b as i,f as Yt,g as m,j as o,k as Z,l as ts,m as s,n as u,t as c,o as f,p as d}from"../chunks/index.9b1f405b.js";import{C as ss,H as F,E as as}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.5bcbaa63.js";import{C as b}from"../chunks/CodeBlock.e82446dd.js";import{D as is}from"../chunks/DocNotebookDropdown.68a629d2.js";import{H as ns,a as Dt}from"../chunks/HfOption.ea0ad09a.js";function ps(G){let J,V='Kohya LoRA를 불러오기 위해, 예시로 <a href="https://civitai.com/" rel="nofollow">Civitai</a>에서 <a href="https://civitai.com/models/150986/blueprintify-sd-xl-10" rel="nofollow">Blueprintify SD XL 1.0</a> 체크포인트를 다운로드합니다:',h,T,r,y,g="LoRA 체크포인트를 <code>load_lora_weights()</code> 메서드로 불러오고 <code>weight_name</code> 파라미터에 파일명을 지정합니다:",B,w,$,j,Yl="이미지를 생성합니다:",W,Q,q,I,R='<p>Kohya LoRA를 🤗 Diffusers와 함께 사용할 때 몇 가지 제한 사항이 있습니다:</p> <ul><li><a href="https://github.com/huggingface/diffusers/pull/4287/#issuecomment-1655110736" rel="nofollow">여기</a>에 설명된 여러 가지 이유로 인해 이미지가 ComfyUI와 같은 UI에서 생성된 이미지와 다르게 보일 수 있습니다.</li> <li><a href="https://github.com/KohakuBlueleaf/LyCORIS" rel="nofollow">LyCORIS 체크포인트</a>가 완전히 지원되지 않습니다. <code>load_lora_weights()</code> 메서드는 LoRA 및 LoCon 모듈로 LyCORIS 체크포인트를 불러올 수 있지만, Hada 및 LoKR은 지원되지 않습니다.</li></ul>',Y;return T=new b({props:{code:"IXdnZXQlMjBodHRwcyUzQSUyRiUyRmNpdml0YWkuY29tJTJGYXBpJTJGZG93bmxvYWQlMkZtb2RlbHMlMkYxNjg3NzYlMjAtTyUyMGJsdWVwcmludGlmeS1zZC14bC0xMC5zYWZldGVuc29ycw==",highlighted:"!wget https://civitai.com/api/download/models/168776 -O blueprintify-sd-xl-10.safetensors",wrap:!1}}),w=new b({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMnBhdGglMkZ0byUyRndlaWdodHMlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmJsdWVwcmludGlmeS1zZC14bC0xMC5zYWZldGVuc29ycyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(<span class="hljs-string">&quot;path/to/weights&quot;</span>, weight_name=<span class="hljs-string">&quot;blueprintify-sd-xl-10.safetensors&quot;</span>)`,wrap:!1}}),Q=new b({props:{code:"JTIzJTIwTG9SQSVFQiVBNSVCQyUyMCVFRCU4QSVCOCVFQiVBNiVBQyVFQSVCMSVCMCVFRCU5NSU5OCVFQSVCOCVCMCUyMCVFQyU5QyU4NCVFRCU5NSVCNCUyMGJsM3VwcmludCVFQiVBNSVCQyUyMCVFRCU5NCU4NCVFQiVBMSVBQyVFRCU5NCU4NCVFRCU4QSVCOCVFQyU5NyU5MCUyMCVFQyU4MiVBQyVFQyU5QSVBOSUwQXByb21wdCUyMCUzRCUyMCUyMmJsM3VwcmludCUyQyUyMGElMjBoaWdobHklMjBkZXRhaWxlZCUyMGJsdWVwcmludCUyMG9mJTIwdGhlJTIwZWlmZmVsJTIwdG93ZXIlMkMlMjBleHBsYWluaW5nJTIwaG93JTIwdG8lMjBidWlsZCUyMGFsbCUyMHBhcnRzJTJDJTIwbWFueSUyMHR4dCUyQyUyMGJsdWVwcmludCUyMGdyaWQlMjBiYWNrZHJvcCUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`<span class="hljs-comment"># LoRA를 트리거하기 위해 bl3uprint를 프롬프트에 사용</span>
prompt = <span class="hljs-string">&quot;bl3uprint, a highly detailed blueprint of the eiffel tower, explaining how to build all parts, many txt, blueprint grid backdrop&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),{c(){J=n("p"),J.innerHTML=V,h=a(),U(T.$$.fragment),r=a(),y=n("p"),y.innerHTML=g,B=a(),U(w.$$.fragment),$=a(),j=n("p"),j.textContent=Yl,W=a(),U(Q.$$.fragment),q=a(),I=n("blockquote"),I.innerHTML=R,this.h()},l(M){J=p(M,"P",{"data-svelte-h":!0}),o(J)!=="svelte-impx4k"&&(J.innerHTML=V),h=i(M),m(T.$$.fragment,M),r=i(M),y=p(M,"P",{"data-svelte-h":!0}),o(y)!=="svelte-zii06v"&&(y.innerHTML=g),B=i(M),m(w.$$.fragment,M),$=i(M),j=p(M,"P",{"data-svelte-h":!0}),o(j)!=="svelte-1ouwme5"&&(j.textContent=Yl),W=i(M),m(Q.$$.fragment,M),q=i(M),I=p(M,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(I)!=="svelte-zkzotx"&&(I.innerHTML=R),this.h()},h(){Z(I,"class","warning")},m(M,C){s(M,J,C),s(M,h,C),u(T,M,C),s(M,r,C),s(M,y,C),s(M,B,C),u(w,M,C),s(M,$,C),s(M,j,C),s(M,W,C),u(Q,M,C),s(M,q,C),s(M,I,C),Y=!0},p:zt,i(M){Y||(c(T.$$.fragment,M),c(w.$$.fragment,M),c(Q.$$.fragment,M),Y=!0)},o(M){f(T.$$.fragment,M),f(w.$$.fragment,M),f(Q.$$.fragment,M),Y=!1},d(M){M&&(t(J),t(h),t(r),t(y),t(B),t($),t(j),t(W),t(q),t(I)),d(T,M),d(w,M),d(Q,M)}}}function os(G){let J,V='TheLastBen에서 체크포인트를 불러오는 방법은 매우 유사합니다. 예를 들어, <a href="https://huggingface.co/TheLastBen/William_Eggleston_Style_SDXL" rel="nofollow">TheLastBen/William_Eggleston_Style_SDXL</a> 체크포인트를 불러오려면:',h,T,r;return T=new b({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMlRoZUxhc3RCZW4lMkZXaWxsaWFtX0VnZ2xlc3Rvbl9TdHlsZV9TRFhMJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJ3ZWdnLnNhZmV0ZW5zb3JzJTIyKSUwQSUwQSUyMyUyMExvUkElRUIlQTUlQkMlMjAlRUQlOEElQjglRUIlQTYlQUMlRUElQjElQjAlRUQlOTUlOTglRUElQjglQjAlMjAlRUMlOUMlODQlRUQlOTUlQjQlMjB3aWxsaWFtJTIwZWdnbGVzdG9uJUVCJUE1JUJDJTIwJUVEJTk0JTg0JUVCJUExJUFDJUVEJTk0JTg0JUVEJThBJUI4JUVDJTk3JTkwJTIwJUVDJTgyJUFDJUVDJTlBJUE5JTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMGhvdXNlJTIwYnklMjB3aWxsaWFtJTIwZWdnbGVzdG9uJTJDJTIwc3VucmF5cyUyQyUyMGJlYXV0aWZ1bCUyQyUyMHN1bmxpZ2h0JTJDJTIwc3VucmF5cyUyQyUyMGJlYXV0aWZ1bCUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0JTNEcHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.load_lora_weights(<span class="hljs-string">&quot;TheLastBen/William_Eggleston_Style_SDXL&quot;</span>, weight_name=<span class="hljs-string">&quot;wegg.safetensors&quot;</span>)

<span class="hljs-comment"># LoRA를 트리거하기 위해 william eggleston를 프롬프트에 사용</span>
prompt = <span class="hljs-string">&quot;a house by william eggleston, sunrays, beautiful, sunlight, sunrays, beautiful&quot;</span>
image = pipeline(prompt=prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),{c(){J=n("p"),J.innerHTML=V,h=a(),U(T.$$.fragment)},l(y){J=p(y,"P",{"data-svelte-h":!0}),o(J)!=="svelte-fle9ti"&&(J.innerHTML=V),h=i(y),m(T.$$.fragment,y)},m(y,g){s(y,J,g),s(y,h,g),u(T,y,g),r=!0},p:zt,i(y){r||(c(T.$$.fragment,y),r=!0)},o(y){f(T.$$.fragment,y),r=!1},d(y){y&&(t(J),t(h)),d(T,y)}}}function Ms(G){let J,V,h,T;return J=new Dt({props:{id:"other-trainers",option:"Kohya",$$slots:{default:[ps]},$$scope:{ctx:G}}}),h=new Dt({props:{id:"other-trainers",option:"TheLastBen",$$slots:{default:[os]},$$scope:{ctx:G}}}),{c(){U(J.$$.fragment),V=a(),U(h.$$.fragment)},l(r){m(J.$$.fragment,r),V=i(r),m(h.$$.fragment,r)},m(r,y){u(J,r,y),s(r,V,y),u(h,r,y),T=!0},p(r,y){const g={};y&2&&(g.$$scope={dirty:y,ctx:r}),J.$set(g);const B={};y&2&&(B.$$scope={dirty:y,ctx:r}),h.$set(B)},i(r){T||(c(J.$$.fragment,r),c(h.$$.fragment,r),T=!0)},o(r){f(J.$$.fragment,r),f(h.$$.fragment,r),T=!1},d(r){r&&t(V),d(J,r),d(h,r)}}}function rs(G){let J,V,h,T,r,y,g,B,w,$,j,Yl='특정 물체의 이미지 또는 특정 스타일의 이미지를 생성하도록 diffusion 모델을 개인화하기 위한 몇 가지 <a href="../training/overview">학습</a> 기법이 있습니다. 이러한 학습 방법은 각각 다른 유형의 어댑터를 생성합니다. 일부 어댑터는 완전히 새로운 모델을 생성하는 반면, 다른 어댑터는 임베딩 또는 가중치의 작은 부분만 수정합니다. 이는 각 어댑터의 로딩 프로세스도 다르다는 것을 의미합니다.',W,Q,q="이 가이드에서는 DreamBooth, textual inversion 및 LoRA 가중치를 불러오는 방법을 설명합니다.",I,R,Y='<p>사용할 체크포인트와 임베딩은 <a href="https://huggingface.co/spaces/sd-concepts-library/stable-diffusion-conceptualizer" rel="nofollow">Stable Diffusion Conceptualizer</a>, <a href="https://huggingface.co/spaces/multimodalart/LoraTheExplorer" rel="nofollow">LoRA the Explorer</a>, <a href="https://huggingface.co/spaces/huggingface-projects/diffusers-gallery" rel="nofollow">Diffusers Models Gallery</a>에서 찾아보시기 바랍니다.</p>',M,C,zl,D,ot='<a href="https://dreambooth.github.io/" rel="nofollow">DreamBooth</a>는 물체의 여러 이미지에 대한 <em>diffusion 모델 전체</em>를 미세 조정하여 새로운 스타일과 설정으로 해당 물체의 이미지를 생성합니다. 이 방법은 모델이 물체 이미지와 연관시키는 방법을 학습하는 프롬프트에 특수 단어를 사용하는 방식으로 작동합니다. 모든 학습 방법 중에서 드림부스는 전체 체크포인트 모델이기 때문에 파일 크기가 가장 큽니다(보통 몇 GB).',Ol,z,Mt='Hergé가 그린 단 10개의 이미지로 학습된 <a href="https://huggingface.co/sd-dreambooth-library/herge-style" rel="nofollow">herge_style</a> 체크포인트를 불러와 해당 스타일의 이미지를 생성해 보겠습니다. 이 모델이 작동하려면 체크포인트를 트리거하는 프롬프트에 특수 단어 <code>herge_style</code>을 포함시켜야 합니다:',Pl,O,Kl,v,rt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_dreambooth.png"/>',le,P,ee,K,yt='<a href="https://textual-inversion.github.io/" rel="nofollow">Textual inversion</a>은 DreamBooth와 매우 유사하며 몇 개의 이미지만으로 특정 개념(스타일, 개체)을 생성하는 diffusion 모델을 개인화할 수도 있습니다. 이 방법은 프롬프트에 특정 단어를 입력하면 해당 이미지를 나타내는 새로운 임베딩을 학습하고 찾아내는 방식으로 작동합니다. 결과적으로 diffusion 모델 가중치는 동일하게 유지되고 훈련 프로세스는 비교적 작은(수 KB) 파일을 생성합니다.',te,ll,Ut="Textual inversion은 임베딩을 생성하기 때문에 DreamBooth처럼 단독으로 사용할 수 없으며 또 다른 모델이 필요합니다.",se,el,ae,tl,mt='이제 <code>load_textual_inversion()</code> 메서드를 사용하여 textual inversion 임베딩을 불러와 이미지를 생성할 수 있습니다. <a href="https://huggingface.co/sd-concepts-library/gta5-artwork" rel="nofollow">sd-concepts-library/gta5-artwork</a> 임베딩을 불러와 보겠습니다. 이를 트리거하려면 프롬프트에 특수 단어 <code>&lt;gta5-artwork&gt;</code>를 포함시켜야 합니다:',ie,sl,ne,_,ut='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_txt_embed.png"/>',pe,al,ct="Textual inversion은 또한 바람직하지 않은 사물에 대해 <em>네거티브 임베딩</em>을 생성하여 모델이 흐릿한 이미지나 손의 추가 손가락과 같은 바람직하지 않은 사물이 포함된 이미지를 생성하지 못하도록 학습할 수도 있습니다. 이는 프롬프트를 빠르게 개선하는 것이 쉬운 방법이 될 수 있습니다. 이는 이전과 같이 임베딩을 <code>load_textual_inversion()</code>으로 불러오지만 이번에는 두 개의 매개변수가 더 필요합니다:",oe,il,ft="<li><code>weight_name</code>: 파일이 특정 이름의 🤗 Diffusers 형식으로 저장된 경우이거나 파일이 A1111 형식으로 저장된 경우, 불러올 가중치 파일을 지정합니다.</li> <li><code>token</code>: 임베딩을 트리거하기 위해 프롬프트에서 사용할 특수 단어를 지정합니다.</li>",Me,nl,dt='<a href="https://huggingface.co/sayakpaul/EasyNegative-test" rel="nofollow">sayakpaul/EasyNegative-test</a> 임베딩을 불러와 보겠습니다:',re,pl,ye,ol,Jt="이제 <code>token</code>을 사용해 네거티브 임베딩이 있는 이미지를 생성할 수 있습니다:",Ue,Ml,me,k,Tt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png"/>',ue,rl,ce,yl,ht='<a href="https://huggingface.co/papers/2106.09685" rel="nofollow">Low-Rank Adaptation (LoRA)</a>은 속도가 빠르고 파일 크기가 (수백 MB로) 작기 때문에 널리 사용되는 학습 기법입니다. 이 가이드의 다른 방법과 마찬가지로, LoRA는 몇 장의 이미지만으로 새로운 스타일을 학습하도록 모델을 학습시킬 수 있습니다. 이는 diffusion 모델에 새로운 가중치를 삽입한 다음 전체 모델 대신 새로운 가중치만 학습시키는 방식으로 작동합니다. 따라서 LoRA를 더 빠르게 학습시키고 더 쉽게 저장할 수 있습니다.',fe,L,Ct='<p>LoRA는 다른 학습 방법과 함께 사용할 수 있는 매우 일반적인 학습 기법입니다. 예를 들어, DreamBooth와 LoRA로 모델을 학습하는 것이 일반적입니다. 또한 새롭고 고유한 이미지를 생성하기 위해 여러 개의 LoRA를 불러오고 병합하는 것이 점점 더 일반화되고 있습니다. 병합은 이 불러오기 가이드의 범위를 벗어나므로 자세한 내용은 심층적인 <a href="merge_loras">LoRA 병합</a> 가이드에서 확인할 수 있습니다.</p>',de,Ul,bt="LoRA는 다른 모델과 함께 사용해야 합니다:",Je,ml,Te,ul,gt='그리고 <code>load_lora_weights()</code> 메서드를 사용하여 <a href="https://huggingface.co/ostris/super-cereal-sdxl-lora" rel="nofollow">ostris/super-cereal-sdxl-lora</a> 가중치를 불러오고 리포지토리에서 가중치 파일명을 지정합니다:',he,cl,Ce,x,Vt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_lora.png"/>',be,fl,wt="<code>load_lora_weights()</code> 메서드는 LoRA 가중치를 UNet과 텍스트 인코더에 모두 불러옵니다. 이 메서드는 해당 케이스에서 LoRA를 불러오는 데 선호되는 방식입니다:",ge,dl,jt="<li>LoRA 가중치에 UNet 및 텍스트 인코더에 대한 별도의 식별자가 없는 경우</li> <li>LoRA 가중치에 UNet과 텍스트 인코더에 대한 별도의 식별자가 있는 경우</li>",Ve,Jl,Qt='하지만 LoRA 가중치만 UNet에 로드해야 하는 경우에는 <code>load_attn_procs()</code> 메서드를 사용할 수 있습니다. <a href="https://huggingface.co/jbilcke-hf/sdxl-cinematic-1" rel="nofollow">jbilcke-hf/sdxl-cinematic-1</a> LoRA를 불러와 보겠습니다:',we,Tl,je,X,Zt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_attn_proc.png"/>',Qe,hl,It="LoRA 가중치를 언로드하려면 <code>unload_lora_weights()</code> 메서드를 사용하여 LoRA 가중치를 삭제하고 모델을 원래 가중치로 복원합니다:",Ze,Cl,Ie,bl,Be,gl,Bt="<code>load_lora_weights()</code> 및 <code>load_attn_procs()</code> 모두 <code>cross_attention_kwargs={&quot;scale&quot;: 0.5}</code> 파라미터를 전달하여 얼마나 LoRA 가중치를 사용할지 조정할 수 있습니다. 값이 <code>0</code>이면 기본 모델 가중치만 사용하는 것과 같고, 값이 <code>1</code>이면 완전히 미세 조정된 LoRA를 사용하는 것과 같습니다.",Re,Vl,Rt="레이어당 사용되는 LoRA 가중치의 양을 보다 세밀하게 제어하려면 <code>set_adapters()</code>를 사용하여 각 레이어의 가중치를 얼마만큼 조정할지 지정하는 딕셔너리를 전달할 수 있습니다.",$e,wl,We,jl,$t='이는 여러 어댑터에서도 작동합니다. 방법은 <a href="https://huggingface.co/docs/diffusers/tutorials/using_peft_for_inference#customize-adapters-strength" rel="nofollow">이 가이드</a>를 참조하세요.',Fe,S,Wt="<p>현재 <code>set_adapters()</code>는 어텐션 가중치의 스케일링만 지원합니다. LoRA에 다른 부분(예: resnets or down-/upsamplers)이 있는 경우 1.0의 스케일을 유지합니다.</p>",Ge,Ql,ve,Zl,Ft='커뮤니티에서 인기 있는 다른 LoRA trainer로는 <a href="https://github.com/kohya-ss/sd-scripts/" rel="nofollow">Kohya</a>와 <a href="https://github.com/TheLastBen/fast-stable-diffusion" rel="nofollow">TheLastBen</a>의 trainer가 있습니다. 이 trainer들은 🤗 Diffusers가 훈련한 것과는 다른 LoRA 체크포인트를 생성하지만, 같은 방식으로 불러올 수 있습니다.',_e,H,ke,Il,Le,Bl,Gt='<a href="https://ip-adapter.github.io/" rel="nofollow">IP-Adapter</a>는 모든 diffusion 모델에 이미지 프롬프트를 사용할 수 있는 경량 어댑터입니다. 이 어댑터는 이미지와 텍스트 feature의 cross-attention 레이어를 분리하여 작동합니다. 다른 모든 모델 컴포넌트튼 freeze되고 UNet의 embedded 이미지 features만 학습됩니다. 따라서 IP-Adapter 파일은 일반적으로 최대 100MB에 불과합니다.',xe,Rl,vt='다양한 작업과 구체적인 사용 사례에 IP-Adapter를 사용하는 방법에 대한 자세한 내용은 <a href="../using-diffusers/ip_adapter">IP-Adapter</a> 가이드에서 확인할 수 있습니다.',Xe,N,_t=`<p>Diffusers는 현재 가장 많이 사용되는 일부 파이프라인에 대해서만 IP-Adapter를 지원합니다. 멋진 사용 사례가 있는 지원되지 않는 파이프라인에 IP-Adapter를 통합하고 싶다면 언제든지 기능 요청을 여세요!
공식 IP-Adapter 체크포인트는 <a href="https://huggingface.co/h94/IP-Adapter" rel="nofollow">h94/IP-Adapter</a>에서 확인할 수 있습니다.</p>`,Se,$l,kt="시작하려면 Stable Diffusion 체크포인트를 불러오세요.",He,Wl,Ne,Fl,Lt="그런 다음 IP-Adapter 가중치를 불러와 <code>load_ip_adapter()</code> 메서드를 사용하여 파이프라인에 추가합니다.",Ae,Gl,Ee,vl,xt="불러온 뒤, 이미지 및 텍스트 프롬프트가 있는 파이프라인을 사용하여 이미지 생성 프로세스를 가이드할 수 있습니다.",qe,_l,Ye,A,Xt='    <img src="https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/ip-bear.png"/>',De,kl,ze,Ll,St="IP-Adapter는 이미지 인코더를 사용하여 이미지 feature를 생성합니다. IP-Adapter 리포지토리에 <code>image_encoder</code> 하위 폴더가 있는 경우, 이미지 인코더가 자동으로 불러와 파이프라인에 등록됩니다. 그렇지 않은 경우, <code>CLIPVisionModelWithProjection</code> 모델을 사용하여 이미지 인코더를 명시적으로 불러와 파이프라인에 전달해야 합니다.",Oe,xl,Ht="이는 ViT-H 이미지 인코더를 사용하는 <em>IP-Adapter Plus</em> 체크포인트에 해당하는 케이스입니다.",Pe,Xl,Ke,Sl,lt,Hl,Nt=`IP-Adapter FaceID 모델은 CLIP 이미지 임베딩 대신 <code>insightface</code>에서 생성한 이미지 임베딩을 사용하는 실험적인 IP Adapter입니다. 이러한 모델 중 일부는 LoRA를 사용하여 ID 일관성을 개선하기도 합니다.
이러한 모델을 사용하려면 <code>insightface</code>와 해당 요구 사항을 모두 설치해야 합니다.`,et,E,At="<p>InsightFace 사전학습된 모델은 비상업적 연구 목적으로만 사용할 수 있으므로, IP-Adapter-FaceID 모델은 연구 목적으로만 릴리즈되었으며 상업적 용도로는 사용할 수 없습니다.</p>",tt,Nl,st,Al,Et="두 가지 IP 어댑터 FaceID Plus 모델 중 하나를 사용하려는 경우, 이 모델들은 더 나은 사실감을 얻기 위해 <code>insightface</code>와 CLIP 이미지 임베딩을 모두 사용하므로, CLIP 이미지 인코더도 불러와야 합니다.",at,El,it,ql,nt,Dl,pt;return r=new ss({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),g=new is({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/loading_adapters.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/pytorch/loading_adapters.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/ko/tensorflow/loading_adapters.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/loading_adapters.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/pytorch/loading_adapters.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/ko/tensorflow/loading_adapters.ipynb"}]}}),w=new F({props:{title:"어댑터 불러오기",local:"어댑터-불러오기",headingTag:"h1"}}),C=new F({props:{title:"DreamBooth",local:"dreambooth",headingTag:"h2"}}),O=new b({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc2QtZHJlYW1ib290aC1saWJyYXJ5JTJGaGVyZ2Utc3R5bGUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBoZXJnZV9zdHlsZSUyMGJyb3duJTIwYmVhciUyMGVhdGluZyUyMGElMjBzbGljZSUyMG9mJTIwcGl6emElMkMlMjBzdHVubmluZyUyMGNvbG9yJTIwc2NoZW1lJTJDJTIwbWFzdGVycGllY2UlMkMlMjBpbGx1c3RyYXRpb24lMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCkuaW1hZ2VzJTVCMCU1RCUwQWltYWdl",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;sd-dreambooth-library/herge-style&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
prompt = <span class="hljs-string">&quot;A cute herge_style brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),P=new F({props:{title:"Textual inversion",local:"textual-inversion",headingTag:"h2"}}),el=new b({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stable-diffusion-v1-5/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),sl=new b({props:{code:"cGlwZWxpbmUubG9hZF90ZXh0dWFsX2ludmVyc2lvbiglMjJzZC1jb25jZXB0cy1saWJyYXJ5JTJGZ3RhNS1hcnR3b3JrJTIyKSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBjdXRlJTIwYnJvd24lMjBiZWFyJTIwZWF0aW5nJTIwYSUyMHNsaWNlJTIwb2YlMjBwaXp6YSUyQyUyMHN0dW5uaW5nJTIwY29sb3IlMjBzY2hlbWUlMkMlMjBtYXN0ZXJwaWVjZSUyQyUyMGlsbHVzdHJhdGlvbiUyQyUyMCUzQ2d0YTUtYXJ0d29yayUzRSUyMHN0eWxlJTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`pipeline.load_textual_inversion(<span class="hljs-string">&quot;sd-concepts-library/gta5-artwork&quot;</span>)
prompt = <span class="hljs-string">&quot;A cute brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration, &lt;gta5-artwork&gt; style&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),pl=new b({props:{code:"cGlwZWxpbmUubG9hZF90ZXh0dWFsX2ludmVyc2lvbiglMEElMjAlMjAlMjAlMjAlMjJzYXlha3BhdWwlMkZFYXN5TmVnYXRpdmUtdGVzdCUyMiUyQyUyMHdlaWdodF9uYW1lJTNEJTIyRWFzeU5lZ2F0aXZlLnNhZmV0ZW5zb3JzJTIyJTJDJTIwdG9rZW4lM0QlMjJFYXN5TmVnYXRpdmUlMjIlMEEp",highlighted:`pipeline.load_textual_inversion(
    <span class="hljs-string">&quot;sayakpaul/EasyNegative-test&quot;</span>, weight_name=<span class="hljs-string">&quot;EasyNegative.safetensors&quot;</span>, token=<span class="hljs-string">&quot;EasyNegative&quot;</span>
)`,wrap:!1}}),Ml=new b({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyQSUyMGN1dGUlMjBicm93biUyMGJlYXIlMjBlYXRpbmclMjBhJTIwc2xpY2UlMjBvZiUyMHBpenphJTJDJTIwc3R1bm5pbmclMjBjb2xvciUyMHNjaGVtZSUyQyUyMG1hc3RlcnBpZWNlJTJDJTIwaWxsdXN0cmF0aW9uJTJDJTIwRWFzeU5lZ2F0aXZlJTIyJTBBbmVnYXRpdmVfcHJvbXB0JTIwJTNEJTIwJTIyRWFzeU5lZ2F0aXZlJTIyJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTApLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`prompt = <span class="hljs-string">&quot;A cute brown bear eating a slice of pizza, stunning color scheme, masterpiece, illustration, EasyNegative&quot;</span>
negative_prompt = <span class="hljs-string">&quot;EasyNegative&quot;</span>

image = pipeline(prompt, negative_prompt=negative_prompt, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),rl=new F({props:{title:"LoRA",local:"lora",headingTag:"h2"}}),ml=new b({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),cl=new b({props:{code:"cGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTIyb3N0cmlzJTJGc3VwZXItY2VyZWFsLXNkeGwtbG9yYSUyMiUyQyUyMHdlaWdodF9uYW1lJTNEJTIyY2VyZWFsX2JveF9zZHhsX3YxLnNhZmV0ZW5zb3JzJTIyKSUwQXByb21wdCUyMCUzRCUyMCUyMmJlYXJzJTJDJTIwcGl6emElMjBiaXRlcyUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2U=",highlighted:`pipeline.load_lora_weights(<span class="hljs-string">&quot;ostris/super-cereal-sdxl-lora&quot;</span>, weight_name=<span class="hljs-string">&quot;cereal_box_sdxl_v1.safetensors&quot;</span>)
prompt = <span class="hljs-string">&quot;bears, pizza bites&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),Tl=new b({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLnVuZXQubG9hZF9hdHRuX3Byb2NzKCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiklMEElMEElMjMlMjAlRUQlOTQlODQlRUIlQTElQUMlRUQlOTQlODQlRUQlOEElQjglRUMlOTclOTAlRUMlODQlOUMlMjBjbm10JUVCJUE1JUJDJTIwJUVDJTgyJUFDJUVDJTlBJUE5JUVEJTk1JTk4JUVDJTk3JUFDJTIwTG9SQSVFQiVBNSVCQyUyMCVFRCU4QSVCOCVFQiVBNiVBQyVFQSVCMSVCMCVFRCU5NSVBOSVFQiU4QiU4OCVFQiU4QiVBNC4lMEFwcm9tcHQlMjAlM0QlMjAlMjJBJTIwY3V0ZSUyMGNubXQlMjBlYXRpbmclMjBhJTIwc2xpY2UlMjBvZiUyMHBpenphJTJDJTIwc3R1bm5pbmclMjBjb2xvciUyMHNjaGVtZSUyQyUyMG1hc3RlcnBpZWNlJTJDJTIwaWxsdXN0cmF0aW9uJTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.unet.load_attn_procs(<span class="hljs-string">&quot;jbilcke-hf/sdxl-cinematic-1&quot;</span>, weight_name=<span class="hljs-string">&quot;pytorch_lora_weights.safetensors&quot;</span>)

<span class="hljs-comment"># 프롬프트에서 cnmt를 사용하여 LoRA를 트리거합니다.</span>
prompt = <span class="hljs-string">&quot;A cute cnmt eating a slice of pizza, stunning color scheme, masterpiece, illustration&quot;</span>
image = pipeline(prompt).images[<span class="hljs-number">0</span>]
image`,wrap:!1}}),Cl=new b({props:{code:"cGlwZWxpbmUudW5sb2FkX2xvcmFfd2VpZ2h0cygp",highlighted:"pipeline.unload_lora_weights()",wrap:!1}}),bl=new F({props:{title:"LoRA 가중치 스케일 조정하기",local:"lora-가중치-스케일-조정하기",headingTag:"h3"}}),wl=new b({props:{code:"cGlwZSUyMCUzRCUyMC4uLiUyMCUyMyUyMCVFRCU4QyU4QyVFQyU5RCVCNCVFRCU5NCU4NCVFQiU5RCVCQyVFQyU5RCVCOCUyMCVFQyU4MyU5RCVFQyU4NCVCMSUwQXBpcGUubG9hZF9sb3JhX3dlaWdodHMoLi4uJTJDJTIwYWRhcHRlcl9uYW1lJTNEJTIybXlfYWRhcHRlciUyMiklMEFzY2FsZXMlMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJ0ZXh0X2VuY29kZXIlMjIlM0ElMjAwLjUlMkMlMEElMjAlMjAlMjAlMjAlMjJ0ZXh0X2VuY29kZXJfMiUyMiUzQSUyMDAuNSUyQyUyMCUyMCUyMyUyMCVFRCU4QyU4QyVFQyU5RCVCNCVFRCU5NCU4NCVFQyU5NyU5MCUyMCVFQiU5MSU5MCUyMCVFQiVCMiU4OCVFQyVBNyVCOCUyMCVFRCU4NSU4RCVFQyU4QSVBNCVFRCU4QSVCOCUyMCVFQyU5RCVCOCVFQyVCRCU5NCVFQiU4RCU5NCVFQSVCMCU4MCUyMCVFQyU5RSU4OCVFQiU4QSU5NCUyMCVFQSVCMiVCRCVFQyU5QSVCMCVFQyU5NyU5MCVFQiVBNyU4QyUyMCVFQyU4MiVBQyVFQyU5QSVBOSUyMCVFQSVCMCU4MCVFQiU4QSVBNSUwQSUyMCUyMCUyMCUyMCUyMnVuZXQlMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJkb3duJTIyJTNBJTIwMC45JTJDJTIwJTIwJTIzJTIwZG93biUyMCVFQiVCNiU4MCVFQiVCNiU4NCVFQyU5RCU5OCUyMCVFQiVBQSVBOCVFQiU5MyVBMCUyMCVFRCU4QSVCOCVFQiU5RSU5QyVFQyU4QSVBNCVFRCU4RiVBQyVFQiVBOCVCOCVFQiU4QSU5NCUyMCVFQyU4QSVBNCVFQyVCQyU4MCVFQyU5RCVCQyUyMDAuOSVFQiVBNSVCQyUyMCVFQyU4MiVBQyVFQyU5QSVBOSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMCUyMm1pZCUyMiUyMCUyMCUyMyUyMCVFQyU5RCVCNCUyMCVFQyU5OCU4OCVFQyVBMCU5QyVFQyU5NyU5MCVFQyU4NCU5QyVFQiU4QSU5NCUyMCUyMm1pZCUyMiVFQSVCMCU4MCUyMCVFQyVBNyU4MCVFQyVBMCU5NSVFQiU5MCU5OCVFQyVBNyU4MCUyMCVFQyU5NSU4QSVFQyU5NSU5OCVFQyU5QyVCQyVFQiVBRiU4MCVFQiVBMSU5QyUyMCVFQyVBNCU5MSVFQSVCMCU4NCUyMCVFQiVCNiU4MCVFQiVCNiU4NCVFQyU5RCU5OCUyMCVFQiVBQSVBOCVFQiU5MyVBMCUyMCVFRCU4QSVCOCVFQiU5RSU5QyVFQyU4QSVBNCVFRCU4RiVBQyVFQiVBOCVCOCVFQiU4QSU5NCUyMCVFQSVCOCVCMCVFQiVCMyVCOCUyMCVFQyU4QSVBNCVFQyVCQyU4MCVFQyU5RCVCQyUyMDEuMCVFQyU5RCU4NCUyMCVFQyU4MiVBQyVFQyU5QSVBOSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnVwJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyYmxvY2tfMCUyMiUzQSUyMDAuNiUyQyUyMCUyMCUyMyUyMCUyMyUyMHVwJUVDJTlEJTk4JTIwMCVFQiVCMiU4OCVFQyVBNyVCOCUyMCVFQiVCOCU5NCVFQiVBMSU5RCVFQyU5NyU5MCUyMCVFQyU5RSU4OCVFQiU4QSU5NCUyMDMlRUElQjAlOUMlRUMlOUQlOTglMjAlRUQlOEElQjglRUIlOUUlOUMlRUMlOEElQTQlRUQlOEYlQUMlRUIlQTglQjglRUIlOEElOTQlMjAlRUIlQUElQTglRUIlOTElOTAlMjAlRUMlOEElQTQlRUMlQkMlODAlRUMlOUQlQkMlMjAwLjYlRUMlOUQlODQlMjAlRUMlODIlQUMlRUMlOUElQTklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJibG9ja18xJTIyJTNBJTIwJTVCMC40JTJDJTIwMC44JTJDJTIwMS4wJTVEJTJDJTIwJTIwJTIzJTIwdXAlRUMlOUQlOTglMjAlRUMlQjIlQUIlMjAlRUIlQjIlODglRUMlQTclQjglMjAlRUIlQjglOTQlRUIlQTElOUQlRUMlOTclOTAlMjAlRUMlOUUlODglRUIlOEElOTQlMjAzJUVBJUIwJTlDJUVDJTlEJTk4JTIwJUVEJThBJUI4JUVCJTlFJTlDJUVDJThBJUE0JUVEJThGJUFDJUVCJUE4JUI4JUVCJThBJTk0JTIwJUVBJUIwJTgxJUVBJUIwJTgxJTIwJUVDJThBJUE0JUVDJUJDJTgwJUVDJTlEJUJDJTIwMC40JTJDJTIwMC44JTJDJTIwMS4wJUVDJTlEJTg0JTIwJUVDJTgyJUFDJUVDJTlBJUE5JTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwJTdEJTBBJTdEJTBBcGlwZS5zZXRfYWRhcHRlcnMoJTIybXlfYWRhcHRlciUyMiUyQyUyMHNjYWxlcyk=",highlighted:`pipe = ... <span class="hljs-comment"># 파이프라인 생성</span>
pipe.load_lora_weights(..., adapter_name=<span class="hljs-string">&quot;my_adapter&quot;</span>)
scales = {
    <span class="hljs-string">&quot;text_encoder&quot;</span>: <span class="hljs-number">0.5</span>,
    <span class="hljs-string">&quot;text_encoder_2&quot;</span>: <span class="hljs-number">0.5</span>,  <span class="hljs-comment"># 파이프에 두 번째 텍스트 인코더가 있는 경우에만 사용 가능</span>
    <span class="hljs-string">&quot;unet&quot;</span>: {
        <span class="hljs-string">&quot;down&quot;</span>: <span class="hljs-number">0.9</span>,  <span class="hljs-comment"># down 부분의 모든 트랜스포머는 스케일 0.9를 사용</span>
        <span class="hljs-comment"># &quot;mid&quot;  # 이 예제에서는 &quot;mid&quot;가 지정되지 않았으므로 중간 부분의 모든 트랜스포머는 기본 스케일 1.0을 사용</span>
        <span class="hljs-string">&quot;up&quot;</span>: {
            <span class="hljs-string">&quot;block_0&quot;</span>: <span class="hljs-number">0.6</span>,  <span class="hljs-comment"># # up의 0번째 블록에 있는 3개의 트랜스포머는 모두 스케일 0.6을 사용</span>
            <span class="hljs-string">&quot;block_1&quot;</span>: [<span class="hljs-number">0.4</span>, <span class="hljs-number">0.8</span>, <span class="hljs-number">1.0</span>],  <span class="hljs-comment"># up의 첫 번째 블록에 있는 3개의 트랜스포머는 각각 스케일 0.4, 0.8, 1.0을 사용</span>
        }
    }
}
pipe.set_adapters(<span class="hljs-string">&quot;my_adapter&quot;</span>, scales)`,wrap:!1}}),Ql=new F({props:{title:"Kohya와 TheLastBen",local:"kohya와-thelastben",headingTag:"h3"}}),H=new ns({props:{id:"other-trainers",options:["Kohya","TheLastBen"],$$slots:{default:[Ms]},$$scope:{ctx:G}}}),Il=new F({props:{title:"IP-Adapter",local:"ip-adapter",headingTag:"h2"}}),Wl=new b({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMjJzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;stable-diffusion-v1-5/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),Gl=new b({props:{code:"cGlwZWxpbmUubG9hZF9pcF9hZGFwdGVyKCUyMmg5NCUyRklQLUFkYXB0ZXIlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJtb2RlbHMlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmlwLWFkYXB0ZXJfc2QxNS5iaW4lMjIp",highlighted:'pipeline.load_ip_adapter(<span class="hljs-string">&quot;h94/IP-Adapter&quot;</span>, subfolder=<span class="hljs-string">&quot;models&quot;</span>, weight_name=<span class="hljs-string">&quot;ip-adapter_sd15.bin&quot;</span>)',wrap:!1}}),_l=new b({props:{code:"aW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmh1Z2dpbmdmYWNlJTJGZG9jdW1lbnRhdGlvbi1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmRpZmZ1c2VycyUyRmxvYWRfbmVnX2VtYmVkLnBuZyUyMiklMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3B1JTIyKS5tYW51YWxfc2VlZCgzMyklMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZSglMEElQzIlQTAlMjAlQzIlQTAlMjBwcm9tcHQlM0QnYmVzdCUyMHF1YWxpdHklMkMlMjBoaWdoJTIwcXVhbGl0eSUyQyUyMHdlYXJpbmclMjBzdW5nbGFzc2VzJyUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMGlwX2FkYXB0ZXJfaW1hZ2UlM0RpbWFnZSUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMG5lZ2F0aXZlX3Byb21wdCUzRCUyMm1vbm9jaHJvbWUlMkMlMjBsb3dyZXMlMkMlMjBiYWQlMjBhbmF0b215JTJDJTIwd29yc3QlMjBxdWFsaXR5JTJDJTIwbG93JTIwcXVhbGl0eSUyMiUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUwQSVDMiVBMCUyMCVDMiVBMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlcw==",highlighted:`image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/load_neg_embed.png&quot;</span>)
generator = torch.Generator(device=<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">33</span>)
images = pipeline(
    prompt=<span class="hljs-string">&#x27;best quality, high quality, wearing sunglasses&#x27;</span>,
    ip_adapter_image=image,
    negative_prompt=<span class="hljs-string">&quot;monochrome, lowres, bad anatomy, worst quality, low quality&quot;</span>,
    num_inference_steps=<span class="hljs-number">50</span>,
    generator=generator,
).images[<span class="hljs-number">0</span>]
images`,wrap:!1}}),kl=new F({props:{title:"IP-Adapter Plus",local:"ip-adapter-plus",headingTag:"h3"}}),Xl=new b({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBaW1hZ2VfZW5jb2RlciUyMCUzRCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJoOTQlMkZJUC1BZGFwdGVyJTIyJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIybW9kZWxzJTJGaW1hZ2VfZW5jb2RlciUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSklMEElMEFwaXBlbGluZSUyMCUzRCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUyQyUwQSUyMCUyMCUyMCUyMGltYWdlX2VuY29kZXIlM0RpbWFnZV9lbmNvZGVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQXBpcGVsaW5lLmxvYWRfaXBfYWRhcHRlciglMjJoOTQlMkZJUC1BZGFwdGVyJTIyJTJDJTIwc3ViZm9sZGVyJTNEJTIyc2R4bF9tb2RlbHMlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMmlwLWFkYXB0ZXItcGx1c19zZHhsX3ZpdC1oLnNhZmV0ZW5zb3JzJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPVisionModelWithProjection

image_encoder = CLIPVisionModelWithProjection.from_pretrained(
    <span class="hljs-string">&quot;h94/IP-Adapter&quot;</span>,
    subfolder=<span class="hljs-string">&quot;models/image_encoder&quot;</span>,
    torch_dtype=torch.float16
)

pipeline = AutoPipelineForText2Image.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    image_encoder=image_encoder,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipeline.load_ip_adapter(<span class="hljs-string">&quot;h94/IP-Adapter&quot;</span>, subfolder=<span class="hljs-string">&quot;sdxl_models&quot;</span>, weight_name=<span class="hljs-string">&quot;ip-adapter-plus_sdxl_vit-h.safetensors&quot;</span>)`,wrap:!1}}),Sl=new F({props:{title:"IP-Adapter Face ID 모델",local:"ip-adapter-face-id-모델",headingTag:"h3"}}),Nl=new b({props:{code:"cGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcGlwZWxpbmUubG9hZF9pcF9hZGFwdGVyKCUyMmg5NCUyRklQLUFkYXB0ZXItRmFjZUlEJTIyJTJDJTIwc3ViZm9sZGVyJTNETm9uZSUyQyUyMHdlaWdodF9uYW1lJTNEJTIyaXAtYWRhcHRlci1mYWNlaWRfc2R4bC5iaW4lMjIlMkMlMjBpbWFnZV9lbmNvZGVyX2ZvbGRlciUzRE5vbmUp",highlighted:`pipeline = AutoPipelineForText2Image.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipeline.load_ip_adapter(<span class="hljs-string">&quot;h94/IP-Adapter-FaceID&quot;</span>, subfolder=<span class="hljs-literal">None</span>, weight_name=<span class="hljs-string">&quot;ip-adapter-faceid_sdxl.bin&quot;</span>, image_encoder_folder=<span class="hljs-literal">None</span>)`,wrap:!1}}),El=new b({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uJTBBJTBBaW1hZ2VfZW5jb2RlciUyMCUzRCUyMENMSVBWaXNpb25Nb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJsYWlvbiUyRkNMSVAtVmlULUgtMTQtbGFpb24yQi1zMzJCLWI3OUslMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEEpJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMEElMjAlMjAlMjAlMjBpbWFnZV9lbmNvZGVyJTNEaW1hZ2VfZW5jb2RlciUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlbGluZS5sb2FkX2lwX2FkYXB0ZXIoJTIyaDk0JTJGSVAtQWRhcHRlci1GYWNlSUQlMjIlMkMlMjBzdWJmb2xkZXIlM0ROb25lJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJpcC1hZGFwdGVyLWZhY2VpZC1wbHVzX3NkMTUuYmluJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPVisionModelWithProjection

image_encoder = CLIPVisionModelWithProjection.from_pretrained(
    <span class="hljs-string">&quot;laion/CLIP-ViT-H-14-laion2B-s32B-b79K&quot;</span>,
    torch_dtype=torch.float16,
)

pipeline = AutoPipelineForText2Image.from_pretrained(
    <span class="hljs-string">&quot;stable-diffusion-v1-5/stable-diffusion-v1-5&quot;</span>,
    image_encoder=image_encoder,
    torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipeline.load_ip_adapter(<span class="hljs-string">&quot;h94/IP-Adapter-FaceID&quot;</span>, subfolder=<span class="hljs-literal">None</span>, weight_name=<span class="hljs-string">&quot;ip-adapter-faceid-plus_sd15.bin&quot;</span>)`,wrap:!1}}),ql=new as({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/ko/using-diffusers/loading_adapters.md"}}),{c(){J=n("meta"),V=a(),h=n("p"),T=a(),U(r.$$.fragment),y=a(),U(g.$$.fragment),B=a(),U(w.$$.fragment),$=a(),j=n("p"),j.innerHTML=Yl,W=a(),Q=n("p"),Q.textContent=q,I=a(),R=n("blockquote"),R.innerHTML=Y,M=a(),U(C.$$.fragment),zl=a(),D=n("p"),D.innerHTML=ot,Ol=a(),z=n("p"),z.innerHTML=Mt,Pl=a(),U(O.$$.fragment),Kl=a(),v=n("div"),v.innerHTML=rt,le=a(),U(P.$$.fragment),ee=a(),K=n("p"),K.innerHTML=yt,te=a(),ll=n("p"),ll.textContent=Ut,se=a(),U(el.$$.fragment),ae=a(),tl=n("p"),tl.innerHTML=mt,ie=a(),U(sl.$$.fragment),ne=a(),_=n("div"),_.innerHTML=ut,pe=a(),al=n("p"),al.innerHTML=ct,oe=a(),il=n("ul"),il.innerHTML=ft,Me=a(),nl=n("p"),nl.innerHTML=dt,re=a(),U(pl.$$.fragment),ye=a(),ol=n("p"),ol.innerHTML=Jt,Ue=a(),U(Ml.$$.fragment),me=a(),k=n("div"),k.innerHTML=Tt,ue=a(),U(rl.$$.fragment),ce=a(),yl=n("p"),yl.innerHTML=ht,fe=a(),L=n("blockquote"),L.innerHTML=Ct,de=a(),Ul=n("p"),Ul.textContent=bt,Je=a(),U(ml.$$.fragment),Te=a(),ul=n("p"),ul.innerHTML=gt,he=a(),U(cl.$$.fragment),Ce=a(),x=n("div"),x.innerHTML=Vt,be=a(),fl=n("p"),fl.innerHTML=wt,ge=a(),dl=n("ul"),dl.innerHTML=jt,Ve=a(),Jl=n("p"),Jl.innerHTML=Qt,we=a(),U(Tl.$$.fragment),je=a(),X=n("div"),X.innerHTML=Zt,Qe=a(),hl=n("p"),hl.innerHTML=It,Ze=a(),U(Cl.$$.fragment),Ie=a(),U(bl.$$.fragment),Be=a(),gl=n("p"),gl.innerHTML=Bt,Re=a(),Vl=n("p"),Vl.innerHTML=Rt,$e=a(),U(wl.$$.fragment),We=a(),jl=n("p"),jl.innerHTML=$t,Fe=a(),S=n("blockquote"),S.innerHTML=Wt,Ge=a(),U(Ql.$$.fragment),ve=a(),Zl=n("p"),Zl.innerHTML=Ft,_e=a(),U(H.$$.fragment),ke=a(),U(Il.$$.fragment),Le=a(),Bl=n("p"),Bl.innerHTML=Gt,xe=a(),Rl=n("p"),Rl.innerHTML=vt,Xe=a(),N=n("blockquote"),N.innerHTML=_t,Se=a(),$l=n("p"),$l.textContent=kt,He=a(),U(Wl.$$.fragment),Ne=a(),Fl=n("p"),Fl.innerHTML=Lt,Ae=a(),U(Gl.$$.fragment),Ee=a(),vl=n("p"),vl.textContent=xt,qe=a(),U(_l.$$.fragment),Ye=a(),A=n("div"),A.innerHTML=Xt,De=a(),U(kl.$$.fragment),ze=a(),Ll=n("p"),Ll.innerHTML=St,Oe=a(),xl=n("p"),xl.innerHTML=Ht,Pe=a(),U(Xl.$$.fragment),Ke=a(),U(Sl.$$.fragment),lt=a(),Hl=n("p"),Hl.innerHTML=Nt,et=a(),E=n("blockquote"),E.innerHTML=At,tt=a(),U(Nl.$$.fragment),st=a(),Al=n("p"),Al.innerHTML=Et,at=a(),U(El.$$.fragment),it=a(),U(ql.$$.fragment),nt=a(),Dl=n("p"),this.h()},l(l){const e=es("svelte-u9bgzb",document.head);J=p(e,"META",{name:!0,content:!0}),e.forEach(t),V=i(l),h=p(l,"P",{}),Yt(h).forEach(t),T=i(l),m(r.$$.fragment,l),y=i(l),m(g.$$.fragment,l),B=i(l),m(w.$$.fragment,l),$=i(l),j=p(l,"P",{"data-svelte-h":!0}),o(j)!=="svelte-16bf5k2"&&(j.innerHTML=Yl),W=i(l),Q=p(l,"P",{"data-svelte-h":!0}),o(Q)!=="svelte-1vi87ff"&&(Q.textContent=q),I=i(l),R=p(l,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(R)!=="svelte-xpnm3k"&&(R.innerHTML=Y),M=i(l),m(C.$$.fragment,l),zl=i(l),D=p(l,"P",{"data-svelte-h":!0}),o(D)!=="svelte-or9czk"&&(D.innerHTML=ot),Ol=i(l),z=p(l,"P",{"data-svelte-h":!0}),o(z)!=="svelte-emmkw5"&&(z.innerHTML=Mt),Pl=i(l),m(O.$$.fragment,l),Kl=i(l),v=p(l,"DIV",{class:!0,"data-svelte-h":!0}),o(v)!=="svelte-1qqjocv"&&(v.innerHTML=rt),le=i(l),m(P.$$.fragment,l),ee=i(l),K=p(l,"P",{"data-svelte-h":!0}),o(K)!=="svelte-117ykpw"&&(K.innerHTML=yt),te=i(l),ll=p(l,"P",{"data-svelte-h":!0}),o(ll)!=="svelte-6w30tt"&&(ll.textContent=Ut),se=i(l),m(el.$$.fragment,l),ae=i(l),tl=p(l,"P",{"data-svelte-h":!0}),o(tl)!=="svelte-8n0ka2"&&(tl.innerHTML=mt),ie=i(l),m(sl.$$.fragment,l),ne=i(l),_=p(l,"DIV",{class:!0,"data-svelte-h":!0}),o(_)!=="svelte-vwb4li"&&(_.innerHTML=ut),pe=i(l),al=p(l,"P",{"data-svelte-h":!0}),o(al)!=="svelte-xhnj7d"&&(al.innerHTML=ct),oe=i(l),il=p(l,"UL",{"data-svelte-h":!0}),o(il)!=="svelte-hrjisu"&&(il.innerHTML=ft),Me=i(l),nl=p(l,"P",{"data-svelte-h":!0}),o(nl)!=="svelte-1l1rgk1"&&(nl.innerHTML=dt),re=i(l),m(pl.$$.fragment,l),ye=i(l),ol=p(l,"P",{"data-svelte-h":!0}),o(ol)!=="svelte-crnf53"&&(ol.innerHTML=Jt),Ue=i(l),m(Ml.$$.fragment,l),me=i(l),k=p(l,"DIV",{class:!0,"data-svelte-h":!0}),o(k)!=="svelte-j6euo"&&(k.innerHTML=Tt),ue=i(l),m(rl.$$.fragment,l),ce=i(l),yl=p(l,"P",{"data-svelte-h":!0}),o(yl)!=="svelte-ujyh26"&&(yl.innerHTML=ht),fe=i(l),L=p(l,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(L)!=="svelte-1l18io9"&&(L.innerHTML=Ct),de=i(l),Ul=p(l,"P",{"data-svelte-h":!0}),o(Ul)!=="svelte-1dvocne"&&(Ul.textContent=bt),Je=i(l),m(ml.$$.fragment,l),Te=i(l),ul=p(l,"P",{"data-svelte-h":!0}),o(ul)!=="svelte-18gn0k8"&&(ul.innerHTML=gt),he=i(l),m(cl.$$.fragment,l),Ce=i(l),x=p(l,"DIV",{class:!0,"data-svelte-h":!0}),o(x)!=="svelte-848z5s"&&(x.innerHTML=Vt),be=i(l),fl=p(l,"P",{"data-svelte-h":!0}),o(fl)!=="svelte-1qz3wem"&&(fl.innerHTML=wt),ge=i(l),dl=p(l,"UL",{"data-svelte-h":!0}),o(dl)!=="svelte-dlnea7"&&(dl.innerHTML=jt),Ve=i(l),Jl=p(l,"P",{"data-svelte-h":!0}),o(Jl)!=="svelte-1fsp6a2"&&(Jl.innerHTML=Qt),we=i(l),m(Tl.$$.fragment,l),je=i(l),X=p(l,"DIV",{class:!0,"data-svelte-h":!0}),o(X)!=="svelte-1etahws"&&(X.innerHTML=Zt),Qe=i(l),hl=p(l,"P",{"data-svelte-h":!0}),o(hl)!=="svelte-1e49s07"&&(hl.innerHTML=It),Ze=i(l),m(Cl.$$.fragment,l),Ie=i(l),m(bl.$$.fragment,l),Be=i(l),gl=p(l,"P",{"data-svelte-h":!0}),o(gl)!=="svelte-6nr24m"&&(gl.innerHTML=Bt),Re=i(l),Vl=p(l,"P",{"data-svelte-h":!0}),o(Vl)!=="svelte-ytof64"&&(Vl.innerHTML=Rt),$e=i(l),m(wl.$$.fragment,l),We=i(l),jl=p(l,"P",{"data-svelte-h":!0}),o(jl)!=="svelte-1disx0g"&&(jl.innerHTML=$t),Fe=i(l),S=p(l,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(S)!=="svelte-rgffef"&&(S.innerHTML=Wt),Ge=i(l),m(Ql.$$.fragment,l),ve=i(l),Zl=p(l,"P",{"data-svelte-h":!0}),o(Zl)!=="svelte-l3jlx7"&&(Zl.innerHTML=Ft),_e=i(l),m(H.$$.fragment,l),ke=i(l),m(Il.$$.fragment,l),Le=i(l),Bl=p(l,"P",{"data-svelte-h":!0}),o(Bl)!=="svelte-jqqmto"&&(Bl.innerHTML=Gt),xe=i(l),Rl=p(l,"P",{"data-svelte-h":!0}),o(Rl)!=="svelte-1aw44ax"&&(Rl.innerHTML=vt),Xe=i(l),N=p(l,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(N)!=="svelte-1mdjx1c"&&(N.innerHTML=_t),Se=i(l),$l=p(l,"P",{"data-svelte-h":!0}),o($l)!=="svelte-13chlgn"&&($l.textContent=kt),He=i(l),m(Wl.$$.fragment,l),Ne=i(l),Fl=p(l,"P",{"data-svelte-h":!0}),o(Fl)!=="svelte-63lykc"&&(Fl.innerHTML=Lt),Ae=i(l),m(Gl.$$.fragment,l),Ee=i(l),vl=p(l,"P",{"data-svelte-h":!0}),o(vl)!=="svelte-1hljpgw"&&(vl.textContent=xt),qe=i(l),m(_l.$$.fragment,l),Ye=i(l),A=p(l,"DIV",{class:!0,"data-svelte-h":!0}),o(A)!=="svelte-1vum0wo"&&(A.innerHTML=Xt),De=i(l),m(kl.$$.fragment,l),ze=i(l),Ll=p(l,"P",{"data-svelte-h":!0}),o(Ll)!=="svelte-9vlttf"&&(Ll.innerHTML=St),Oe=i(l),xl=p(l,"P",{"data-svelte-h":!0}),o(xl)!=="svelte-gjj407"&&(xl.innerHTML=Ht),Pe=i(l),m(Xl.$$.fragment,l),Ke=i(l),m(Sl.$$.fragment,l),lt=i(l),Hl=p(l,"P",{"data-svelte-h":!0}),o(Hl)!=="svelte-1dpf8s3"&&(Hl.innerHTML=Nt),et=i(l),E=p(l,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(E)!=="svelte-s9r4i7"&&(E.innerHTML=At),tt=i(l),m(Nl.$$.fragment,l),st=i(l),Al=p(l,"P",{"data-svelte-h":!0}),o(Al)!=="svelte-1b45tv3"&&(Al.innerHTML=Et),at=i(l),m(El.$$.fragment,l),it=i(l),m(ql.$$.fragment,l),nt=i(l),Dl=p(l,"P",{}),Yt(Dl).forEach(t),this.h()},h(){Z(J,"name","hf:doc:metadata"),Z(J,"content",ys),Z(R,"class","tip"),Z(v,"class","flex justify-center"),Z(_,"class","flex justify-center"),Z(k,"class","flex justify-center"),Z(L,"class","tip"),Z(x,"class","flex justify-center"),Z(X,"class","flex justify-center"),Z(S,"class","warning"),Z(N,"class","tip"),Z(A,"class","flex justify-center"),Z(E,"class","warning")},m(l,e){ts(document.head,J),s(l,V,e),s(l,h,e),s(l,T,e),u(r,l,e),s(l,y,e),u(g,l,e),s(l,B,e),u(w,l,e),s(l,$,e),s(l,j,e),s(l,W,e),s(l,Q,e),s(l,I,e),s(l,R,e),s(l,M,e),u(C,l,e),s(l,zl,e),s(l,D,e),s(l,Ol,e),s(l,z,e),s(l,Pl,e),u(O,l,e),s(l,Kl,e),s(l,v,e),s(l,le,e),u(P,l,e),s(l,ee,e),s(l,K,e),s(l,te,e),s(l,ll,e),s(l,se,e),u(el,l,e),s(l,ae,e),s(l,tl,e),s(l,ie,e),u(sl,l,e),s(l,ne,e),s(l,_,e),s(l,pe,e),s(l,al,e),s(l,oe,e),s(l,il,e),s(l,Me,e),s(l,nl,e),s(l,re,e),u(pl,l,e),s(l,ye,e),s(l,ol,e),s(l,Ue,e),u(Ml,l,e),s(l,me,e),s(l,k,e),s(l,ue,e),u(rl,l,e),s(l,ce,e),s(l,yl,e),s(l,fe,e),s(l,L,e),s(l,de,e),s(l,Ul,e),s(l,Je,e),u(ml,l,e),s(l,Te,e),s(l,ul,e),s(l,he,e),u(cl,l,e),s(l,Ce,e),s(l,x,e),s(l,be,e),s(l,fl,e),s(l,ge,e),s(l,dl,e),s(l,Ve,e),s(l,Jl,e),s(l,we,e),u(Tl,l,e),s(l,je,e),s(l,X,e),s(l,Qe,e),s(l,hl,e),s(l,Ze,e),u(Cl,l,e),s(l,Ie,e),u(bl,l,e),s(l,Be,e),s(l,gl,e),s(l,Re,e),s(l,Vl,e),s(l,$e,e),u(wl,l,e),s(l,We,e),s(l,jl,e),s(l,Fe,e),s(l,S,e),s(l,Ge,e),u(Ql,l,e),s(l,ve,e),s(l,Zl,e),s(l,_e,e),u(H,l,e),s(l,ke,e),u(Il,l,e),s(l,Le,e),s(l,Bl,e),s(l,xe,e),s(l,Rl,e),s(l,Xe,e),s(l,N,e),s(l,Se,e),s(l,$l,e),s(l,He,e),u(Wl,l,e),s(l,Ne,e),s(l,Fl,e),s(l,Ae,e),u(Gl,l,e),s(l,Ee,e),s(l,vl,e),s(l,qe,e),u(_l,l,e),s(l,Ye,e),s(l,A,e),s(l,De,e),u(kl,l,e),s(l,ze,e),s(l,Ll,e),s(l,Oe,e),s(l,xl,e),s(l,Pe,e),u(Xl,l,e),s(l,Ke,e),u(Sl,l,e),s(l,lt,e),s(l,Hl,e),s(l,et,e),s(l,E,e),s(l,tt,e),u(Nl,l,e),s(l,st,e),s(l,Al,e),s(l,at,e),u(El,l,e),s(l,it,e),u(ql,l,e),s(l,nt,e),s(l,Dl,e),pt=!0},p(l,[e]){const qt={};e&2&&(qt.$$scope={dirty:e,ctx:l}),H.$set(qt)},i(l){pt||(c(r.$$.fragment,l),c(g.$$.fragment,l),c(w.$$.fragment,l),c(C.$$.fragment,l),c(O.$$.fragment,l),c(P.$$.fragment,l),c(el.$$.fragment,l),c(sl.$$.fragment,l),c(pl.$$.fragment,l),c(Ml.$$.fragment,l),c(rl.$$.fragment,l),c(ml.$$.fragment,l),c(cl.$$.fragment,l),c(Tl.$$.fragment,l),c(Cl.$$.fragment,l),c(bl.$$.fragment,l),c(wl.$$.fragment,l),c(Ql.$$.fragment,l),c(H.$$.fragment,l),c(Il.$$.fragment,l),c(Wl.$$.fragment,l),c(Gl.$$.fragment,l),c(_l.$$.fragment,l),c(kl.$$.fragment,l),c(Xl.$$.fragment,l),c(Sl.$$.fragment,l),c(Nl.$$.fragment,l),c(El.$$.fragment,l),c(ql.$$.fragment,l),pt=!0)},o(l){f(r.$$.fragment,l),f(g.$$.fragment,l),f(w.$$.fragment,l),f(C.$$.fragment,l),f(O.$$.fragment,l),f(P.$$.fragment,l),f(el.$$.fragment,l),f(sl.$$.fragment,l),f(pl.$$.fragment,l),f(Ml.$$.fragment,l),f(rl.$$.fragment,l),f(ml.$$.fragment,l),f(cl.$$.fragment,l),f(Tl.$$.fragment,l),f(Cl.$$.fragment,l),f(bl.$$.fragment,l),f(wl.$$.fragment,l),f(Ql.$$.fragment,l),f(H.$$.fragment,l),f(Il.$$.fragment,l),f(Wl.$$.fragment,l),f(Gl.$$.fragment,l),f(_l.$$.fragment,l),f(kl.$$.fragment,l),f(Xl.$$.fragment,l),f(Sl.$$.fragment,l),f(Nl.$$.fragment,l),f(El.$$.fragment,l),f(ql.$$.fragment,l),pt=!1},d(l){l&&(t(V),t(h),t(T),t(y),t(B),t($),t(j),t(W),t(Q),t(I),t(R),t(M),t(zl),t(D),t(Ol),t(z),t(Pl),t(Kl),t(v),t(le),t(ee),t(K),t(te),t(ll),t(se),t(ae),t(tl),t(ie),t(ne),t(_),t(pe),t(al),t(oe),t(il),t(Me),t(nl),t(re),t(ye),t(ol),t(Ue),t(me),t(k),t(ue),t(ce),t(yl),t(fe),t(L),t(de),t(Ul),t(Je),t(Te),t(ul),t(he),t(Ce),t(x),t(be),t(fl),t(ge),t(dl),t(Ve),t(Jl),t(we),t(je),t(X),t(Qe),t(hl),t(Ze),t(Ie),t(Be),t(gl),t(Re),t(Vl),t($e),t(We),t(jl),t(Fe),t(S),t(Ge),t(ve),t(Zl),t(_e),t(ke),t(Le),t(Bl),t(xe),t(Rl),t(Xe),t(N),t(Se),t($l),t(He),t(Ne),t(Fl),t(Ae),t(Ee),t(vl),t(qe),t(Ye),t(A),t(De),t(ze),t(Ll),t(Oe),t(xl),t(Pe),t(Ke),t(lt),t(Hl),t(et),t(E),t(tt),t(st),t(Al),t(at),t(it),t(nt),t(Dl)),t(J),d(r,l),d(g,l),d(w,l),d(C,l),d(O,l),d(P,l),d(el,l),d(sl,l),d(pl,l),d(Ml,l),d(rl,l),d(ml,l),d(cl,l),d(Tl,l),d(Cl,l),d(bl,l),d(wl,l),d(Ql,l),d(H,l),d(Il,l),d(Wl,l),d(Gl,l),d(_l,l),d(kl,l),d(Xl,l),d(Sl,l),d(Nl,l),d(El,l),d(ql,l)}}}const ys='{"title":"어댑터 불러오기","local":"어댑터-불러오기","sections":[{"title":"DreamBooth","local":"dreambooth","sections":[],"depth":2},{"title":"Textual inversion","local":"textual-inversion","sections":[],"depth":2},{"title":"LoRA","local":"lora","sections":[{"title":"LoRA 가중치 스케일 조정하기","local":"lora-가중치-스케일-조정하기","sections":[],"depth":3},{"title":"Kohya와 TheLastBen","local":"kohya와-thelastben","sections":[],"depth":3}],"depth":2},{"title":"IP-Adapter","local":"ip-adapter","sections":[{"title":"IP-Adapter Plus","local":"ip-adapter-plus","sections":[],"depth":3},{"title":"IP-Adapter Face ID 모델","local":"ip-adapter-face-id-모델","sections":[],"depth":3}],"depth":2}],"depth":1}';function Us(G){return Pt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ts extends Kt{constructor(J){super(),ls(this,J,Us,rs,Ot,{})}}export{Ts as component};
