mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(api,ui): fix canvas saved images have extra transparent regions
- add `crop_visible` param to upload image & set to true only for canvas saves
This commit is contained in:
committed by
Kent Keirsey
parent
6f2e8d5217
commit
594bf6fef1
@@ -421,6 +421,7 @@ export const imagesApi = api.injectEndpoints({
|
||||
postUploadAction?: PostUploadAction;
|
||||
session_id?: string;
|
||||
board_id?: string;
|
||||
crop_visible?: boolean;
|
||||
}
|
||||
>({
|
||||
query: ({
|
||||
@@ -429,6 +430,7 @@ export const imagesApi = api.injectEndpoints({
|
||||
is_intermediate,
|
||||
session_id,
|
||||
board_id,
|
||||
crop_visible,
|
||||
}) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
@@ -441,6 +443,7 @@ export const imagesApi = api.injectEndpoints({
|
||||
is_intermediate,
|
||||
session_id,
|
||||
board_id,
|
||||
crop_visible,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
@@ -5355,18 +5355,18 @@ export type components = {
|
||||
*/
|
||||
image?: components["schemas"]["ImageField"];
|
||||
};
|
||||
/**
|
||||
* StableDiffusionXLModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
StableDiffusionXLModelFormat: "checkpoint" | "diffusers";
|
||||
/**
|
||||
* StableDiffusion2ModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
StableDiffusion2ModelFormat: "checkpoint" | "diffusers";
|
||||
/**
|
||||
* StableDiffusionXLModelFormat
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
StableDiffusionXLModelFormat: "checkpoint" | "diffusers";
|
||||
/**
|
||||
* StableDiffusion1ModelFormat
|
||||
* @description An enumeration.
|
||||
@@ -6050,6 +6050,8 @@ export type operations = {
|
||||
board_id?: string;
|
||||
/** @description The session ID associated with this upload, if any */
|
||||
session_id?: string;
|
||||
/** @description Whether to crop the image */
|
||||
crop_visible?: boolean;
|
||||
};
|
||||
};
|
||||
requestBody: {
|
||||
|
||||
Reference in New Issue
Block a user