Staticaliza commited on
Commit
c2edb39
·
verified ·
1 Parent(s): 4c166bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
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).to(DEVICE)
47
 
48
- repo_neo = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", device=DEVICE, torch_dtype=torch.bfloat16, use_safetensors=False, add_watermarker=False, revision="refs/pr/1").to(DEVICE)
49
- repo_neo.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
50
- repo_neo.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).to(DEVICE),
55
- "Anime": DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-3.1", device=DEVICE, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False).to(DEVICE),
56
  "Pixel": repo_default,
57
- "Neo": repo_neo,
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 == "Neo":
99
- steps_set = 4
100
- guidance_set = 0
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