Update app.py
Browse files
app.py
CHANGED
@@ -39,6 +39,9 @@ model = Model()
|
|
39 |
|
40 |
|
41 |
def controlnet(i, prompt, seed_in):
|
|
|
|
|
|
|
42 |
a_prompt = "best quality, extremely detailed"
|
43 |
n_prompt = "longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality"
|
44 |
num_samples = 1
|
@@ -48,7 +51,7 @@ def controlnet(i, prompt, seed_in):
|
|
48 |
scale = 9.0
|
49 |
eta = 0.0
|
50 |
|
51 |
-
result = model.process_pose(
|
52 |
image_resolution, detect_resolution, ddim_steps, scale, seed_in, eta)
|
53 |
print(result)
|
54 |
return 'done'
|
|
|
39 |
|
40 |
|
41 |
def controlnet(i, prompt, seed_in):
|
42 |
+
img= Image.open(i)
|
43 |
+
np_img = np.array(img)
|
44 |
+
|
45 |
a_prompt = "best quality, extremely detailed"
|
46 |
n_prompt = "longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality"
|
47 |
num_samples = 1
|
|
|
51 |
scale = 9.0
|
52 |
eta = 0.0
|
53 |
|
54 |
+
result = model.process_pose(np_img, prompt, a_prompt, n_prompt, num_samples,
|
55 |
image_resolution, detect_resolution, ddim_steps, scale, seed_in, eta)
|
56 |
print(result)
|
57 |
return 'done'
|