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 as i,r as y,E as te,h as g,f as n,c as s,j as q,u as M,x as N,k as F,y as ne,a as l,v,d as w,t as _,w as U}from"../chunks/index.d7c1b260.js";import{C as Q}from"../chunks/CodeBlock.09a08494.js";import{H as E,E as le}from"../chunks/EditOnGithub.733546da.js";function ie(R){let a,O,J,B,p,W,o,k=`🤗 <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>서 지원되는 전 기기 목록을 확인하세요).`,j,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 E({props:{title:"추론을 위한 OpenVINO 사용 방법",local:"추론을-위한-openvino-사용-방법",headingTag:"h1"}}),m=new E({props:{title:"설치",local:"설치",headingTag:"h2"}}),r=new Q({props:{code:"cGlwJTIwaW5zdGFsbCUyMG9wdGltdW0lNUIlMjJvcGVudmlubyUyMiU1RA==",highlighted:'pip install optimum[<span class="hljs-string">&quot;openvino&quot;</span>]',wrap:!1}}),u=new E({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=i(),J=h("p"),B=i(),y(p.$$.fragment),W=i(),o=h("p"),o.innerHTML=k,j=i(),y(m.$$.fragment),G=i(),f=h("p"),f.textContent=z,Z=i(),y(r.$$.fragment),V=i(),y(u.$$.fragment),C=i(),c=h("p"),c.innerHTML=D,P=i(),y(d.$$.fragment),S=i(),$=h("p"),$.innerHTML=L,H=i(),y(b.$$.fragment),I=i(),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=s(e),J=g(e,"P",{}),q(J).forEach(n),B=s(e),M(p.$$.fragment,e),W=s(e),o=g(e,"P",{"data-svelte-h":!0}),N(o)!=="svelte-1d6hoat"&&(o.innerHTML=k),j=s(e),M(m.$$.fragment,e),G=s(e),f=g(e,"P",{"data-svelte-h":!0}),N(f)!=="svelte-1xb1j95"&&(f.textContent=z),Z=s(e),M(r.$$.fragment,e),V=s(e),M(u.$$.fragment,e),C=s(e),c=g(e,"P",{"data-svelte-h":!0}),N(c)!=="svelte-1k1v2ls"&&(c.innerHTML=D),P=s(e),M(d.$$.fragment,e),S=s(e),$=g(e,"P",{"data-svelte-h":!0}),N($)!=="svelte-3h7bza"&&($.innerHTML=L),H=s(e),M(b.$$.fragment,e),I=s(e),T=g(e,"P",{}),q(T).forEach(n),this.h()},h(){F(a,"name","hf:doc:metadata"),F(a,"content",se)},m(e,t){ne(document.head,a),l(e,O,t),l(e,J,t),l(e,B,t),v(p,e,t),l(e,W,t),l(e,o,t),l(e,j,t),v(m,e,t),l(e,G,t),l(e,f,t),l(e,Z,t),v(r,e,t),l(e,V,t),v(u,e,t),l(e,C,t),l(e,c,t),l(e,P,t),v(d,e,t),l(e,S,t),l(e,$,t),l(e,H,t),v(b,e,t),l(e,I,t),l(e,T,t),x=!0},p:Y,i(e){x||(w(p.$$.fragment,e),w(m.$$.fragment,e),w(r.$$.fragment,e),w(u.$$.fragment,e),w(d.$$.fragment,e),w(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(B),n(W),n(o),n(j),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 se='{"title":"추론을 위한 OpenVINO 사용 방법","local":"추론을-위한-openvino-사용-방법","sections":[{"title":"설치","local":"설치","sections":[],"depth":2},{"title":"Stable Diffusion 추론","local":"stable-diffusion-추론","sections":[],"depth":2}],"depth":1}';function ae(R){return A(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class re extends K{constructor(a){super(),ee(this,a,ae,ie,X,{})}}export{re as component};
