最近有些朋友在telegram私信我,咨询我一些关于Flux生图过程中图片模糊的问题,用我的经验为大家解释一下这个原因,不保证100%的正确,但确实有效降低了问题发生的概率。
This is a translation by Gemini. I don't understand English.
Recently, some of my friends have been messaging me on Telegram asking about the blurry images generated by Flux. Based on my experience, I'll try to explain the possible reasons for this issue. While I can't guarantee a 100% accurate explanation, the solutions I've found have been effective in reducing the occurrence of this problem.
原因1:Flux Dev fp16底模的问题,在使用纯色背景,纯白背景,或者任何纯色描述词的时候,有概率会导致这样的问题发生,我猜测是在Flux训练的时候,使用了一些低分辨率纯色背景图像或者抠图完成使用纯色背景的图像。
Reason 1: The Flux Dev fp16 base model exhibits certain limitations when generating images with pure color backgrounds. The use of pure white backgrounds or any descriptive term indicating a pure color can potentially result in blurry or distorted outputs. This issue may be attributed to the training data, which possibly included low-resolution images with solid color backgrounds or images where solid color backgrounds were achieved through cutout techniques.
这个问题没有更好的解决办法,我自己的解决办法是使用FP8或者schell模型,只能降低这样的问题发生概率。
Unfortunately, there isn't a more effective solution available at this time. To mitigate this issue, I've found that using Flux Dev FP8 or Schell models can help reduce the occurrence of these problems, though it's not a guaranteed fix.
原因2:纯色背景的描述词以及Flux引导步数错误导致的。尽可能避免使用任何纯色词汇,可以尝试无纹理的白墙,白色的背景布等词汇降低问题图像发生的概率。文生图的时候引导步数在3-10之间,如果你是4090或者以上的显卡,需要生成引导步数10以上的图像,可以把引导步数设置在30以上,也能解决一部分这种图像模糊的问题,但是需要的时间更多。
A second potential cause of this issue is the use of explicit pure color terms in prompts and the misconfiguration of guidance steps in Flux. To mitigate this, avoid using terms like "pure white" or "solid red". Instead, try more descriptive terms such as "textureless white wall" or "white backdrop". Additionally, the number of guidance steps can significantly impact image quality. While 3-10 steps are generally sufficient, users with high-end GPUs like the 4090 can experiment with higher values, such as 30 or more, to improve image clarity. However, this may increase generation time.
原因3:训练集裁剪图像尺寸的问题,黑森林工作室没有公布最佳训练图像尺寸,但是说了一个关键问题,Flux的所有训练图像在200万像素之间,他们推荐的画布尺寸是1024*1024,我就在这个尺寸之上进行了所有基于64px递进的图像尺寸训练,我尝试训练了150个不同尺寸的lora,训练过程很痛苦。在其他一些图片尺寸上进行训练,或者没有裁剪,即使使用ARB桶功能,在生成图片时也会有模糊图像的现象发生。
Reason 3: The issue might stem from the training image cropping. Black Forest Studio hasn't disclosed the optimal training image size, but they mentioned that all training images for Flux start from a 1024x1024 canvas and can be up to 2 million pixels. Based on this, I trained Loras on a range of sizes starting from 1024x1024 and incrementing by 64 pixels. I've experimented with 150 different Lora sizes. The training process was quite arduous.Even when training on other image sizes or without cropping, and even with the ARB bucket feature, blurry images can still occur in the generated output.
方形尺寸 Square image:
1024*1024
1152*1152
1216*1216
1280*1280
1344*1344
1408*1408
1472*1472
竖向尺寸 Vertical image:
1024*2408
1024*1984
1024*1920
1024*1856
1024*1792
1024*1728
1024*1664
1024*1600
1024*1536
1024*1472
1024*1408
1024*1344
1024*1280
1024*1216
1024*1152
1024*1088
1088*1984
1088*1920
1088*1856
1088*1792
1088*1728
1088*1664
1088*1600
1088*1536
1088*1472
1088*1408
1088*1344
1088*1280
1088*1216
1088*1552
1152*1856
1152*1792
1152*1728
1152*1664
1152*1600
1152*1536
1152*1472
1152*1408
1152*1344
1152*1280
1152*1216
1216*1792
1216*1728
1216*1664
1216*1600
1216*1536
1216*1472
1216*1408
1216*1344
1216*1280
1280*1664
1280*1600
1280*1536
1280*1472
1280*1408
1280*1344
1344*1536
1344*1472
1344*1408
1408*1536
横向尺寸 Wide image:
2048*1024
1984*1024
1920*1024
1856*1024
1792*1024
1728*1024
1664*1024
1600*1024
1536*1024
1472*1024
1408*1024
1344*1024
1280*1024
1216*1024
1152*1024
1088*1024
1984*1088
1920*1088
1856*1088
1792*1088
1728*1088
1664*1088
1600*1088
1536*1088
1472*1088
1408*1088
1344*1088
1280*1088
1216*1088
1552*1088
1856*1152
1792*1152
1728*1152
1664*1152
1600*1152
1536*1152
1472*1152
1408*1152
1344*1152
1280*1152
1216*1152
1792*1216
1728*1216
1664*1216
1600*1216
1536*1216
1472*1216
1408*1216
1344*1216
1280*1216
1664*1280
1600*1280
1536*1280
1472*1280
1408*1280
1344*1280
1536*1344
1472*1344
1408*1344
1536*1408
不是很严谨,如果有错误,请和我交流。
"It's not a strictly accurate translation. Please feel free to point out any errors."
国内广告招租:w5635798 如果你惹到我,那你算是踢到棉花了。
If you are contacting me from outside mainland China, please don't DM me. I'm in too many groups. Please @ me in the group.
