<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Phanwasin P. on Medium]]></title>
        <description><![CDATA[Stories by Phanwasin P. on Medium]]></description>
        <link>https://medium.com/@phanwasin?source=rss-4d2795f0ef6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KmOnDVRs8Q0eJaolDBkjdA.png</url>
            <title>Stories by Phanwasin P. on Medium</title>
            <link>https://medium.com/@phanwasin?source=rss-4d2795f0ef6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 11:03:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@phanwasin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[มาลองใช้ Stable Diffusion สร้างภาพสวยๆจาก AI กัน [ไม่ใช่คน IT ก็ทำได้]]]></title>
            <link>https://medium.com/set-it-team/%E0%B8%A1%E0%B8%B2%E0%B8%A5%E0%B8%AD%E0%B8%87%E0%B9%83%E0%B8%8A%E0%B9%89-stable-diffusion-%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%A0%E0%B8%B2%E0%B8%9E%E0%B8%AA%E0%B8%A7%E0%B8%A2%E0%B9%86%E0%B8%88%E0%B8%B2%E0%B8%81-ai-%E0%B8%81%E0%B8%B1%E0%B8%99-%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%83%E0%B8%8A%E0%B9%88%E0%B8%84%E0%B8%99-it-%E0%B8%81%E0%B9%87%E0%B8%97%E0%B8%B3%E0%B9%84%E0%B8%94%E0%B9%89-a00e44f8ecc3?source=rss-4d2795f0ef6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a00e44f8ecc3</guid>
            <category><![CDATA[stable-diffusion]]></category>
            <category><![CDATA[civitai]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Phanwasin P.]]></dc:creator>
            <pubDate>Fri, 01 Sep 2023 12:51:11 GMT</pubDate>
            <atom:updated>2023-09-01T12:58:16.006Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rOnzI8A7IuWhyFXW.png" /><figcaption>Imaged by <a href="https://www.freecodecamp.org/news/author/lynn/"><strong>Lynn Zheng</strong></a></figcaption></figure><p>เริ่มต้น เรามารู้จัก stable diffusion (ต่อจากนี้ขอย่อว่า SD) กันสักนิดก่อน SD AI Model ที่สามารถเปลี่ยนข้อความที่เราป้อน ให้กลายเป็นรูปภาพตามที่เราสั่งได้ ซึ่งมันเป็น open source ที่คนทั่วไปสามารถ download มาเล่น หรือนำมา train เพิ่มความสามารถ model ต่อไปได้</p><p>ด้วยความที่เป็น opensource MD จึงได้รับความนิยมมากๆ และพัฒนาความสามารถไปอย่างรวดเร็ว ถึงขนาดที่ Midjourney website ให้บริการสร้างภาพ AI ยังใช้ MD ไปเป็นส่วนหนึ่งของ model ที่ให้บริการลูกค้า</p><p>หลายคนพอได้ยินชื่อ SD อาจจะรู้สึกว่ามันน่าจะยากในการนำไปใช้ แต่ในความเป็นจริง ปัจจุบัน community ที่พัฒนา MD ได้มีการสร้างเครื่องมือต่างๆที่สามารถนำ MD มาใช้งานได้ง่ายขนาดที่คนที่ไม่มีความรู้ทาง IT เลย ก็ยังสามารถใช้งานได้</p><p>เกริ่นมาเยอะ เรามาเริ่มกันเลยดีกว่า</p><p><strong>คำเตือน :</strong> การใช้ MD สร้างภาพขึ้นมา จำเป็นต้องใช้ Computer ที่มี Graphic Card ที่มีประสิทธิภาพสูงๆ เพื่อสามารถสร้างภาพได้เร็วขึ้น กรณีที่ไม่มี Graphic Card ใน computer ก็ขอให้ รอ รอ และ รอ นะครับ ( 1 ภาพ size 512x512 จะใช้เวลา 15-20 นาทีโดยประมาณ )</p><p>ในการใช้ MD นั้นเราต้องการสิ่งเหล่านี้ จงไปโหลดมาให้ครบก่อนนะครับ</p><h3><strong>1. เครื่องมือ ในที่นี้เราเลือกใช้ ComfyUI</strong></h3><p>เข้าไปที่ <a href="https://github.com/comfyanonymous/ComfyUI">https://github.com/comfyanonymous/ComfyUI</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*Fo71DNdZ657FMC-XP9r_xA.png" /></figure><p>กด <a href="https://github.com/comfyanonymous/ComfyUI#installing">Installing ComfyUI</a> แล้วกดที่ <a href="https://github.com/comfyanonymous/ComfyUI/releases/download/latest/ComfyUI_windows_portable_nvidia_cu118_or_cpu.7z">Direct link to download</a></p><h3><strong>2. file model MD ที่ต้องการ</strong></h3><p>เข้าไปที่ <a href="https://civitai.com/">https://civitai.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Fi02PlrTnGXHoivS2kSRg.png" /></figure><p>เลือก model ที่ต้องการโดยดูเฉพาะ model ที่มี tag ว่า Checkpoint เช่น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FDB331MM4lOlgv8sgoz0-A.png" /></figure><p>เมื่อเลือก model ที่ต้องการได้แล้วให้กด Download มาไว้</p><p>เมื่อ download ComfyUI และ Checkpoint มาแล้วก็มาเริ่มกันเลย</p><ol><li>unzip ไฟล์ ComfyUI แล้วจะได้ files ประมาณนี้</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*BmKqTjHwnBQLKEY4q1JuqQ.png" /></figure><p>2. ให้ copy file Checkpoint ไปวางไว้ใน folder ComfyUI/models/checkpoint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*jgdnn7fbWVFU3pq_3CTXCg.png" /></figure><p>3. กลับไปที่ path ตั้งต้นในข้อ 1. แล้ว run <br> 3.1 กรณีไม่มี graphic card ให้ใช้ run_cpu.bat<br> 3.2 กรณีมี graphic card ให้ใช้ run_nvidia_gpu.bat</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*txkbhX0w9_JiQziRShju8g.png" /></figure><p>4. เมื่อเครื่องมือพร้อมใช้งาน ให้เลือก Load Checkpoint ในกล่องล่างซ้ายเป็นชื่อที่เรา download มา</p><p>5. ใส่คำที่ต้องการให้ AI สร้างภาพ ในกล่อง CLIP Text Encode บน (และใส่คำที่ไม่ต้องการให้อยู่ในภาพ ในกล่องล่าง)</p><p>6. กดที่ปุ่ม Queue Prompt และ รอ รอ รอ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6xFb39497gVD3OqZT3HvGg.png" /></figure><p>7. ภาพที่สร้างเสร็จจะแสดงที่กล่องขวาสุด และถูก save อยู่ใน folder ComfyUI/output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qh0TuW__0CKZy9U7RH72SA.png" /></figure><h3>Hooray!!!</h3><p>สำหรับใครที่ต้องการปรับแต่งภาพขั้นกว่า ก็ลองไปศึกษาวิธีใช้ ComfyUI กันต่อดูนะครับ ยังมี technic ที่ใช้ได้กับเครื่องมือตัวนี้อีกมากมาย ซึ่งถ้ามีคนสนใจจริงๆจะมาให้ข้อมูลเพิ่มในภายหลังครับ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a00e44f8ecc3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/set-it-team/%E0%B8%A1%E0%B8%B2%E0%B8%A5%E0%B8%AD%E0%B8%87%E0%B9%83%E0%B8%8A%E0%B9%89-stable-diffusion-%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%A0%E0%B8%B2%E0%B8%9E%E0%B8%AA%E0%B8%A7%E0%B8%A2%E0%B9%86%E0%B8%88%E0%B8%B2%E0%B8%81-ai-%E0%B8%81%E0%B8%B1%E0%B8%99-%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%83%E0%B8%8A%E0%B9%88%E0%B8%84%E0%B8%99-it-%E0%B8%81%E0%B9%87%E0%B8%97%E0%B8%B3%E0%B9%84%E0%B8%94%E0%B9%89-a00e44f8ecc3">มาลองใช้ Stable Diffusion สร้างภาพสวยๆจาก AI กัน [ไม่ใช่คน IT ก็ทำได้]</a> was originally published in <a href="https://medium.com/set-it-team">SET-IT-TEAM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[สร้าง Webhook Message ส่งข้อความเข้า MS Team แบบ Advance]]></title>
            <link>https://medium.com/set-it-team/%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-webhook-message-%E0%B8%AA%E0%B9%88%E0%B8%87%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B9%80%E0%B8%82%E0%B9%89%E0%B8%B2-ms-team-%E0%B9%81%E0%B8%9A%E0%B8%9A-advance-4a55a8a4f82d?source=rss-4d2795f0ef6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a55a8a4f82d</guid>
            <category><![CDATA[incoming-webhook]]></category>
            <category><![CDATA[webhooks]]></category>
            <category><![CDATA[microsoft-teams]]></category>
            <category><![CDATA[adaptive-card]]></category>
            <dc:creator><![CDATA[Phanwasin P.]]></dc:creator>
            <pubDate>Fri, 01 Sep 2023 11:29:24 GMT</pubDate>
            <atom:updated>2023-09-01T11:54:00.043Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*N2bsuLtvPssV0cFKZ93kEQ.png" /></figure><p>เริ่มต้น เรามาทำความรู้จักกับ ms team webhook กันก่อน สำหรับ microsoft team ที่เราใช้ส่งข้อความติดต่อกันนั้น เราสามารถให้ server ส่งข้อความต่างๆเข้าหาห้อง channel ต่างๆใน ms team แทนตัวบุคคลได้ โดยผ่านเครื่องมือที่ชื่อว่า Incoming Webhook</p><h3>Incoming Webhook</h3><p>เราสามารถสร้างได้โดยการเลือก option ที่ channel ที่ต้อง และเลือก Connectors (ยังใช้ได้บน MS Team Old Version เท่านั้น)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*eUTyTQ_mPuC-ge4ZREm-1Q.png" /></figure><p>เลือก Add หรือ Configure ที่ Incoming Webhook</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*kmJP062q-aiwwXl0o2ZU5g.png" /></figure><p>ใส่ชื่อ และ upload รูป avatar ให้เรียบร้อย และ copy URL ของ webhook เก็บไว้เพื่อใช้ต่อไป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*FBlgu2COn_QZ_bTPruIu7g.png" /></figure><p>หลังจากที่ได้ URL webhook ที่ต้องการมาแล้ว ต่อไปเราก็ต้อง build ตัว message ที่ต้องการส่งไปในรูปแบบของ Message Card</p><h3>Message Card</h3><p>ตัวอย่าง simple message card ที่ใช้ส่งข้อความเช่น</p><pre>{<br>    &quot;@type&quot;: &quot;MessageCard&quot;,<br>    &quot;@context&quot;: &quot;http://schema.org/extensions&quot;,<br>    &quot;summary&quot;: &quot;Teams Webhook Example&quot;,<br>    &quot;sections&quot;: [{<br>        &quot;activityTitle&quot;: &quot;New Message&quot;,<br>        &quot;text&quot;: &quot;Hello World!&quot;<br>    }]<br> }</pre><p>เมื่อต้องส่ง simple message card ผ่าน python script ก็จะสร้าง code ประมาณนี้</p><pre>import json<br>import requests<br><br>def send_teams_message(webhook_url, message):<br>    headers = {<br>        &quot;Content-Type&quot;: &quot;application/json&quot;<br>    }<br>    <br>    payload = {<br>        &quot;@type&quot;: &quot;MessageCard&quot;,<br>        &quot;@context&quot;: &quot;http://schema.org/extensions&quot;,<br>        &quot;summary&quot;: &quot;Python Teams Webhook Example&quot;,<br>        &quot;sections&quot;: [{<br>            &quot;activityTitle&quot;: &quot;New Message&quot;,<br>            &quot;text&quot;: message<br>        }]<br>    }<br>    <br>    response = requests.post(<br>        url=webhook_url,<br>        headers=headers,<br>        data=json.dumps(payload)<br>    )<br>    <br>    if response.status_code == 200:<br>        print(&quot;Message sent successfully.&quot;)<br>    else:<br>        print(&quot;Failed to send message.&quot;)<br><br># Replace YOUR_WEBHOOK_URL with your actual Teams Webhook URL<br>webhook_url = &quot;YOUR_WEBHOOK_URL&quot;<br>message = &quot;Hello from Python!&quot;<br><br>send_teams_message(webhook_url, message)</pre><p>ทั้งนี้ Message Card ที่สามารถส่งเข้า Webhook ได้นั้นจะมีหลายประเภท แต่จะไม่อธิบายในที่นี้ หรือเข้าดูกันเอง [<a href="https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference">card type</a>]</p><h3>Adaptive Card</h3><p>ในที่นี้ เพื่อความ Advance จะขอเน้นที่ AdaptiveCard ซึ่งสามารถปรับแต่งลูกเล่นต่างๆได้มากมาย เช่นการสร้าง card ตามตัวอย่างนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*i9cNhuc-nk0vLcQ-qp2B_w.png" /></figure><p>โดยเราต้องเริ่มต้นด้วย template ของ AdaptiveCard สำหรับ Incoming Webhook ดังนี้</p><pre>{<br>    &quot;type&quot;: &quot;message&quot;,<br>    &quot;attachments&quot;: [<br>        {<br>            &quot;contentType&quot;: &quot;application/vnd.microsoft.card.adaptive&quot;,<br>            &quot;contentUrl&quot;: None,<br>            &quot;content&quot;: &lt;&lt; JSON_PAYLOAD_PLACE_HERE &gt;&gt;<br>        }<br>    ]<br> }</pre><p>สำหรับ content ส่วน &lt;&lt; JSON_PAYLOAD_PLACE_HERE &gt;&gt; ที่ระบุใน template จะสามารถใช้เครื่องมือ amdesigner ช่วยสร้างขึ้นมาได้ โดยเข้าไปสร้างผ่าน [<a href="https://amdesigner.azurewebsites.net/">Link</a>] (<a href="https://amdesigner.azurewebsites.net/">https://amdesigner.azurewebsites.net/</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dWsioFsMcRR1w5cjcQHEyQ.png" /></figure><p>เช่น ในภาพตัวอย่าง เราออกแบบ adaptive card แล้วได้ JSON Payload มา ก็นำมาประกอบกับ template และใส่ใน code python ตามนี้</p><pre>import json<br>import requests<br><br>def send_teams_adaptive_card(webhook_url, message):<br>    headers = {<br>        &quot;Content-Type&quot;: &quot;application/json&quot;<br>    }<br><br>    payload = {<br>        &quot;type&quot;: &quot;message&quot;,<br>        &quot;attachments&quot;: [<br>            {<br>                &quot;contentType&quot;: &quot;application/vnd.microsoft.card.adaptive&quot;,<br>                &quot;contentUrl&quot;: None,<br>                &quot;content&quot;: {<br>                    &quot;$schema&quot;: &quot;http://adaptivecards.io/schemas/adaptive-card.json&quot;,<br>                    &quot;type&quot;: &quot;AdaptiveCard&quot;,<br>                    &quot;version&quot;: &quot;1.2&quot;,<br>                    &quot;body&quot;: [<br>                        {<br>                            &quot;type&quot;: &quot;TextBlock&quot;,<br>                            &quot;text&quot;: message,<br>                            &quot;wrap&quot;: True,<br>                            &quot;weight&quot;: &quot;bolder&quot;,<br>                            &quot;size&quot;: &quot;medium&quot;<br>                        }<br>                    ]<br>                }<br>            }<br>        ]<br>    }<br><br>    response = requests.post(<br>        url=webhook_url,<br>        headers=headers,<br>        data=json.dumps(payload)<br>    )<br><br>    if response.status_code == 200:<br>        print(&quot;Adaptive Card sent successfully.&quot;)<br>    else:<br>        print(&quot;Failed to send Adaptive Card.&quot;)<br><br># Replace YOUR_WEBHOOK_URL with your actual Teams Webhook URL<br>webhook_url = &quot;YOUR_WEBHOOK_URL&quot;<br>message = &quot;Hello from Python with Adaptive Card!&quot;<br><br>send_teams_adaptive_card(webhook_url, message)</pre><p>เมื่อ run code ดังกล่าว เราก็จะสามารถส่ง message เข้าไปยัง MS Team channel ที่เราสร้าง Incoming Webhook ได้แล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*o9LEkOIxPAObcFAtyHPzxQ.png" /></figure><h3>Hooray!!!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a55a8a4f82d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/set-it-team/%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-webhook-message-%E0%B8%AA%E0%B9%88%E0%B8%87%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B9%80%E0%B8%82%E0%B9%89%E0%B8%B2-ms-team-%E0%B9%81%E0%B8%9A%E0%B8%9A-advance-4a55a8a4f82d">สร้าง Webhook Message ส่งข้อความเข้า MS Team แบบ Advance</a> was originally published in <a href="https://medium.com/set-it-team">SET-IT-TEAM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>