|
# Python Text2Image Inference |
|
|
|
```python |
|
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler |
|
import torch |
|
|
|
repo_id = "hearmeneigh/sd21-e621-rising-v1" |
|
pipe = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.float16, revision="fp16") |
|
|
|
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config) |
|
pipe = pipe.to("cuda") |
|
|
|
prompt = "anthro species:equine solo male biped standing rating:questionable evil_grin seductive looking_at_viewer" |
|
image = pipe(prompt, guidance_scale=9, num_inference_steps=25).images[0] |
|
image.save("horse.png") |
|
``` |
|
|