Update app.py
Browse files
app.py
CHANGED
@@ -14,12 +14,6 @@ from diffusers.models import AutoencoderKL
|
|
14 |
from PIL import Image
|
15 |
|
16 |
# Pre-Initialize
|
17 |
-
subprocess.run(
|
18 |
-
"pip install flash-attn --no-build-isolation",
|
19 |
-
env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
|
20 |
-
shell=True,
|
21 |
-
)
|
22 |
-
|
23 |
DEVICE = "auto"
|
24 |
if DEVICE == "auto":
|
25 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
@@ -32,13 +26,13 @@ DEFAULT_NEGATIVE_INPUT = "deformed, distorted, disfigured, disconnected, disgust
|
|
32 |
DEFAULT_HEIGHT = 1024
|
33 |
DEFAULT_WIDTH = 1024
|
34 |
|
35 |
-
REPO = "
|
36 |
|
37 |
-
vae = AutoencoderKL.from_pretrained("
|
38 |
-
controlnet = ControlNetModel.from_pretrained("
|
39 |
|
40 |
model = StableDiffusionXLPipeline.from_pretrained(REPO, vae=vae, controlnet=controlnet, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
|
41 |
-
model.load_lora_weights("
|
42 |
model.set_adapters(["base"], adapter_weights=[0.7])
|
43 |
model.to(DEVICE)
|
44 |
|
|
|
14 |
from PIL import Image
|
15 |
|
16 |
# Pre-Initialize
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
DEVICE = "auto"
|
18 |
if DEVICE == "auto":
|
19 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
26 |
DEFAULT_HEIGHT = 1024
|
27 |
DEFAULT_WIDTH = 1024
|
28 |
|
29 |
+
REPO = "hsalf-lxds/ytinummoc-ds"[::-1]
|
30 |
|
31 |
+
vae = AutoencoderKL.from_pretrained("xif-61pf-eav-lxds/nilloybedam"[::-1], torch_dtype=torch.float16)
|
32 |
+
controlnet = ControlNetModel.from_pretrained("k031-sdnah-dedocne-tenlortnoc/naPikaM"[::-1], torch_dtype=torch.float16)
|
33 |
|
34 |
model = StableDiffusionXLPipeline.from_pretrained(REPO, vae=vae, controlnet=controlnet, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
|
35 |
+
model.load_lora_weights("2v-lx-3-ellad/urofotsirhe"[::-1], adapter_name="base")
|
36 |
model.set_adapters(["base"], adapter_weights=[0.7])
|
37 |
model.to(DEVICE)
|
38 |
|