lichorosario commited on
Commit
d263de1
1 Parent(s): 69525dd

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

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -117,14 +117,14 @@ def update_selection(evt: gr.SelectData):
117
  def upscale_image(image, resolution, num_inference_steps, strength, hdr, guidance_scale, controlnet_strength, scheduler_name):
118
  global client_tile_upscaler
119
 
120
- if client_tile_upscaler is None:
121
- try:
122
- client_tile_upscaler = Client(tile_upscaler_url)
123
- print(f"Loaded custom model from {tile_upscaler_url}")
124
- except ValueError as e:
125
- print(f"Failed to load custom model: {e}")
126
- client_custom_model = None
127
- raise gr.Error("Failed to load client for " + tile_upscaler_url)
128
 
129
  try:
130
  result = client_tile_upscaler.predict(
 
117
  def upscale_image(image, resolution, num_inference_steps, strength, hdr, guidance_scale, controlnet_strength, scheduler_name):
118
  global client_tile_upscaler
119
 
120
+ # if client_tile_upscaler is None:
121
+ try:
122
+ client_tile_upscaler = Client(tile_upscaler_url)
123
+ print(f"Loaded custom model from {tile_upscaler_url}")
124
+ except ValueError as e:
125
+ print(f"Failed to load custom model: {e}")
126
+ client_custom_model = None
127
+ raise gr.Error("Failed to load client for " + tile_upscaler_url)
128
 
129
  try:
130
  result = client_tile_upscaler.predict(