| | --- |
| | language: |
| | - en |
| | library_name: diffusers |
| | tags: |
| | - stable-diffusion |
| | - lora |
| | --- |
| | |
| | # Model Card for svjack/concept-caption-3m-sd-lora-en |
| |
|
| | ## Installation |
| | ```bash |
| | pip install -U diffusers |
| | pip install transformers |
| | ``` |
| |
|
| | ## Usage |
| | ```python |
| | 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 |
| | ``` |
| |
|
| |  |