Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -30,7 +30,7 @@ WEIGHT_PAIRS = [
|
|
30 |
def float_to_pair_index(f: float):
|
31 |
length = len(WEIGHT_PAIRS)
|
32 |
# If f is less than length, convert to integer and use directly
|
33 |
-
if
|
34 |
return int(f)
|
35 |
# If f is greater or equal to length, assume it's a proportion of the length
|
36 |
else:
|
@@ -137,6 +137,8 @@ def generate_image(pipe, inputs):
|
|
137 |
styles = inputs["styles"]
|
138 |
if isinstance(styles, str):
|
139 |
styles = [styles]
|
|
|
|
|
140 |
content = inputs["content"]
|
141 |
art_scale = inputs["art_scale"]
|
142 |
|
|
|
30 |
def float_to_pair_index(f: float):
|
31 |
length = len(WEIGHT_PAIRS)
|
32 |
# If f is less than length, convert to integer and use directly
|
33 |
+
if False:
|
34 |
return int(f)
|
35 |
# If f is greater or equal to length, assume it's a proportion of the length
|
36 |
else:
|
|
|
137 |
styles = inputs["styles"]
|
138 |
if isinstance(styles, str):
|
139 |
styles = [styles]
|
140 |
+
if len(styles) == 1:
|
141 |
+
styles = styles * 5
|
142 |
content = inputs["content"]
|
143 |
art_scale = inputs["art_scale"]
|
144 |
|