ControlNet ที่ใช้บ่อย Canny, OpenPose, และ IP-Adapter ใน Stable Diffusion

ControlNet คือเครื่องมือเด็ดใน Stable Diffusion ที่ช่วยให้เราควบคุมการสร้างภาพด้วย AI ได้แบบละเอียดยิบ บทความนี้เรามาทำความรู้จักกับการใช้ ControlNet ที่ใช้งานบ่อยๆ เช่น Canny, OpenPose, และ IP-Adapter ว่าจะช่วยให้การสร้างภาพของเราง่ายขึ่นยังไงบ้าง

วีธีการใช้งาน Controlnet อ่านได้ที่นี่


1. Canny Edge Detection

Canny Edge Detection เป็นหนึ่งใน Preprocessors ที่นิยมใช้ หลักการคือดึงเส้นขอบหรือโครงร่างของภาพ เพื่อให้ AI สามารถสร้างภาพใหม่ได้ตามเส้นขอบที่กำหนด

เหมาะกับ

  • ภาพสเก็ตช์ที่เห็นเส้นขอบชัด เช่นภาพสถาปัตยกรรมต่างๆ
  • ภาพถ่ายที่มีความเปรียบต่างสูง (Contrast)
  • ภาพโลโก้หรือไอคอนต่างๆ

ตัวอย่างการใช้งาน Canny ร่วมกับงานสถาปัตยกรรม

Ptompt : mochi, style, house, in, the, afternoon, serene, environment, with, trees, and, greenery, soft, lighting, cozy, warm, tones, traditional, architecture, slightly, exaggerated, features, pastel, colors, tranquil, ambiance, whimsical, details, inviting, atmosphere, gentle, shadows, peaceful, surroundings

Canny

2. OpenPose

OpenPose เหมาะสำหรับการจัดการท่าทางของคนในภาพ สามารถตรวจจับท่าทางและตำแหน่งของร่างกายได้อย่างละเอียด ไม่ว่าจะเป็นหัว แขน ขา

เหมาะกับ:

  • ภาพที่มีคนเป็นจุดเด่น
  • การสร้างภาพที่ต้องการควบคุมท่าทางของคน
OpenPost

ตัวอย่างการใช้งาน

Prompt : model, posing, with, arm, raised, wearing, elegant, red, evening, gown, dramatic, lighting, confident, expression, light, blue, background, stylish, pose, sophisticated, vibe, flowing, fabric, high, fashion, look, bold, red, dress, vibrant, colors


3. IP-Adapter

IP-Adapter เป็นโมดูลที่ทำงานร่วมกับ ControlNet เพื่อช่วยให้ AI สามารถเรียนรู้สไตล์จากภาพอื่นแล้วนำไปใช้กับภาพที่เรากำลังสร้างได้ หรือในอีกความหมายคือการ Prompt ด้วยภาพ (Imgage Prompt) โดย AI จะอ้างอิงข้อมูลในภาพเป็นหลักและสร้างภาพออกมาใหม่ตามข้อมูลเดิม ถ้าใช้งานได้คล่อง IP-Adapter จะเป็นเครื่องมือที่ทรงพลังอย่างมาก

เหมาะกับ:

  • ภาพที่ต้องการปรับสไตล์ให้ตรงกับภาพต้นแบบ
  • การแก้ไขภาพที่มีรายละเอียดซับซ้อน
  • การสร้างภาพที่ต้องการให้มีความสอดคล้องกันทั้งชุด
IP-Adapter

ตัวอย่างการใช้งาน IP-Adapter วาดภาพสไตล์ แวน โก๊ะ

Prompt : cat, lying, on, grass, under, the, shade, of, a, tree, high, angle, view, Van Gogh, style, swirling, brushstrokes, vibrant, colors, expressive, textures, starry, night, inspired, dappled, sunlight, soft, shadows, peaceful, atmosphere, natural, environment, green, grass, cozy, setting, tranquil, scene, outdoor, nature, impressionist, art, whimsical, mood

อีกตัวอย่าง การใช้ภาพไกด์ให้ AI สร้างอะไรที่คล้ายๆ กันออกมา

Prompt : bamboo, tree, inside, a, glass, bottle, detailed, realistic, tall, slender, bamboo, stalks, growing, in, soil, contained, within, the, bottle, clear, glass, gentle, sunlight, filtering, through, the, bottle, lush, green, leaves, natural, environment, serene, atmosphere, minimalistic, design, nature, preserved, in, a, bottle, calming, scene, delicate, reflections, on, the, glass

สรุป

การใช้ ControlNet ร่วมกับ Canny, OpenPose, และ IP-Adapter เป็นเพียงตัวอย่างหนึ่งที่ใช้บ่อยๆ เท่านั้น ยังมี Controlnet ตัวอื่นๆ อีกมากมายที่ช่วยให้เราทำงานได้ง่ายและสะดวกขึ้นมาก

Related Posts