Spaces:
Runtime error
Runtime error
fix attempt 2
Browse files
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
|
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."
|