How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("fill-in-base-model", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("svjack/concept-caption-3m-sd-lora-en")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

Model Card for svjack/concept-caption-3m-sd-lora-en

Installation

pip install -U diffusers
pip install transformers

Usage

from diffusers import StableDiffusionPipeline
import torch

pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-2", torch_dtype=torch.float16)
model_path = "svjack/concept-caption-3m-sd-lora-en"

pipe.unet.load_attn_procs(model_path)
pipe.to("cuda")
pipe.safety_checker = lambda images, clip_input: (images, False)
print("have_load")

prompt = "A Happpy dog"
image = pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
image

0

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support