Dezgo

PAID
By dezgo | Updated 16 days ago | Artificial Intelligence/Machine Learning
Popularity

9.6 / 10

Latency

7,239ms

Service Level

99%

Health Check

N/A

Back to All Discussions

inpainting with prompt not working

Rapid account: Yazilimsalcozumler

I sent prompt paramater to your service, but inpainting not filled with prompt. Returned image with filling like no prompt.
Please check it.

Rapid account: Dezgo
dezgo Commented a year ago

Sorry for the late response. After extensive testing it seems that this particular case is a tricky one for the inpainting AI.
It seems to have some trouble with small objects relative to a bigger landscape.

Here are a few tips to improve your results:

  • prompt: photo of (a football ball)+++ on grass, casting a shadow: I used the prompt weighting syntax to increase the importance of the ball, relative to the grass. Mentioning additional details (like the shadow) can also guide the AI towards the intended direction.
  • mask image: I notice your mask had transparency on the outside, I transformed it to pure black&white, and also increased the white area a little bit (the inpainter likes to have some wiggle room). Like so: https://static.dezgo.com/samples/inpainting/football/mask_bigger.png
  • model: stablediffusion_inpaint_2 is generally smarter (will make it the default in next update)
  • sampler: euler (while the โ€œeuler_aโ€ version works great for txt2img, it seems that this technique is less suited to inpainting, will make it the default in next update)
  • guidance: 15 increasing this is the equivalent of yelling at the AI to follow instructions more closely if itโ€™s too stubborn

From my testing with these parameters the success rate seems higher:

The ball may be bigger due to the increased mask area, but you can try to play with words like โ€œsmallโ€/โ€œfarโ€ to correct that.

We will change the default settings for sampler and model in the next update to provide a better experience out of the box.

Rapid account: Yazilimsalcozumler
yazilimsalcozumler Commented a year ago

Any news?

Rapid account: Yazilimsalcozumler
yazilimsalcozumler Commented a year ago

Source Image:

Mask Image:

Prompt and negative prompt is below:

FormData {
_overheadLength: 938,
_valueLength: 445726,
_valuesToMeasure: [],
writable: false,
readable: true,
dataSize: 0,
maxDataSize: 2097152,
pauseStreams: true,
_released: false,
_streams: [
โ€™----------------------------768589524261175199623268\r\nโ€™ +
โ€˜Content-Disposition: form-data; name=โ€œinit_imageโ€\r\nโ€™ +
โ€˜Content-Type: application/octet-stream\r\nโ€™ +
โ€™\r\nโ€™,
<Buffer 69 56 42 4f 52 77 30 4b 47 67 6f 41 41 41 41 4e 53 55 68 45 55 67 41 41 41 67 41 41 41 41 49 41 43 41 49 41 41 41 42 37 47 6b 4f 74 41 41 45 41 41 45 โ€ฆ 436014 more bytes>,
[Function: bound ],
โ€™----------------------------768589524261175199623268\r\nโ€™ +
โ€˜Content-Disposition: form-data; name=โ€œmask_imageโ€\r\nโ€™ +
โ€˜Content-Type: application/octet-stream\r\nโ€™ +
โ€™\r\nโ€™,
<Buffer 69 56 42 4f 52 77 30 4b 47 67 6f 41 41 41 41 4e 53 55 68 45 55 67 41 41 41 67 41 41 41 41 49 41 43 41 59 41 41 41 44 30 65 4e 54 36 41 41 41 41 41 58 โ€ฆ 9290 more bytes>,
[Function: bound ],
โ€™----------------------------768589524261175199623268\r\nโ€™ +
โ€˜Content-Disposition: form-data; name=โ€œpromptโ€\r\nโ€™ +
โ€™\r\nโ€™,
โ€˜landscape and football ballโ€™,
[Function: bound ],
โ€™----------------------------768589524261175199623268\r\nโ€™ +
โ€˜Content-Disposition: form-data; name=โ€œupscaleโ€\r\nโ€™ +
โ€™\r\nโ€™,
โ€˜1โ€™,
[Function: bound ],
โ€™----------------------------768589524261175199623268\r\nโ€™ +
โ€˜Content-Disposition: form-data; name=โ€œstepsโ€\r\nโ€™ +
โ€™\r\nโ€™,
โ€˜30โ€™,
[Function: bound ],
โ€™----------------------------768589524261175199623268\r\nโ€™ +
โ€˜Content-Disposition: form-data; name=โ€œmodelโ€\r\nโ€™ +
โ€™\r\nโ€™,
โ€˜stablediffusion_inpaint_1โ€™,
[Function: bound ],
โ€™----------------------------768589524261175199623268\r\nโ€™ +
โ€˜Content-Disposition: form-data; name=โ€œguidanceโ€\r\nโ€™ +
โ€™\r\nโ€™,
โ€˜7โ€™,
[Function: bound ],
โ€™----------------------------768589524261175199623268\r\nโ€™ +
โ€˜Content-Disposition: form-data; name=โ€œnegative_promptโ€\r\nโ€™ +
โ€™\r\nโ€™,
โ€˜ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft,out of frame, duplicate, watermark, signature, textโ€™,
[Function: bound ]
],
_currentStream: null,
_insideLoop: false,
_pendingNext: false,
_boundary: โ€˜--------------------------768589524261175199623268โ€™
}
โ€ฆ

Rapid account: Dezgo
dezgo Commented a year ago

Hello!

Thank you for reaching out, Iโ€™m happy to assist you. In order to effectively investigate the issue, could you kindly provide the full set of parameters you used, including the prompt, init_image, and mask_image? Additionally, please share the output you received. This information will greatly aid in addressing your concern.

Join in the discussion - add comment below:

Login / Signup to post new comments