import{s as X,n as Y,o as A}from"../chunks/scheduler.6e0d5ff7.js";import{S as K,i as ee,g as h,s,r as y,E as te,h as g,f as n,c as i,j as q,u as M,x as N,k as F,y as ne,a as l,v as w,d as v,t as _,w as U}from"../chunks/index.d7c1b260.js";import{C as Q}from"../chunks/CodeBlock.09a08494.js";import{H as k,E as le}from"../chunks/EditOnGithub.733546da.js";function se(E){let a,O,J,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>서 지원되는 전 기기 목록을 확인하세요).`,W,m,G,f,z="다음 명령어로 🤗 Optimum을 설치합니다:",Z,r,V,u,C,c,D="OpenVINO 모델을 불러오고 OpenVINO 런타임으로 추론을 실행하려면 <code>StableDiffusionPipeline</code>을 <code>OVStableDiffusionPipeline</code>으로 교체해야 합니다. PyTorch 모델을 불러오고 즉시 OpenVINO 형식으로 변환하려는 경우 <code>export=True</code>로 설정합니다.",P,d,S,$,L='<a href="https://huggingface.co/docs/optimum/intel/inference#export-and-inference-of-stable-diffusion-models" rel="nofollow">Optimum 문서</a>에서 (정적 reshaping과 모델 컴파일 등의) 더 많은 예시들을 찾을 수 있습니다.',H,b,I,T,x;return p=new k({props:{title:"추론을 위한 OpenVINO 사용 방법",local:"추론을-위한-openvino-사용-방법",headingTag:"h1"}}),m=new k({props:{title:"설치",local:"설치",headingTag:"h2"}}),r=new Q({props:{code:"cGlwJTIwaW5zdGFsbCUyMG9wdGltdW0lNUIlMjJvcGVudmlubyUyMiU1RA==",highlighted:'pip <span class="hljs-keyword">install</span> optimum[<span class="hljs-string">&quot;openvino&quot;</span>]',wrap:!1}}),u=new k({props:{title:"Stable Diffusion 추론",local:"stable-diffusion-추론",headingTag:"h2"}}),d=new Q({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}}),b=new le({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/ko/optimization/open_vino.md"}}),{c(){a=h("meta"),O=s(),J=h("p"),j=s(),y(p.$$.fragment),B=s(),o=h("p"),o.innerHTML=R,W=s(),y(m.$$.fragment),G=s(),f=h("p"),f.textContent=z,Z=s(),y(r.$$.fragment),V=s(),y(u.$$.fragment),C=s(),c=h("p"),c.innerHTML=D,P=s(),y(d.$$.fragment),S=s(),$=h("p"),$.innerHTML=L,H=s(),y(b.$$.fragment),I=s(),T=h("p"),this.h()},l(e){const t=te("svelte-u9bgzb",document.head);a=g(t,"META",{name:!0,content:!0}),t.forEach(n),O=i(e),J=g(e,"P",{}),q(J).forEach(n),j=i(e),M(p.$$.fragment,e),B=i(e),o=g(e,"P",{"data-svelte-h":!0}),N(o)!=="svelte-1d6hoat"&&(o.innerHTML=R),W=i(e),M(m.$$.fragment,e),G=i(e),f=g(e,"P",{"data-svelte-h":!0}),N(f)!=="svelte-1xb1j95"&&(f.textContent=z),Z=i(e),M(r.$$.fragment,e),V=i(e),M(u.$$.fragment,e),C=i(e),c=g(e,"P",{"data-svelte-h":!0}),N(c)!=="svelte-1k1v2ls"&&(c.innerHTML=D),P=i(e),M(d.$$.fragment,e),S=i(e),$=g(e,"P",{"data-svelte-h":!0}),N($)!=="svelte-3h7bza"&&($.innerHTML=L),H=i(e),M(b.$$.fragment,e),I=i(e),T=g(e,"P",{}),q(T).forEach(n),this.h()},h(){F(a,"name","hf:doc:metadata"),F(a,"content",ie)},m(e,t){ne(document.head,a),l(e,O,t),l(e,J,t),l(e,j,t),w(p,e,t),l(e,B,t),l(e,o,t),l(e,W,t),w(m,e,t),l(e,G,t),l(e,f,t),l(e,Z,t),w(r,e,t),l(e,V,t),w(u,e,t),l(e,C,t),l(e,c,t),l(e,P,t),w(d,e,t),l(e,S,t),l(e,$,t),l(e,H,t),w(b,e,t),l(e,I,t),l(e,T,t),x=!0},p:Y,i(e){x||(v(p.$$.fragment,e),v(m.$$.fragment,e),v(r.$$.fragment,e),v(u.$$.fragment,e),v(d.$$.fragment,e),v(b.$$.fragment,e),x=!0)},o(e){_(p.$$.fragment,e),_(m.$$.fragment,e),_(r.$$.fragment,e),_(u.$$.fragment,e),_(d.$$.fragment,e),_(b.$$.fragment,e),x=!1},d(e){e&&(n(O),n(J),n(j),n(B),n(o),n(W),n(G),n(f),n(Z),n(V),n(C),n(c),n(P),n(S),n($),n(H),n(I),n(T)),n(a),U(p,e),U(m,e),U(r,e),U(u,e),U(d,e),U(b,e)}}}const ie='{"title":"추론을 위한 OpenVINO 사용 방법","local":"추론을-위한-openvino-사용-방법","sections":[{"title":"설치","local":"설치","sections":[],"depth":2},{"title":"Stable Diffusion 추론","local":"stable-diffusion-추론","sections":[],"depth":2}],"depth":1}';function ae(E){return A(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class re extends K{constructor(a){super(),ee(this,a,ae,se,X,{})}}export{re as component};
