Skip to content

Commit c78fbc4

Browse files
committed
fix: validate request after style apply
1 parent 2fd0106 commit c78fbc4

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-or-later
66

77
# Changelog
88

9+
# 4.44.3
10+
11+
* Fix image validation warnings being sent to the wrong requests
12+
* Validate request with styles, only after style is applied
13+
914
# 4.44.2
1015

1116
* Allow trusted users to also create styles

horde/apis/v2/kobold.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ def post(self):
9595
return (ret_dict, 202)
9696

9797
def initiate_waiting_prompt(self):
98-
self.prompt = self.args.prompt
99-
self.apply_style()
10098
self.wp = TextWaitingPrompt(
10199
worker_ids=self.workers,
102100
models=self.models,
@@ -169,6 +167,8 @@ def get_size_too_big_message(self):
169167
)
170168

171169
def validate(self):
170+
self.prompt = self.args.prompt
171+
self.apply_style()
172172
super().validate()
173173
param_validator = ParamValidator(self.args.prompt, self.args.models, self.params, self.user)
174174
self.warnings = param_validator.validate_text_params()

horde/apis/v2/stable.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ def get_size_too_big_message(self):
115115
)
116116

117117
def validate(self):
118+
self.prompt = self.args.prompt
119+
self.apply_style()
118120
super().validate()
119121
param_validator = ParamValidator(prompt=self.args.prompt, models=self.args.models, params=self.params, user=self.user)
120122
self.warnings = param_validator.validate_image_params()
@@ -223,8 +225,6 @@ def initiate_waiting_prompt(self):
223225
shared = True
224226
else:
225227
shared = False
226-
self.prompt = self.args.prompt
227-
self.apply_style()
228228
self.wp = ImageWaitingPrompt(
229229
worker_ids=self.workers,
230230
models=self.models,

horde/consts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: AGPL-3.0-or-later
44

5-
HORDE_VERSION = "4.44.2"
5+
HORDE_VERSION = "4.44.3"
66
HORDE_API_VERSION = "2.5"
77

88
WHITELISTED_SERVICE_IPS = {

horde/validation.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def __init__(self, prompt, models, params, user):
2424
self.models = models
2525
self.params = params
2626
self.user = user
27+
self.warnings = set()
2728

2829
def validate_base_params(self):
2930
pass

0 commit comments

Comments
 (0)