Commit
·
f941bfb
1
Parent(s):
6e1b3e5
up
Browse files
run_lora
CHANGED
|
@@ -13,6 +13,7 @@ from io import BytesIO
|
|
| 13 |
|
| 14 |
# path = sys.argv[1]
|
| 15 |
path = "runwayml/stable-diffusion-v1-5"
|
|
|
|
| 16 |
# path = "stabilityai/stable-diffusion-2-1"
|
| 17 |
|
| 18 |
api = HfApi()
|
|
@@ -29,12 +30,14 @@ prompt = "masterpiece, best quality, 1girl, at dusk"
|
|
| 29 |
negative_prompt = ("(low quality, worst quality:1.4), (bad anatomy), (inaccurate limb:1.2), "
|
| 30 |
"bad composition, inaccurate eyes, extra digit, fewer digits, (extra arms:1.2), large breasts")
|
| 31 |
|
|
|
|
| 32 |
images = pipe(prompt=prompt,
|
| 33 |
negative_prompt=negative_prompt,
|
| 34 |
width=512,
|
| 35 |
height=768,
|
| 36 |
num_inference_steps=15,
|
| 37 |
num_images_per_prompt=4,
|
|
|
|
| 38 |
generator=torch.manual_seed(0)
|
| 39 |
).images
|
| 40 |
|
|
|
|
| 13 |
|
| 14 |
# path = sys.argv[1]
|
| 15 |
path = "runwayml/stable-diffusion-v1-5"
|
| 16 |
+
path = "gsdf/Counterfeit-V2.5"
|
| 17 |
# path = "stabilityai/stable-diffusion-2-1"
|
| 18 |
|
| 19 |
api = HfApi()
|
|
|
|
| 30 |
negative_prompt = ("(low quality, worst quality:1.4), (bad anatomy), (inaccurate limb:1.2), "
|
| 31 |
"bad composition, inaccurate eyes, extra digit, fewer digits, (extra arms:1.2), large breasts")
|
| 32 |
|
| 33 |
+
pipe.enable_xformers_memory_efficient_attention()
|
| 34 |
images = pipe(prompt=prompt,
|
| 35 |
negative_prompt=negative_prompt,
|
| 36 |
width=512,
|
| 37 |
height=768,
|
| 38 |
num_inference_steps=15,
|
| 39 |
num_images_per_prompt=4,
|
| 40 |
+
cross_attention_kwargs={"scale": 0.5},
|
| 41 |
generator=torch.manual_seed(0)
|
| 42 |
).images
|
| 43 |
|