UniPic icon indicating copy to clipboard operation
UniPic copied to clipboard

Any suggestions for improving text reconstruction quality when using UniPic2?

Open flt-ime opened this issue 1 year ago • 0 comments

Hi, thanks a lot for your great work on UniPic2! When I use UniPic2 for image editing, I found that the non-target texts (those not meant to be changed) are often reconstructed poorly, even though the requested edit works correctly.

For example, I tried the following setup (image_size=512):

prompt = "change 'feeling' to 'lucky'"
negative_prompt = "blurry, low quality, low resolution, distorted, deformed, broken content, missing parts, damaged details, artifacts, glitch, noise, pixelated, grainy, compression artifacts, bad composition, wrong proportion, incomplete editing, unfinished, unedited areas."
num_inference_steps=50,
guidance_scale=3.5,
generator=torch.Generator(device=transformer.device).manual_seed(3407)

The target edit works, but other existing text elements in the image become degraded.

  • Result of Skywork/UniPic2-SD3.5M-Kontext-2B Image

  • Result of Skywork/UniPic2-SD3.5M-Kontext-GRPO-2B Image

Do you have any recommendations for better prompt or negative_prompt design, so that I can preserve the untouched text while only editing the desired words?

Thanks again for your excellent contribution!

flt-ime avatar Sep 16 '25 09:09 flt-ime