Prompt EngineeringNegative PromptAI Image Generationสอน AI

Negative Prompt สำหรับภาพ: บอกว่าไม่ต้องการอะไร

เรียนรู้วิธีใช้ Negative Prompt ใน AI Image Generation เพื่อหลีกเลี่ยงปัญหาที่ไม่ต้องการ พร้อมรวม Negative Prompt ยอดนิยมสำหรับทุกสถานการณ์ เหมาะสำหรับผู้เรียน สอน AI

AI Unlocked Team
25/02/2568
Negative Prompt สำหรับภาพ: บอกว่าไม่ต้องการอะไร

Negative Prompt สำหรับภาพ: บอกว่าไม่ต้องการอะไร

สวัสดีค่ะที่รัก! วันนี้มาเรียนรู้เรื่อง Negative Prompt กันค่ะ ซึ่งเป็นเครื่องมือสำคัญที่ช่วยให้ AI หลีกเลี่ยงการสร้างสิ่งที่เราไม่ต้องการนะคะ

Negative Prompt คืออะไร?

Negative Prompt คือการบอก AI ว่า "ไม่ต้องการ" อะไรในภาพ ต่างจาก Prompt ปกติที่บอกว่า "ต้องการ" อะไร

ตัวอย่างง่ายๆ

Prompt: A beautiful woman Negative Prompt: ugly, deformed, blurry

AI จะพยายามสร้างภาพที่สวยงาม และหลีกเลี่ยงการสร้างภาพที่ ugly, deformed หรือ blurry

เครื่องมือไหนรองรับ Negative Prompt?

เครื่องมือรองรับวิธีใส่
Stable Diffusionรองรับเต็มที่มีช่อง Negative Prompt แยก
Midjourneyรองรับบางส่วนใช้ --no parameter
DALL-E 3ไม่รองรับโดยตรงใส่ใน prompt ว่า "avoid..."
Leonardo.AIรองรับมีช่อง Negative Prompt

หมวดหมู่ของ Negative Prompt

1. Quality Issues (ปัญหาคุณภาพ)

low quality, low resolution, blurry, pixelated, jpeg artifacts, compression artifacts, noisy, grainy, out of focus, poorly rendered, bad quality

ใช้เมื่อ: ต้องการภาพคุณภาพสูง คมชัด

2. Anatomy Issues (ปัญหา anatomy)

bad anatomy, wrong anatomy, extra limbs, missing limbs, extra fingers, missing fingers, fused fingers, too many fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, malformed limbs

ใช้เมื่อ: สร้างภาพคน หรือสัตว์

3. Face Issues (ปัญหาใบหน้า)

ugly face, distorted face, disfigured, asymmetric eyes, cross-eyed, bad eyes, weird eyes, unnatural expression, mannequin face, plastic face

ใช้เมื่อ: สร้างภาพ portrait หรือคน

4. Body Issues (ปัญหาร่างกาย)

bad proportions, long neck, long body, extra body, missing body parts, unnatural body, twisted body, conjoined, duplicate

ใช้เมื่อ: สร้างภาพเต็มตัว

5. Style Unwanted (สไตล์ที่ไม่ต้องการ)

cartoon (ถ้าต้องการ realistic), realistic (ถ้าต้องการ cartoon), anime (ถ้าไม่ต้องการ), 3D render (ถ้าต้องการ 2D), sketch (ถ้าต้องการ finished)

ใช้เมื่อ: ต้องการ style เฉพาะ

6. Lighting Issues (ปัญหาแสง)

bad lighting, overexposed, underexposed, harsh shadows, flat lighting, unnatural lighting

ใช้เมื่อ: ต้องการแสงสวยงาม

7. Composition Issues (ปัญหาองค์ประกอบ)

cropped, cut off, out of frame, poorly composed, cluttered, messy background, distracting elements

ใช้เมื่อ: ต้องการ composition ดี

8. Unwanted Elements (สิ่งที่ไม่ต้องการ)

watermark, signature, text, logo, username, border, frame

ใช้เมื่อ: ต้องการภาพสะอาด

Negative Prompt Sets ยอดนิยม

Universal Quality Set

ใช้ได้กับทุกภาพ

low quality, worst quality, blurry, bad anatomy, ugly, disfigured, poorly drawn, bad proportions, watermark, signature

Portrait Set

สำหรับภาพคน

ugly face, disfigured, deformed, bad anatomy, wrong anatomy, extra limbs, missing limbs, extra fingers, missing fingers, fused fingers, mutated hands, poorly drawn hands, poorly drawn face, cross-eyed, blurry, low quality, watermark

Realistic Photo Set

สำหรับภาพสมจริง

cartoon, anime, illustration, drawing, painting, 3D render, CGI, artificial, fake looking, oversaturated, low quality, blurry, watermark

Anime/Illustration Set

สำหรับภาพ anime

realistic, photo, 3D, ugly, deformed, bad anatomy, extra limbs, bad hands, bad fingers, low quality, worst quality

Landscape Set

สำหรับภาพ landscape

people, humans, figures, text, watermark, logo, low quality, blurry, oversaturated, artificial, fake

Product Photography Set

สำหรับภาพสินค้า

blurry, low quality, cluttered background, messy, dirty, damaged product, poor lighting, shadows on product, watermark, text

วิธีเขียน Negative Prompt ที่ดี

1. เริ่มจาก Universal Basics

เริ่มด้วยปัญหาพื้นฐานที่ไม่ต้องการในทุกภาพ:

low quality, blurry, ugly

2. เพิ่มตามประเภทภาพ

ถ้าสร้างภาพคน เพิ่ม:

bad anatomy, extra fingers, distorted face

3. เพิ่มตาม Style ที่ต้องการ

ถ้าต้องการ realistic:

cartoon, anime, illustration, drawing

4. เพิ่มตามปัญหาที่เจอ

ถ้าเจอปัญหาเฉพาะ เช่น มือผิด:

poorly drawn hands, mutated hands, fused fingers

ตัวอย่าง Prompt + Negative Prompt

ตัวอย่าง 1: Portrait Photo

Prompt:

Professional portrait of a young woman, natural lighting, soft smile, clean background, photorealistic, 8k

Negative Prompt:

ugly, disfigured, deformed, bad anatomy, extra limbs, missing limbs, extra fingers, fused fingers, poorly drawn face, cross-eyed, blurry, low quality, watermark, oversaturated, artificial looking

ตัวอย่าง 2: Fantasy Art

Prompt:

Epic dragon on mountain peak, dramatic lighting, fantasy art, highly detailed, cinematic

Negative Prompt:

low quality, blurry, bad anatomy, poorly drawn, ugly, deformed, modern elements, buildings, people, watermark, text

ตัวอย่าง 3: Product Photo

Prompt:

Modern smartphone on clean white background, professional product photography, studio lighting

Negative Prompt:

blurry, low quality, dirty, scratched, damaged, cluttered background, shadows, reflections, watermark, text, hands

ตัวอย่าง 4: Anime Character

Prompt:

Beautiful anime girl, long flowing hair, detailed eyes, colorful, high quality anime art

Negative Prompt:

realistic, photo, 3D, ugly, deformed, bad anatomy, extra limbs, bad hands, missing fingers, low quality, worst quality, blurry

Tips การใช้ Negative Prompt

1. ไม่ต้องยาวเกินไป

Negative prompt ยาวเกินไปอาจทำให้ AI สับสน เริ่มจากสั้นๆ แล้วเพิ่มทีละนิด

2. Specific ดีกว่า General

แทนที่จะใส่ "bad" ให้ระบุชัดว่า "bad anatomy", "bad lighting" อะไรที่ bad

3. ปรับตามผลลัพธ์

ถ้าเห็นปัญหาซ้ำๆ ให้เพิ่ม negative prompt สำหรับปัญหานั้นโดยเฉพาะ

4. อย่าขัดแย้งกับ Prompt หลัก

ถ้า prompt บอกว่า "cartoon style" อย่าใส่ "cartoon" ใน negative

5. ลำดับมีความหมาย

ใน Stable Diffusion คำแรกๆ มีน้ำหนักมากกว่า ใส่สิ่งสำคัญไว้ข้างหน้า

Negative Prompt สำหรับ Midjourney

Midjourney ใช้ --no parameter:

/imagine a beautiful sunset over the ocean --no people, boats, text

ข้อจำกัดของ Midjourney

  • ไม่ได้ทำงานเหมือน Stable Diffusion
  • บางครั้งไม่ได้ผล 100%
  • ใช้สำหรับหลีกเลี่ยงองค์ประกอบหลักๆ

Common Mistakes

1. ใส่มากเกินไป

❌ ใส่ทุกอย่างที่คิดได้
✅ เริ่มน้อยๆ แล้วเพิ่มตามปัญหาที่เจอ

2. ใส่สิ่งที่ไม่เกี่ยว

❌ ใส่ "car" ใน negative ของภาพ portrait indoor
✅ ใส่เฉพาะสิ่งที่อาจเกิดขึ้นจริงในภาพ

3. ขัดแย้งกัน

❌ Prompt: cartoon style, Negative: cartoon
✅ ให้ prompt และ negative สอดคล้องกัน

Negative Prompt Cheat Sheet

Quick Copy Sets

All-Purpose:

low quality, worst quality, blurry, ugly, deformed, watermark

For People:

bad anatomy, extra fingers, missing fingers, poorly drawn hands, deformed face, ugly

For Realistic:

cartoon, anime, illustration, artificial, fake, CGI

For Clean Image:

watermark, signature, text, logo, border, frame, cropped

อยากเรียนรู้ Prompt Engineering ขั้นสูง?

Negative Prompt เป็นแค่ส่วนหนึ่งของเทคนิคการเขียน Prompt เรามี คอร์ส AI ที่สอนครบทั้ง Prompt และ Negative Prompt ทั้งออนไลน์และ สอน AI เชียงใหม่ แบบ on-site ดูรายละเอียดที่ หน้าคอร์สเรียน นะคะที่รัก!

เขียนโดย

AI Unlocked Team

บทความอื่นๆ ที่น่าสนใจ