Grant-CP / Comfyui_Demos

Assets and workflows for various AI Image tasks using Comfyui
5 stars 0 forks source link

Great results with FLUX regional control! #1

Open antonioo-c opened 1 month ago

antonioo-c commented 1 month ago

Hello, thanks for sharing the wonderful results with FLUX. I was trying to implement myself but the background always had some blur or artifacts. I wonder if its possible to share how you deal with it. Thank you!

Grant-CP commented 1 month ago

@antonioo-c In the future, it's helpful to show what kind of artifacts you are experiencing by attaching an image (maybe a small cropped piece of the image with the artifacts visible). Sometimes when I was using the workflow I got the kind of weird tile/line artifacts that FLUX makes sometimes, so I'll assume that's what you are talking about. There's a few options for trying to improve things:

  1. Make sure FLUX can understand your prompt even without regional control. I've heard that some of the artifacts come from when you prompt FLUX for something "out of distribution", or a prompt it doesn't understand.
  2. Make sure you have enough steps. Some images genuinely take 50 steps, especially when FLUX is confused, although in these cases I would recommend changing your prompt as recommended in the previous step.
  3. Create a regional prompt that will be shared with the whole area (so a third or fourth region but with a mask for the whole image instead of part of it). This will help FLUX understand how the overall composition should look and will also weaken the regional effect slightly.
  4. Consider using a LORA to combat some of FLUX's built-in blurriness. I know a lot of people work on this on Civitai, but I don't know the current best LORAs for this. As always, test these things without regional conditioning first.
  5. If you like your image, but it's just a matter of a few issues, run it through a second pass with low denoising and a single global prompt, as you would in a regular img2img workflow. You can even do a second pass with an SDXL model or SD1.5 model if you want to fix skin texture or get a style from a SD1.5 model.

Let me know if any of this works for you so others can know the best path forward!