import torch from torch import autocast from diffusers import StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained( 'AlexWortega/AnimeDiffuion', torch_dtype=torch.float32 ).to('cuda')

negative_prompt = """low-res, duplicate, poorly drawn face, ugly, undetailed face""" d = 'white girl' prompt = f"1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt" num_samples = 1

with torch.inference_mode(): images = pipe([prompt] * num_samples, negative_prompt = [negative_prompt]*num_samples, height=512, width=512, num_inference_steps=50, guidance_scale=8, ).images

images[0].save("test.png")