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