Skip to content

Docker Image for v1.13.10+xpu? #288

@BA8F0D39

Description

@BA8F0D39

torch: 1.10.0a0+git3d5f2d4 ipex: 1.10.200+gpu works perfectly for Stable Diffusion in the Intel Pytorch Docker Container. It can use f16 precision to generate any image.

docker run -v /opt2/test/:/workspace \
           -v /dev/dri/by-path:/dev/dri/by-path \
           --device /dev/dri \
           --privileged \
           -it \
           intel/intel-optimized-pytorch:gpu bash
pip install diffusers ftfy transformers
import intel_extension_for_pytorch
import torch
from diffusers import StableDiffusionPipeline

model_id="runwayml/stable-diffusion-v1-5"
prompt = "vivid red hot air ballons over paris in the evening"
pipe = StableDiffusionPipeline.from_pretrained(
    model_id,
    torch_dtype=torch.float16,  # this can be torch.float32 as well
    revision="fp16",
    use_auth_token="<the token you generated>")
pipe = pipe.to("xpu")
image = pipe(prompt).images[0]
image.save(f"{prompt[:5]}.png")

However, upgrading to v1.13.10+xpu gives garbled and sometimes blank images

apt update
apt dist-upgrade
python -m pip install torch==1.13.0a0 -f https://developer.intel.com/ipex-whl-stable-xpu
python -m pip install intel_extension_for_pytorch==1.13.10+xpu -f https://developer.intel.com/ipex-whl-stable-xpu

There are no error messages, but I think something is linked incorrectly or f16 computations have changed going from 1.10.200+gpu to v1.13.10+xpu

Is it possible for intel to update the docker container?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions