Cognomen commited on
Commit
b00ba88
Β·
1 Parent(s): e6cf7d1

fix attempt 2

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ generator = torch.manual_seed(0)
32
  def infer(prompt, negative_prompt, image):
33
  # implement your inference function here
34
 
35
- cond_input = conditioning_image_transforms(image)
36
 
37
  output = pipe(
38
  prompt,
@@ -42,7 +42,7 @@ def infer(prompt, negative_prompt, image):
42
  num_inference_steps=20
43
  )
44
 
45
- return torch.tensor(output[0])
46
 
47
  # you need to pass inputs and outputs according to inference function
48
  title = "Categorical Conditioning Controlnet for One-Shot Image Stylization."
 
32
  def infer(prompt, negative_prompt, image):
33
  # implement your inference function here
34
 
35
+ cond_input = conditioning_image_transforms(T.PILToTensor(image))
36
 
37
  output = pipe(
38
  prompt,
 
42
  num_inference_steps=20
43
  )
44
 
45
+ return output[0]
46
 
47
  # you need to pass inputs and outputs according to inference function
48
  title = "Categorical Conditioning Controlnet for One-Shot Image Stylization."