Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example with image to image and mask? #2

Open
jryebread opened this issue Apr 13, 2024 · 3 comments
Open

Example with image to image and mask? #2

jryebread opened this issue Apr 13, 2024 · 3 comments

Comments

@jryebread
Copy link

Hi there, is there some documentation on how one can use a mask image to do outpainting for the AWS marketplace container for SDXL Jumpstart?

I'm trying to do outpainting, is outpainting endpoint supported on the jumpstart version of SDXL? Or is jumpstart only V1 API? Tried the below payload but the model is returning results where the image that's non transparent and shouldn't be changes is being changed:

"payload": {
"text_prompts": [
{
"text": "",
"weight": 0.01
}
],
"cfg_scale": 8,
"height": 1024,
"width": 1024,
"steps": 40,
"seed": 42,
"sampler": "K_DPMPP_2M",
"init_image": source_image_base64,
"samples": 1,
"mask_image": mask_image_base64,
"init_image_mode": "STEP_SCHEDULE",
"mask_source": "INIT_IMAGE_ALPHA",
}

@jryebread
Copy link
Author

image
mentions outpainting wish there was an example for it :(

@jryebread
Copy link
Author

@palp

@palp
Copy link
Member

palp commented Apr 16, 2024

@jryebread Are you using a mask image or trying to generate one from the init image's alpha channel? The request you provided is doing the latter, and discarding the mask_image you are providing, because you've set mask_source to INIT_IMAGE_ALPHA. The documentation here should reflect the Jumpstart container API for masking. It sounds like you might be trying to provide an alpha-channel coded mask image instead, which isn't the way to use it - the mask image should be black and white if provided, and mask_source should be set to indicate which color is the mask; or you can not provide a mask and use the alpha channel of the init image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants