This is the quantized version of the Stable Diffusion model for pokemon generation.
To run the model use the folloing code:
%pip install optimum[openvino,diffusers]
from optimum.intel.openvino import OVStableDiffusionPipeline
from diffusers import LMSDiscreteScheduler, DDPMScheduler
import torch
import random
import numpy as np
pipe = OVStableDiffusionPipeline.from_pretrained("OpenVINO/Stable-Diffusion-Pokemon-en-quantized", compile=False)
pipe.reshape(batch_size=1, height=512, width=512, num_images_per_prompt=1)
pipe.compile()
# Use original model to compare
# pipe = OVStableDiffusionPipeline.from_pretrained("svjack/Stable-Diffusion-Pokemon-en", export=True, compile=False)
np.random.seed(42)
random.seed(42)
torch.manual_seed(42)
prompt = "cartoon bird"
output = pipe(prompt, num_inference_steps=50, output_type="pil") #Use 100 for more accurate result
output.images[0].save("output.png")
- Downloads last month
- 0
Unable to determine this model's library. Check the
docs
.