BleachNick's picture
upload required packages
87d40d2

A newer version of the Gradio SDK is available: 5.23.3

Upgrade

좔둠을 μœ„ν•œ OpenVINO μ‚¬μš© 방법

πŸ€— Optimum은 OpenVINO와 ν˜Έν™˜λ˜λŠ” Stable Diffusion νŒŒμ΄ν”„λΌμΈμ„ μ œκ³΅ν•©λ‹ˆλ‹€. 이제 λ‹€μ–‘ν•œ Intel ν”„λ‘œμ„Έμ„œμ—μ„œ OpenVINO Runtime으둜 μ‰½κ²Œ 좔둠을 μˆ˜ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€. (μ—¬κΈ°μ„œ μ§€μ›λ˜λŠ” μ „ κΈ°κΈ° λͺ©λ‘μ„ ν™•μΈν•˜μ„Έμš”).

μ„€μΉ˜

λ‹€μŒ λͺ…λ Ήμ–΄λ‘œ πŸ€— Optimum을 μ„€μΉ˜ν•©λ‹ˆλ‹€:

pip install optimum["openvino"]

Stable Diffusion μΆ”λ‘ 

OpenVINO λͺ¨λΈμ„ 뢈러였고 OpenVINO λŸ°νƒ€μž„μœΌλ‘œ 좔둠을 μ‹€ν–‰ν•˜λ €λ©΄ StableDiffusionPipeline을 OVStableDiffusionPipeline으둜 ꡐ체해야 ν•©λ‹ˆλ‹€. PyTorch λͺ¨λΈμ„ 뢈러였고 μ¦‰μ‹œ OpenVINO ν˜•μ‹μœΌλ‘œ λ³€ν™˜ν•˜λ €λŠ” 경우 export=True둜 μ„€μ •ν•©λ‹ˆλ‹€.

from optimum.intel.openvino import OVStableDiffusionPipeline

model_id = "runwayml/stable-diffusion-v1-5"
pipe = OVStableDiffusionPipeline.from_pretrained(model_id, export=True)
prompt = "a photo of an astronaut riding a horse on mars"
images = pipe(prompt).images[0]

Optimum λ¬Έμ„œμ—μ„œ (정적 reshapingκ³Ό λͺ¨λΈ 컴파일 λ“±μ˜) 더 λ§Žμ€ μ˜ˆμ‹œλ“€μ„ 찾을 수 μžˆμŠ΅λ‹ˆλ‹€.