sayakpaul HF staff commited on
Commit
7204f03
1 Parent(s): 0371a11

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: creativeml-openrail-m
3
+ base_model: gsdf/Counterfeit-V2.5
4
+ tags:
5
+ - stable-diffusion
6
+ - stable-diffusion-diffusers
7
+ - text-to-image
8
+ - diffusers
9
+ - lora
10
+ - civitai
11
+ - a1111
12
+ ---
13
+
14
+ This repository contains a LoRA model downloaded from [CivitAI](https://civitai.com/models/13239/light-and-shadow).
15
+
16
+ You can load this checkpoint in 🧨 diffusers and perform like so:
17
+
18
+ ```python
19
+ import torch
20
+ from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
21
+
22
+ pipeline = StableDiffusionPipeline.from_pretrained(
23
+ "gsdf/Counterfeit-V2.5", torch_dtype=torch.float16, safety_checker=None
24
+ ).to("cuda")
25
+ pipeline.scheduler = DPMSolverMultistepScheduler.from_config(
26
+ pipeline.scheduler.config, use_karras_sigmas=True
27
+ )
28
+
29
+ pipeline.load_lora_weights(
30
+ "sayakpaul/civitai-light-shadow-lora", weight_name="light_and_shadow.safetensors"
31
+ )
32
+ prompt = "masterpiece, best quality, 1girl, at dusk"
33
+ negative_prompt = ("(low quality, worst quality:1.4), (bad anatomy), (inaccurate limb:1.2), "
34
+ "bad composition, inaccurate eyes, extra digit, fewer digits, (extra arms:1.2), large breasts")
35
+
36
+ image = pipeline(prompt=prompt,
37
+ negative_prompt=negative_prompt,
38
+ width=512,
39
+ height=768,
40
+ num_inference_steps=15,
41
+ # num_images_per_prompt=1,
42
+ generator=torch.manual_seed(0)
43
+ ).images[0]
44
+ image.save("image.png")
45
+ ```
46
+
47
+ Below is a comparison between the LoRA and the non-LoRA results:
48
+
49
+ <div align="center">
50
+ <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/lora_non_lora_comparison.png" width=650/>
51
+ </div>