Spaces:
Runtime error
Runtime error
attempt fix
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import torchvision.transforms as T
|
|
6 |
import torchvision.transforms.v2 as T2
|
7 |
import cv2
|
8 |
from PIL import Image
|
|
|
9 |
|
10 |
output_res = (768,768)
|
11 |
|
@@ -31,7 +32,6 @@ generator = torch.manual_seed(0)
|
|
31 |
def infer(prompt, negative_prompt, image):
|
32 |
# implement your inference function here
|
33 |
|
34 |
-
|
35 |
cond_input = conditioning_image_transforms(image)
|
36 |
|
37 |
output = pipe(
|
@@ -42,7 +42,7 @@ def infer(prompt, negative_prompt, image):
|
|
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."
|
|
|
6 |
import torchvision.transforms.v2 as T2
|
7 |
import cv2
|
8 |
from PIL import Image
|
9 |
+
import numpy as np
|
10 |
|
11 |
output_res = (768,768)
|
12 |
|
|
|
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(
|
|
|
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."
|