metadata
license: creativeml-openrail-m
language:
- en
library_name: diffusers
pipeline_tag: text-to-image
base_model: stabilityai/stable-diffusion-2
tags:
- code
- safetensors
- stable-diffusion
- scheduler
- text_encoder
- tokenizer
- unet
- vae
inference:
parameters:
num_inference_steps: 7
guidance_scale: 3
negative_prompt: >-
(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong
anatomy, extra limb, missing limb, floating limbs, (mutated hands and
fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting,
blurry, amputation
*Samim Kumar Patel, Pretrained Model, With proper use of best Hyperparameters for Business UseCases for Production Level
Introducing the pretrained Model from the base Model called stabilityai/stable-diffusion-2, which is very fast and production deployable. It is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input.
Diffusers usage
pip install torch diffusers
from diffusers import StableDiffusionPipeline
import torch
model_id = "samim2024/text-to-image"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]
image.save("astronaut_rides_horse.png")