lichorosario commited on
Commit
4eaf0e2
1 Parent(s): d977eae

feat: Update app.py to use new Tile-Upscaler client

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -9,7 +9,9 @@ with open('loras.json', 'r') as f:
9
 
10
  job = None
11
 
12
- client = Client("fffiloni/sd-xl-custom-model")
 
 
13
 
14
  def infer(selected_index, prompt, style_prompt, inf_steps, guidance_scale, width, height, seed, lora_weight, progress=gr.Progress(track_tqdm=True)):
15
  try:
@@ -22,7 +24,7 @@ def infer(selected_index, prompt, style_prompt, inf_steps, guidance_scale, width
22
  custom_model = selected_lora["repo"]
23
  trigger_word = selected_lora["trigger_word"]
24
 
25
- result = client.submit(
26
  custom_model=custom_model,
27
  api_name="/load_model"
28
  )
@@ -31,7 +33,7 @@ def infer(selected_index, prompt, style_prompt, inf_steps, guidance_scale, width
31
  prompt_arr = [trigger_word, prompt, style_prompt]
32
  prompt = '. '.join([element.strip() for element in prompt_arr if element.strip() != ''])
33
 
34
- job = client.submit(
35
  custom_model=custom_model,
36
  weight_name=weight_name,
37
  prompt=prompt,
 
9
 
10
  job = None
11
 
12
+ client_custom_model = Client("fffiloni/sd-xl-custom-model")
13
+ client_tile_upscaler = Client("gokaygokay/Tile-Upscaler")
14
+
15
 
16
  def infer(selected_index, prompt, style_prompt, inf_steps, guidance_scale, width, height, seed, lora_weight, progress=gr.Progress(track_tqdm=True)):
17
  try:
 
24
  custom_model = selected_lora["repo"]
25
  trigger_word = selected_lora["trigger_word"]
26
 
27
+ result = client_custom_model.submit(
28
  custom_model=custom_model,
29
  api_name="/load_model"
30
  )
 
33
  prompt_arr = [trigger_word, prompt, style_prompt]
34
  prompt = '. '.join([element.strip() for element in prompt_arr if element.strip() != ''])
35
 
36
+ job = client_custom_model.submit(
37
  custom_model=custom_model,
38
  weight_name=weight_name,
39
  prompt=prompt,