Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import uuid
|
|
7 |
import os
|
8 |
from transformers import pipeline
|
9 |
|
10 |
-
from diffusers import StableDiffusionXLPipeline
|
11 |
from diffusers.models import AutoencoderKL
|
12 |
from PIL import Image
|
13 |
|
@@ -37,22 +37,19 @@ repo_nsfw_classifier = pipeline("image-classification", model="Falconsai/nsfw_im
|
|
37 |
|
38 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
39 |
|
40 |
-
repo_default = StableDiffusionXLPipeline.from_pretrained("fluently/Fluently-XL-Final", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
|
41 |
repo_default.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
|
42 |
repo_default.set_adapters("base")
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
repo_pixel
|
48 |
-
#repo_pixel.load_lora_weights("artificialguybr/PixelArtRedmond", adapter_name="base")
|
49 |
-
#repo_pixel.load_lora_weights("nerijs/pixel-art-xl", adapter_name="base2")
|
50 |
-
#repo_pixel.set_adapters(["base", "base2"], adapter_weights=[1, 1])
|
51 |
|
52 |
repo_customs = {
|
53 |
"Default": repo_default,
|
54 |
-
"Realistic":
|
55 |
-
"Anime":
|
56 |
"Pixel": repo_pixel,
|
57 |
}
|
58 |
|
|
|
7 |
import os
|
8 |
from transformers import pipeline
|
9 |
|
10 |
+
from diffusers import StableDiffusionXLPipeline
|
11 |
from diffusers.models import AutoencoderKL
|
12 |
from PIL import Image
|
13 |
|
|
|
37 |
|
38 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
39 |
|
40 |
+
repo_default = StableDiffusionXLPipeline.from_pretrained("fluently/Fluently-XL-Final", vae=vae, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
|
41 |
repo_default.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
|
42 |
repo_default.set_adapters("base")
|
43 |
|
44 |
+
repo_pixel = StableDiffusionXLPipeline.from_pretrained("fluently/Fluently-XL-Final", vae=vae, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
|
45 |
+
repo_pixel.load_lora_weights("artificialguybr/PixelArtRedmond", adapter_name="base")
|
46 |
+
repo_pixel.load_lora_weights("nerijs/pixel-art-xl", adapter_name="base2")
|
47 |
+
repo_pixel.set_adapters(["base", "base2"], adapter_weights=[1, 1])
|
|
|
|
|
|
|
48 |
|
49 |
repo_customs = {
|
50 |
"Default": repo_default,
|
51 |
+
"Realistic": StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V4.0", vae=vae, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
|
52 |
+
"Anime": StableDiffusionXLPipeline.from_pretrained("cagliostrolab/animagine-xl-3.1", vae=vae, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
|
53 |
"Pixel": repo_pixel,
|
54 |
}
|
55 |
|