fffiloni commited on
Commit
85c6896
·
verified ·
1 Parent(s): 2471e0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -4,6 +4,7 @@ import os
4
  import spaces
5
  import random
6
  import torch
 
7
 
8
  is_shared_ui = True if "fffiloni/sdxl-control-loras" in os.environ['SPACE_ID'] else False
9
 
@@ -149,7 +150,11 @@ def infer(use_custom_model, model_name, weight_name, custom_lora_weight, image_i
149
  image = Image.fromarray(image)
150
 
151
  if preprocessor == "lineart":
152
- image = Image.open(image_in)
 
 
 
 
153
 
154
  if use_custom_model:
155
 
 
4
  import spaces
5
  import random
6
  import torch
7
+ from controlnet_aux.util import HWC3
8
 
9
  is_shared_ui = True if "fffiloni/sdxl-control-loras" in os.environ['SPACE_ID'] else False
10
 
 
150
  image = Image.fromarray(image)
151
 
152
  if preprocessor == "lineart":
153
+ image = load_image(image_in)
154
+ image = np.array(image)
155
+ image = HWC3(image)
156
+ #image = resize_image(image, resolution=image_resolution)
157
+ image = PIL.Image.fromarray(image)
158
 
159
  if use_custom_model:
160