import{s as Y,n as K,o as ee}from"../chunks/scheduler.23542ac5.js";import{S as te,i as ne,e as M,s as i,c as g,h as le,a as w,d as n,b as a,f as q,g as _,j as z,k as F,l as ie,m as l,n as v,t as y,o as T,p as j}from"../chunks/index.9b1f405b.js";import{C as ae,H as E,E as se}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.8da47836.js";import{C as A}from"../chunks/CodeBlock.c748334d.js";function pe(N){let s,x,B,O,p,U,o,W,m,H=`🤗 <a href="https://github.com/huggingface/optimum-intel" rel="nofollow">Optimum</a>은 OpenVINO와 호환되는 Stable Diffusion 파이프라인을 제공합니다.
이제 다양한 Intel 프로세서에서 OpenVINO Runtime으로 쉽게 추론을 수행할 수 있습니다. (<a href="https://docs.openvino.ai/latest/openvino_docs_OV_UG_supported_plugins_Supported_Devices.html" rel="nofollow">여기</a>서 지원되는 전 기기 목록을 확인하세요).`,V,f,Z,r,Q="다음 명령어로 🤗 Optimum을 설치합니다:",C,u,I,$,P,d,R="OpenVINO 모델을 불러오고 OpenVINO 런타임으로 추론을 실행하려면 <code>StableDiffusionPipeline</code>을 <code>OVStableDiffusionPipeline</code>으로 교체해야 합니다. PyTorch 모델을 불러오고 즉시 OpenVINO 형식으로 변환하려는 경우 <code>export=True</code>로 설정합니다.",S,c,k,b,D='<a href="https://huggingface.co/docs/optimum/intel/inference#export-and-inference-of-stable-diffusion-models" rel="nofollow">Optimum 문서</a>에서 (정적 reshaping과 모델 컴파일 등의) 더 많은 예시들을 찾을 수 있습니다.',J,h,L,G,X;return p=new ae({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),o=new E({props:{title:"추론을 위한 OpenVINO 사용 방법",local:"추론을-위한-openvino-사용-방법",headingTag:"h1"}}),f=new E({props:{title:"설치",local:"설치",headingTag:"h2"}}),u=new A({props:{code:"cGlwJTIwaW5zdGFsbCUyMG9wdGltdW0lNUIlMjJvcGVudmlubyUyMiU1RA==",highlighted:'pip install optimum[<span class="hljs-string">&quot;openvino&quot;</span>]',wrap:!1}}),$=new E({props:{title:"Stable Diffusion 추론",local:"stable-diffusion-추론",headingTag:"h2"}}),c=new A({props:{code:"ZnJvbSUyMG9wdGltdW0uaW50ZWwub3BlbnZpbm8lMjBpbXBvcnQlMjBPVlN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJzdGFibGUtZGlmZnVzaW9uLXYxLTUlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMEFwaXBlJTIwJTNEJTIwT1ZTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBleHBvcnQlM0RUcnVlKSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFpbWFnZXMlMjAlM0QlMjBwaXBlKHByb21wdCkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-keyword">from</span> optimum.intel.openvino <span class="hljs-keyword">import</span> OVStableDiffusionPipeline

model_id = <span class="hljs-string">&quot;stable-diffusion-v1-5/stable-diffusion-v1-5&quot;</span>
pipe = OVStableDiffusionPipeline.from_pretrained(model_id, export=<span class="hljs-literal">True</span>)
prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
images = pipe(prompt).images[<span class="hljs-number">0</span>]`,wrap:!1}}),h=new se({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/ko/optimization/open_vino.md"}}),{c(){s=M("meta"),x=i(),B=M("p"),O=i(),g(p.$$.fragment),U=i(),g(o.$$.fragment),W=i(),m=M("p"),m.innerHTML=H,V=i(),g(f.$$.fragment),Z=i(),r=M("p"),r.textContent=Q,C=i(),g(u.$$.fragment),I=i(),g($.$$.fragment),P=i(),d=M("p"),d.innerHTML=R,S=i(),g(c.$$.fragment),k=i(),b=M("p"),b.innerHTML=D,J=i(),g(h.$$.fragment),L=i(),G=M("p"),this.h()},l(e){const t=le("svelte-u9bgzb",document.head);s=w(t,"META",{name:!0,content:!0}),t.forEach(n),x=a(e),B=w(e,"P",{}),q(B).forEach(n),O=a(e),_(p.$$.fragment,e),U=a(e),_(o.$$.fragment,e),W=a(e),m=w(e,"P",{"data-svelte-h":!0}),z(m)!=="svelte-1d6hoat"&&(m.innerHTML=H),V=a(e),_(f.$$.fragment,e),Z=a(e),r=w(e,"P",{"data-svelte-h":!0}),z(r)!=="svelte-1xb1j95"&&(r.textContent=Q),C=a(e),_(u.$$.fragment,e),I=a(e),_($.$$.fragment,e),P=a(e),d=w(e,"P",{"data-svelte-h":!0}),z(d)!=="svelte-1k1v2ls"&&(d.innerHTML=R),S=a(e),_(c.$$.fragment,e),k=a(e),b=w(e,"P",{"data-svelte-h":!0}),z(b)!=="svelte-3h7bza"&&(b.innerHTML=D),J=a(e),_(h.$$.fragment,e),L=a(e),G=w(e,"P",{}),q(G).forEach(n),this.h()},h(){F(s,"name","hf:doc:metadata"),F(s,"content",oe)},m(e,t){ie(document.head,s),l(e,x,t),l(e,B,t),l(e,O,t),v(p,e,t),l(e,U,t),v(o,e,t),l(e,W,t),l(e,m,t),l(e,V,t),v(f,e,t),l(e,Z,t),l(e,r,t),l(e,C,t),v(u,e,t),l(e,I,t),v($,e,t),l(e,P,t),l(e,d,t),l(e,S,t),v(c,e,t),l(e,k,t),l(e,b,t),l(e,J,t),v(h,e,t),l(e,L,t),l(e,G,t),X=!0},p:K,i(e){X||(y(p.$$.fragment,e),y(o.$$.fragment,e),y(f.$$.fragment,e),y(u.$$.fragment,e),y($.$$.fragment,e),y(c.$$.fragment,e),y(h.$$.fragment,e),X=!0)},o(e){T(p.$$.fragment,e),T(o.$$.fragment,e),T(f.$$.fragment,e),T(u.$$.fragment,e),T($.$$.fragment,e),T(c.$$.fragment,e),T(h.$$.fragment,e),X=!1},d(e){e&&(n(x),n(B),n(O),n(U),n(W),n(m),n(V),n(Z),n(r),n(C),n(I),n(P),n(d),n(S),n(k),n(b),n(J),n(L),n(G)),n(s),j(p,e),j(o,e),j(f,e),j(u,e),j($,e),j(c,e),j(h,e)}}}const oe='{"title":"추론을 위한 OpenVINO 사용 방법","local":"추론을-위한-openvino-사용-방법","sections":[{"title":"설치","local":"설치","sections":[],"depth":2},{"title":"Stable Diffusion 추론","local":"stable-diffusion-추론","sections":[],"depth":2}],"depth":1}';function me(N){return ee(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class de extends te{constructor(s){super(),ne(this,s,me,pe,Y,{})}}export{de as component};
