ClarifyPix
العودة إلى المدونة

كيفية إصلاح الوجوه الباهتة أو المشوهة أو المشوهة في الأعمال الفنية التي ينشئها الذكاء الاصطناعي

تنشئ مولدات الصور التي تعمل بتقنية الذكاء الاصطناعي تركيبات جميلة ولكنها غالبًا ما تدمر الوجوه في المشاهد الجماعية. إليك كيفية إصلاحها دون فقدان التركيبة التي قضيت ساعات في الحصول عليها بشكل صحيح.

ClarifyPix Team2026-03-22

قبل ثلاثة أسابيع، قمت بإنشاء ما اعتقدت أنه أفضل صورة لدي من أي وقت مضى. مشهد حانة خيالي. ضوء نار دافئ، خشبي مفصل الحزم، مجموعة من المسافرين على طاولة الزاوية. كان التكوين مثالي. وكانت الإضاءة بالضبط ما أردت. كنت على استعداد للنشر في كل مكان.

ثم قمت بالتكبير.

كانت عين أحد المسافرين تطفو على ارتفاع نصف بوصة تقريبًا حيث ينبغي أن يكون. وكان لدى آخر فم يبدو كما لو كان كذلك ذوبان جانبية. والثالث، الذي في الخلف، ليس له أنف الكل. مجرد قطعة ناعمة من الجلد حيث يجب أن يكون الأنف.

حاولت إعادة المتداول. حصلت على نفس التركيبة ربما واحدة من كل منها خمسة عشر جيلاً، وفي كل مرة، كانت الوجوه تتكسر طرق مختلفة. في بعض الأحيان كانت العيون جيدة ولكن الفم كان خاطئًا. في بعض الأحيان كانت النسب جيدة ولكن كل شيء كان ضبابيًا. قضيت أمسيتين أحاول الحصول على جيل نظيف قبل أن أدرك أنني كذلك حل المشكلة الخاطئة.

لماذا المشاهد الجماعية تكسر الوجوه دائمًا؟

تقوم معظم مولدات الصور ذات الذكاء الاصطناعي بإنشاء صور بدقة أساسية تبلغ حوالي 1024 × 1024 بكسل. هذا يبدو كثيرًا حتى تفكر في ماذا يحدث في مشهد جماعي إذا كانت صورتك تحتوي على أربعة أشخاص، كل منهم قد يحصل الوجه على تصحيح مقاس 40 × 40 بكسل فقط للعمل معه. أبعد أ الوجه من الكاميرا، كلما قل عدد البكسلات التي تحصل عليها.

بحجم 40 × 40 بكسل، لا يحتوي نموذج الذكاء الاصطناعي على ما يكفي من القماش ارسم عينين متماثلتين وأنفًا متناسبًا بشكل صحيح ومتساويًا الفم على شكل. ليس الأمر أن النموذج سيئ في الوجوه. هذا أنت يطلبون منه رسم صورة على طابع بريدي. ميزانية البكسل صغير جدًا.

هذه ليست مشكلة منتصف الرحلة أو مشكلة الانتشار المستقر. إنه كذلك مشكلة حل تؤثر على كل منشئ صور الذكاء الاصطناعي الحالي. حتى تصبح الدقة الأساسية أكبر بكثير، يجب استخدام المشاهد الجماعية و الشخصيات البعيدة ستواجه دائمًا مشكلات في الوجه.

إعادة التدحرج هي فخ

I burned through probably 40 GPU hours trying to generate that tavern scene with clean faces. Every time I got good faces, the composition changed. Every time I kept the composition, the faces broke. The math is against you here. The number of variables that have to align for perfect faces and a perfect composition in the same generation is astronomical.

النهج الأكثر ذكاءً هو الفصل بين المشكلتين. احصل على التركيبة التي تريدها أولاً. لا تقلق بشأن الوجوه على الإطلاق. مرة واحدة لديك تركيبة تعمل، قم بإصلاح الوجوه بشكل منفصل. هذا هو أسرع وأرخص وأقل إحباطًا بشكل كبير.

كيف تعمل عملية ترميم الوجه المخصصة

General upscalers sharpen everything equally. They do not know the difference between a face and a wooden beam. Face restoration models like GFPGAN were trained specifically on human faces. Millions of them. They understand facial anatomy. Where eyes should sit relative to each other. How a nose aligns with a mouth. What natural skin texture looks like versus artificial smoothing.

عند تشغيل عملية استعادة الوجه، قم بتمرير النموذج أولاً على صورتك يكتشف جميع مناطق الوجه، ثم يعزز تلك المناطق فقط. ال الخلفية، الإضاءة، الألوان، الملابس. لا شيء منه التغييرات. لا يتم لمس الوجوه إلا. والنموذج محافظ حسب التصميم. إنه يعزز ما هو موجود بدلاً من الاختراع بالكامل ملامح الوجه الجديدة.

Cost is 4 credits per image on ClarifyPix. Processing takes three to six seconds regardless of how many faces are in the scene. That tavern image with four travelers cost me 4 credits and six seconds. The same image had cost me two evenings of re-rolling before I figured this out.

When face restoration does not help

There are limits. If a face is smaller than about 24x24 pixels, there is not enough structural information for even a specialized model to work with. The model needs at least a basic face shape to enhance. An eye, a nose outline, a mouth position. If all it can see is a flesh-colored blob, the result will still look like a blob. Maybe a slightly more detailed blob, but a blob.

For those cases, I found a workaround. Generate the same prompt a few more times. Pick the generation where that specific face happened to come out best. Crop it out and composite it into your main image. The lighting and colors usually match well enough, and a quick levels adjustment seals the deal. Then run a single face restoration pass on the composite to clean up any minor inconsistencies.

Is this more work than just re-rolling? Yes, in the short term. But you do it once and you are done. No more praying to the RNG gods for a generation where everything aligns. You take control of the output instead of hoping the AI gets lucky.

This also fixes real photos

I should mention this because a lot of people do not realize it. The same face restoration model that fixes AI generated faces also works on real photographs. Old family photos where faces are soft or blurry. Smartphone group shots where some people were out of focus. Low resolution digital camera images from 2005. The model does not care where the image came from. It just sees a face and tries to make it clearer.

I tested this on a blurry photo of my grandparents from the 1980s. The original was a wallet-sized print scanned at low resolution. My grandfather's face was maybe 30 pixels across. The face restoration pass recovered his eyes, his nose shape, even the slight asymmetry in his smile. My mom cried when she saw it. That alone was worth more than the 4 credits it cost.

If you are tired of throwing away great compositions because the faces are broken, try running a face restoration pass on your next generation. You might already have the image you want. It just needs the faces fixed.