Stability-AI / rest-api-support

Stability REST API examples, issues, and discussions | https://api.stability.ai
107 stars 21 forks source link

non-useful 'unknown form field: ' on v1beta/generation//image-to-image and masking #14

Open georgzoeller opened 1 year ago

georgzoeller commented 1 year ago

a form with these values (everything else default)

text_prompts[0][text] "test" text_prompts[0][weight] 1
image_strength 0.35
init_image_mode "IMAGE_STRENGTH"

sent to the v1beta image to image endpoint (any engine as far as I can tell

returns

id: '250459a816a1624b1dbc944f97a05368', message: 'unknown form field: ', name: 'bad_request'

Populating the default values does not change that behavior.

Same for masking

georgzoeller commented 1 year ago

Ok, I figured out that this was caused by supplying the wrong parameters with node form-data's additional config parameter on file appends.

While all form fields were present, specifying the filename in the config parameter caused the form to become invalid. Not sure if the messaging can be improved around this