Baptlem commited on
Commit
788a013
1 Parent(s): 88bd8ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -101,14 +101,16 @@ def pipe_inference(
101
  guidance_scale=guidance_scale,
102
  neg_prompt_ids=negative_prompt_ids,
103
  jit=True,
104
- )
105
- all_outputs = []
106
- all_outputs.append(image)
107
- if not is_canny:
108
- all_outputs.append(resized_image)
109
 
110
- for image in output.images:
111
- all_outputs.append(image)
 
 
112
  return all_outputs
113
 
114
  def resize_image(image, resolution):
 
101
  guidance_scale=guidance_scale,
102
  neg_prompt_ids=negative_prompt_ids,
103
  jit=True,
104
+ ).images
105
+ # all_outputs = []
106
+ # all_outputs.append(image)
107
+ # if not is_canny:
108
+ # all_outputs.append(resized_image)
109
 
110
+ # for image in output.images:
111
+ # all_outputs.append(image)
112
+
113
+ all_outputs = pipe.numpy_to_pil(np.asarray(output.reshape((num_samples,) + output.shape[-3:])))
114
  return all_outputs
115
 
116
  def resize_image(image, resolution):