diff --git a/invokeai/frontend/web/src/services/api/endpoints/images.ts b/invokeai/frontend/web/src/services/api/endpoints/images.ts index 5d56a61add..c9052a607d 100644 --- a/invokeai/frontend/web/src/services/api/endpoints/images.ts +++ b/invokeai/frontend/web/src/services/api/endpoints/images.ts @@ -576,7 +576,9 @@ export const imagesApi = api.injectEndpoints({ query: ({ file, image_category, is_intermediate, session_id, board_id, crop_visible, metadata }) => { const formData = new FormData(); formData.append('file', file); - formData.append('metadata', JSON.stringify(metadata)); + if (metadata) { + formData.append('metadata', JSON.stringify(metadata)); + } return { url: buildImagesUrl('upload'), method: 'POST',