Open EvgeniiLavrinov opened 1 year ago
I was able to use the waifu-diffusion model with the following code.
pipe = StableDiffusionPipeline.from_pretrained("hakurei/waifu-diffusion", torch_dtype=torch.float16)
pipe.safety_checker = lambda images, **kwargs: (images, False)
prompt = "1girl, \
blue eyes, \
cat ears, \
full body, \
looking at viewer, \
school uniform, \
simple background, \
silver long hair, \
under rim eyewear, \
white background"
image = pipe(prompt, height=512, width=512, num_inference_steps=50, guidance_scale=7.5, eta=0.0, execution_provider="DmlExecutionProvider")["sample"][0]
image.save("Dml_waifu1.png")
Generate image. (The image is corrupted because I did not adjust the prompts, etc.
Thanks for the answer. Just recently I found a build that launches webui (allows you to use a negative prompt) but without using the GPU. It's a pity that the CPU is slow in this process. Now I'm looking for the possibility to launch webui using rx5700 (this card is somehow used in dml_onnx). Maybe someone already has similar developments?
Is it possible to change the model to waifu-diffusion? I did not find guides to work with amd cards.