Update app.py
Browse files
app.py
CHANGED
@@ -41,20 +41,17 @@ footer {
|
|
41 |
|
42 |
repo_nsfw_classifier = pipeline("image-classification", model="Falconsai/nsfw_image_detection")
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
repo_large = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16, use_safetensors=True, add_watermarker=False)
|
50 |
-
# repo_large.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
|
51 |
|
52 |
repo_customs = {
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
"Large":
|
58 |
}
|
59 |
|
60 |
# Functions
|
@@ -93,7 +90,7 @@ def generate(input=DEFAULT_INPUT, filter_input="", negative_input=DEFAULT_NEGATI
|
|
93 |
guidance_set = 1.5
|
94 |
repo.set_adapters(["pixel_base", "pixel_base_2"], adapter_weights=[1, 1])
|
95 |
elif model == "Large":
|
96 |
-
steps_set =
|
97 |
guidance_set = 3.5
|
98 |
else:
|
99 |
steps_set = 25
|
|
|
41 |
|
42 |
repo_nsfw_classifier = pipeline("image-classification", model="Falconsai/nsfw_image_detection")
|
43 |
|
44 |
+
repo_default = DiffusionPipeline.from_pretrained("fluently/Fluently-XL-Final", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
|
45 |
+
repo_default.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="default_base")
|
46 |
+
repo_default.load_lora_weights("artificialguybr/PixelArtRedmond", adapter_name="pixel_base")
|
47 |
+
repo_default.load_lora_weights("nerijs/pixel-art-xl", adapter_name="pixel_base_2")
|
|
|
|
|
|
|
48 |
|
49 |
repo_customs = {
|
50 |
+
"Default": repo_default,
|
51 |
+
"Realistic": DiffusionPipeline.from_pretrained("ehristoforu/Visionix-alpha", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
|
52 |
+
"Anime": DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-3.1", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
|
53 |
+
"Pixel": repo_default,
|
54 |
+
"Large": DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16, use_safetensors=True, add_watermarker=False),
|
55 |
}
|
56 |
|
57 |
# Functions
|
|
|
90 |
guidance_set = 1.5
|
91 |
repo.set_adapters(["pixel_base", "pixel_base_2"], adapter_weights=[1, 1])
|
92 |
elif model == "Large":
|
93 |
+
steps_set = 10
|
94 |
guidance_set = 3.5
|
95 |
else:
|
96 |
steps_set = 25
|