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