import{s as F,n as Q,o as X}from"../chunks/scheduler.6e0d5ff7.js";import{S as Y,i as A,g as b,s,r as w,E as K,h as $,f as n,c as a,j as L,u as v,x as I,k as q,y as ee,a as l,v as _,d as g,t as U,w as J}from"../chunks/index.d7c1b260.js";import{C as z}from"../chunks/CodeBlock.09a08494.js";import{H as x}from"../chunks/Heading.30a009b0.js";function te(N){let i,T,y,j,p,B,o,R=`🤗 <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>서 지원되는 전 기기 목록을 확인하세요).`,O,m,W,f,k="다음 명령어로 🤗 Optimum을 설치합니다:",Z,r,G,u,V,c,E="OpenVINO 모델을 불러오고 OpenVINO 런타임으로 추론을 실행하려면 <code>StableDiffusionPipeline</code>을 <code>OVStableDiffusionPipeline</code>으로 교체해야 합니다. PyTorch 모델을 불러오고 즉시 OpenVINO 형식으로 변환하려는 경우 <code>export=True</code>로 설정합니다.",C,d,P,h,D='<a href="https://huggingface.co/docs/optimum/intel/inference#export-and-inference-of-stable-diffusion-models" rel="nofollow">Optimum 문서</a>에서 (정적 reshaping과 모델 컴파일 등의) 더 많은 예시들을 찾을 수 있습니다.',S,M,H;return p=new x({props:{title:"추론을 위한 OpenVINO 사용 방법",local:"추론을-위한-openvino-사용-방법",headingTag:"h1"}}),m=new x({props:{title:"설치",local:"설치",headingTag:"h2"}}),r=new z({props:{code:"cGlwJTIwaW5zdGFsbCUyMG9wdGltdW0lNUIlMjJvcGVudmlubyUyMiU1RA==",highlighted:'pip <span class="hljs-keyword">install</span> optimum[<span class="hljs-string">&quot;openvino&quot;</span>]',wrap:!1}}),u=new x({props:{title:"Stable Diffusion 추론",local:"stable-diffusion-추론",headingTag:"h2"}}),d=new z({props:{code:"ZnJvbSUyMG9wdGltdW0uaW50ZWwub3BlbnZpbm8lMjBpbXBvcnQlMjBPVlN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXBpcGUlMjAlM0QlMjBPVlN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMGV4cG9ydCUzRFRydWUpJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQWltYWdlcyUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-keyword">from</span> optimum.intel.openvino <span class="hljs-keyword">import</span> OVStableDiffusionPipeline

model_id = <span class="hljs-string">&quot;runwayml/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}}),{c(){i=b("meta"),T=s(),y=b("p"),j=s(),w(p.$$.fragment),B=s(),o=b("p"),o.innerHTML=R,O=s(),w(m.$$.fragment),W=s(),f=b("p"),f.textContent=k,Z=s(),w(r.$$.fragment),G=s(),w(u.$$.fragment),V=s(),c=b("p"),c.innerHTML=E,C=s(),w(d.$$.fragment),P=s(),h=b("p"),h.innerHTML=D,S=s(),M=b("p"),this.h()},l(e){const t=K("svelte-u9bgzb",document.head);i=$(t,"META",{name:!0,content:!0}),t.forEach(n),T=a(e),y=$(e,"P",{}),L(y).forEach(n),j=a(e),v(p.$$.fragment,e),B=a(e),o=$(e,"P",{"data-svelte-h":!0}),I(o)!=="svelte-1d6hoat"&&(o.innerHTML=R),O=a(e),v(m.$$.fragment,e),W=a(e),f=$(e,"P",{"data-svelte-h":!0}),I(f)!=="svelte-1xb1j95"&&(f.textContent=k),Z=a(e),v(r.$$.fragment,e),G=a(e),v(u.$$.fragment,e),V=a(e),c=$(e,"P",{"data-svelte-h":!0}),I(c)!=="svelte-1k1v2ls"&&(c.innerHTML=E),C=a(e),v(d.$$.fragment,e),P=a(e),h=$(e,"P",{"data-svelte-h":!0}),I(h)!=="svelte-3h7bza"&&(h.innerHTML=D),S=a(e),M=$(e,"P",{}),L(M).forEach(n),this.h()},h(){q(i,"name","hf:doc:metadata"),q(i,"content",ne)},m(e,t){ee(document.head,i),l(e,T,t),l(e,y,t),l(e,j,t),_(p,e,t),l(e,B,t),l(e,o,t),l(e,O,t),_(m,e,t),l(e,W,t),l(e,f,t),l(e,Z,t),_(r,e,t),l(e,G,t),_(u,e,t),l(e,V,t),l(e,c,t),l(e,C,t),_(d,e,t),l(e,P,t),l(e,h,t),l(e,S,t),l(e,M,t),H=!0},p:Q,i(e){H||(g(p.$$.fragment,e),g(m.$$.fragment,e),g(r.$$.fragment,e),g(u.$$.fragment,e),g(d.$$.fragment,e),H=!0)},o(e){U(p.$$.fragment,e),U(m.$$.fragment,e),U(r.$$.fragment,e),U(u.$$.fragment,e),U(d.$$.fragment,e),H=!1},d(e){e&&(n(T),n(y),n(j),n(B),n(o),n(O),n(W),n(f),n(Z),n(G),n(V),n(c),n(C),n(P),n(h),n(S),n(M)),n(i),J(p,e),J(m,e),J(r,e),J(u,e),J(d,e)}}}const ne='{"title":"추론을 위한 OpenVINO 사용 방법","local":"추론을-위한-openvino-사용-방법","sections":[{"title":"설치","local":"설치","sections":[],"depth":2},{"title":"Stable Diffusion 추론","local":"stable-diffusion-추론","sections":[],"depth":2}],"depth":1}';function le(N){return X(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oe extends Y{constructor(i){super(),A(this,i,le,te,F,{})}}export{oe as component};
