Skip to content

Commit

Permalink
using sdpa for statble diffusion (openvinotoolkit#458)
Browse files Browse the repository at this point in the history
Co-authored-by: Chen Peter <peter.chen@intel.com>
  • Loading branch information
wgzintel and peterchen-intel authored Jun 4, 2024
1 parent 04510d4 commit 561cde0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions llm_bench/python/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ def _get_submodels_for_export_stable_diffusion(
Returns the components of a Stable Diffusion model.
"""
from diffusers import StableDiffusionXLImg2ImgPipeline
from diffusers.models.attention_processor import AttnProcessor

models_for_export = {}
if isinstance(pipeline, StableDiffusionXLImg2ImgPipeline):
Expand All @@ -450,7 +449,6 @@ def _get_submodels_for_export_stable_diffusion(
# The U-NET time_ids inputs shapes depends on the value of `requires_aesthetics_score`
# https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py#L571
pipeline.unet.config.requires_aesthetics_score = getattr(pipeline.config, "requires_aesthetics_score", False)
pipeline.unet.set_attn_processor(AttnProcessor())
models_for_export["unet"] = pipeline.unet

# VAE Encoder https://github.com/huggingface/diffusers/blob/v0.11.1/src/diffusers/models/vae.py#L565
Expand Down

0 comments on commit 561cde0

Please sign in to comment.