ตัวอย่างดาตาเซ็ตและเวิร์กโฟลว์สำหรับการฝึกโมเดล AI Flux LoRA เกี่ยวกับแฟชั่นไทยในช่วงทศวรรษ 1940s สมัยรัชกาลที่ ๘
ตัวอย่างดาตาเซ็ตและเวิร์กโฟลว์สำหรับการฝึกโมเดล AI Flux LoRA เกี่ยวกับแฟชั่นไทยในช่วงทศวรรษ 1940s สมัยรัชกาลที่ ๘
บทความนี้ผมขอแบ่งปันเวิร์กโฟลว์ที่ได้พัฒนาขึ้นมาเพื่อฝึกโมเดลเฉพาะทางด้วย AI โดยใช้เทคนิคที่เรียกว่า LoRA (Low-Rank Adaptation) ในการศึกษาและอนุรักษ์แฟชั่นไทยในช่วงทศวรรษ 1940s ซึ่งตรงกับช่วงปลายรัชกาลที่ ๘ และยุคสงครามโลกครั้งที่ 2 (World War II)
โปรเจกต์นี้เน้นแฟชั่นของทั้ง ผู้หญิงและผู้ชาย โดยปกติแล้วการฝึก LoRA มักจะแยกเพศเพื่อให้ได้ผลลัพธ์ที่แม่นยำ แต่ในกรณีนี้ผมรวมแฟชั่นทั้งสองเพศไว้ในชุดข้อมูลเดียวกัน เพื่อให้ AI สามารถเรียนรู้และเข้าใจความแตกต่างของแฟชั่นในแต่ละเพศอย่างลึกซึ้งยิ่งขึ้นในยุคนั้นๆ
เหตุผลที่รวมแฟชั่นชายและหญิงไว้ใน LoRA เดียวกัน
โดยทั่วไป การฝึก LoRA จะใช้ภาพที่มีรูปแบบศิลป์หรือหมวดหมู่แฟชั่นเดียวกัน เช่น ภาพของเพศเดียวกันหรือสไตล์เดียวกัน เพื่อให้โมเดลเรียนรู้ได้ชัดเจน แต่ในกรณีนี้ ผมตั้งใจรวมภาพของชายหญิงที่สวมใส่เสื้อผ้าในสไตล์ไทยและตะวันตกจากยุค 1940s ไว้ในชุดเดียวกัน
แม้ว่าการฝึกแบบนี้อาจทำให้บางครั้งได้ผลลัพธ์ที่ผสมผสาน เช่น รายละเอียดของเพศอาจปะปนกัน แต่สามารถควบคุมผลลัพธ์ได้ด้วยการเขียนพรอมต์ (Prompt Engineering) ที่ชัดเจน จุดมุ่งหมายของการฝึกไม่ใช่เพียงให้ AI วาดชุดให้ดูเหมือนของจริง แต่คือการสร้างโมเดลที่ เข้าใจแฟชั่นในเชิงลึกทั้งรูปทรง ความหมาย และบริบททางสังคมของเพศในยุคสมัยนั้น
เวิร์กโฟลว์ทีละขั้นตอน
1. การค้นคว้าทางประวัติศาสตร์และการรวบรวมข้อมูล (Historical Research and Data Collection)
กระบวนการเริ่มจากการรวบรวมวัสดุทางประวัติศาสตร์ ได้แก่:
ภาพถ่ายขาวดำจาก หอจดหมายเหตุแห่งชาติ พิพิธภัณฑ์ และหนังสือแฟชั่นจากยุค 1940s
เน้นทั้งภาพถ่ายทางการ ฉากชีวิตประจำวัน และแฟชั่นริมถนนในกรุงเทพฯ และพื้นที่อื่น ๆ
2. การคัดเลือกภาพคุณภาพสูง (Curating High-Quality Images)
ผมคัดเลือกภาพความละเอียดสูงจำนวนประมาณ 50–100 ภาพ โดยพิจารณาจาก:
โครงชุดแบบตะวันตก เช่น เดรสยาวระดับเข่า (knee-length dresses), กางเกงเอวสูง (high-waisted trousers) และ สูทปกแหลม (peak lapel suits)
ทรงผมและเครื่องประดับ เช่น ทรงผมดัดลอนแบบยุค 1940s, หมวกสไตล์ตะวันตก และทรงผมไทยที่ปรับเข้ากับบริบทของสงคราม
ภาพชุดนี้กลายเป็นฐานข้อมูลหลักที่ใช้สำหรับการฝึกโมเดลแฟชั่นทั้งชายและหญิง
3. การลงสีโดยอิงประวัติศาสตร์ด้วย Flux Kontext Plus / FreePik Kontext Plus (Colourising with Historical Context)
เนื่องจากภาพต้นฉบับส่วนใหญ่เป็นภาพขาวดำ ผมจึงใช้ Flux Kontext Plus บน FreePik Edit เพื่อเติมสีลงไปอย่างถูกบริบททางวัฒนธรรมและสไตล์ของแฟชั่นในยุคที่กำลังจะเทรน โดยอิงจากข้อมูลประวัติศาสตร์ ซึ่งช่วยให้ AI เข้าใจ:
เนื้อผ้าและพื้นผิว (fabric textures)
แสงและเงา (reflections and lighting)
รายละเอียดของลายปักและการทอผ้า (embroidery and weaving)
สีของสีย้อมและพื้นผิวของผ้าในยุคนั้น
ทุกขั้นตอนของการลงสีได้รับการตรวจสอบให้สอดคล้องกับบริบททางวัฒนธรรมและความประณีตของเครื่องแต่งกายไทย
4. การฝึกโมเดล LoRA (Training the LoRA Model)
ในการฝึกโมเดล LoRA ผมทดลองใช้ทั้ง Flux Dev, Shakker และ Krea ซึ่งแต่ละระบบมีข้อดีและข้อจำกัดต่างกัน โดยสามารถสรุปเวิร์กโฟลว์ได้ดังนี้:
4.1 การฝึกผ่าน Flux Dev หรือ Shakker
ผมใช้ Flux Dev Interface (หรือ Shakker) สำหรับการฝึกแบบควบคุมได้ละเอียด โดยตั้งค่าดังนี้:
Base model: โมเดล diffusion ขนาดกลางที่ผ่านการฝึกมาแล้วกับภาพถ่ายบุคคล
Learning rate: 1×10⁻⁴
Training steps: 350–600 ขั้นตอน เพื่อป้องกันการจำภาพมากเกินไป
Batch size: 1–2 ภาพต่อรอบ โดยสลับระหว่างแฟชั่นชายและหญิง เพื่อให้โมเดลเรียนรู้แบบสมดุล
ภาพทั้งหมดถูกจัดกลุ่มตามหมวดหมู่แฟชั่น เช่น เสื้อแขนตุ๊กตา, ชุดเดรสคาดเอว, หมวกสาน, กางเกงขากว้าง, และสูททางการ
4.2 การฝึกผ่าน Krea Training
สำหรับการฝึกอย่างรวดเร็วและไม่ซับซ้อน ผมเลือกใช้ Krea Training ซึ่งเหมาะมากสำหรับผู้ที่ต้องการผลลัพธ์ไวโดยไม่ต้องตั้งค่าทางเทคนิคมากนัก:
เพียงอัปโหลดภาพประมาณ 50 ภาพ ก็สามารถเริ่มฝึกได้ทันที
ไม่ต้องติดตั้ง หรือเซตอัปเซิร์ฟเวอร์ใด ๆ
ใช้ default settings ก็ได้ผลดี หรือสามารถปรับ learning rate และ training steps เองได้
โดยปกติ LoRA จะพร้อมใช้งานในเวลาไม่ถึง 5 นาที
ข้อจำกัดของ Krea คือ:
ไม่สามารถดาวน์โหลดไฟล์ LoRA ในรูปแบบ .safetensors ไปใช้งานบนระบบภายนอก
สร้างภาพได้เฉพาะภายในระบบของ Krea โดยใช้ Krea Engine ที่รองรับโมเดล เช่น Flux, Krea1, และโมเดลอื่น ๆ ที่ทาง Krea พัฒนาขึ้นเอง
5. การเขียนพรอมต์และออกแบบฉากหลัง (Prompt Writing and Background Design)
ผมเขียนพรอมต์แบบเจาะจงที่แฝงบริบททางวัฒนธรรมและความงามของฉาก เช่น:
ภาพครึ่งตัวของหญิงไทย (1942) สวมชุดเดรสไหมลายดอก ยาวระดับเข่า คาดเข็มขัด ทรงผมเซ็ตลอนอ่อนแบบยุค 1940s นั่งอยู่ริมหน้าต่างไม้ฉลุลาย มีแสงธรรมชาติลอดเข้ามาเบา ๆ
ฉากหลังใช้ภาพเรนเดอร์ที่สะท้อนกรุงเทพฯ ยุค 1940s เช่น:
ร้านค้าทรงโคโลเนียล
ระเบียงไม้สัก
ถนนที่ปลูกต้นปาล์มเรียงราย
ภายในบ้านที่ตกแต่งด้วยเฟอร์นิเจอร์ไม้แบบดั้งเดิม
รวมถึงการปรับแสงและโทนสีให้นุ่มนวลเหมือนภาพถ่ายสตูดิโอในยุคนั้น
6. การอัปสเกลและปรับภาพหลังการผลิต (Upscaling and Post-Processing)
เพื่อเพิ่มความคมชัดของภาพ:
ใช้ Magnific Upscaling (ผ่าน FreePik) ขยายภาพเป็น 2 เท่า ช่วยให้เห็นรายละเอียดของผ้า ลายปัก และใบหน้าได้ชัดเจนยิ่งขึ้น
ใช้ PicSi AI’s Face-Swap Tool แทนที่ใบหน้าของนางแบบด้วยใบหน้าที่สร้างขึ้นจาก โมเดล LoRA เฉพาะทาง ที่ผมฝึกขึ้นมาเอง เพื่อความสมจริงและความสม่ำเสมอของภาพทั้งชุด
สรุป
เวิร์กโฟลว์นี้ ซึ่งตั้งอยู่บนรากฐานของการวิจัยทางประวัติศาสตร์ ความเข้าใจเชิงวัฒนธรรม และความแม่นยำของ AI ได้สร้างโมเดลที่ไม่ได้แค่เลียนแบบแฟชั่นไทยยุค 1940s แต่ เข้าใจรูปแบบ โครงสร้าง และภาษาทางสายตาของแฟชั่นในยุคนั้นอย่างแท้จริง
การรวมแฟชั่นชายและหญิงไว้ในสภาพแวดล้อมการฝึกเดียวกัน ช่วยให้โมเดลสามารถเข้าใจแฟชั่นไทยในช่วงเปลี่ยนผ่านของยุคสงครามโลกครั้งที่ 2 ได้อย่างครอบคลุมและลึกซึ้ง
แม้การฝึก LoRA แบบเฉพาะทางจะใช้เวลาและความพิถีพิถันสูง แต่ผลลัพธ์ที่ได้คือเครื่องมือที่สามารถ ปลุกชีวิตแฟชั่นในอดีตให้กลับมามีชีวิตอีกครั้งผ่านภาพที่สร้างจาก AI
Sample Dataset and Workflow for Training an AI Flux LoRA Model on 1940s Thai Fashion during the Reign of King Rama VIII
In this article, I’d like to share the workflow I’ve developed for training a specialised LoRA (Low-Rank Adaptation) model using AI to explore and preserve Thai fashion from the 1940s—particularly during the reign of King Rama VIIIand the era of World War II. This project focuses on both male and female fashion styles, which are often trained separately in conventional LoRA setups. My approach combines the two within a shared dataset to enable the AI to better understand gendered fashion nuances across the decade.
Why Combine Male and Female Fashion in One LoRA?
Typically, LoRA training involves curating images of the same artistic style, subject likeness, or fashion category. Male and female fashion datasets are often trained independently to ensure high stylistic accuracy. However, to develop a model that understands both genders’ fashion vocabulary, I combined images of men and women dressed in 1940s Thai and Western-inspired clothing.
While this may sometimes produce mixed results during generation (e.g. blending masculine and feminine elements), prompt engineering can be used to guide the model toward precise outputs. The goal is not just to reproduce clothing, but to build a LoRA that can comprehend fashion across a spectrum of gender expressions and period aesthetics.
Step-by-Step Workflow
1. Historical Research and Data Collection
My process began with the collection of vintage materials:
Black-and-white photographs from the National Archives, museums, and period fashion publications from the 1940s
Focus on official portraits, everyday street scenes, and lifestyle documentation from Bangkok and beyond
2. Curating High-Quality Images
I assembled a dataset of approximately 50–100 high-resolution images, carefully selected to highlight:
Western-inspired silhouettes such as knee-length dresses, high-waisted trousers, and suits with peak lapels
Hair and accessories like soft 1940s waves, hats, and traditional Thai hairstyles adapted to wartime trends
This dataset forms the foundation for both male and female fashion representation.
3. Colourising with Historical Context Using Flux Kontext Plus/ FreePik Kontext Plus
Because many original images are monochrome, I used Flux Kontext Plus to colourise them with historical accuracy. Colour enhances the model’s ability to read:
Fabric textures
Reflections and lighting
Embroidery and weaving details
Dye colours and textile finishes typical of the 1940s
All colourisation was done carefully to preserve cultural context and textile craftsmanship, ensuring the model learns fashion from a grounded, realistic visual base.
4. Training the LoRA Model
In developing this project, I experimented with multiple platforms including Flux Dev, Shakker, and Krea—each offering different strengths and limitations. Here is a breakdown of the workflow for each:
4.1 Training via Flux Dev or Shakker
I used the Flux Dev interface (and occasionally Shakker) for a more detailed and customisable training process, with the following settings:
Base model: A mid-sized diffusion model pre-trained on portrait photography
Learning rate: 1×10⁻⁴
Training steps: 350–600, to prevent overfitting while preserving detail
Batch size: 1–2 images per cycle, alternating between male and female fashion styles to ensure balanced learning
All images were categorised into fashion types such as puff-sleeve blouses, belted dresses, straw hats, wide-leg trousers, and formal suits.
4.2 Training via Krea
For faster, more beginner-friendly training, I used Krea Training, which is ideal for quick results without technical setup:
You simply upload around 50 images to begin training
No server configuration or installation is needed
The default settings already provide great results, but you can also customise the learning rate and training steps
Typically, a LoRA model is ready in under 5 minutes
Limitations of Krea include:
You cannot download the trained LoRA file as a .safetensors for external use
Image generation is limited to Krea’s platform, using the Krea Engine, which supports models like Flux, Krea1, and other in-house options
5. Prompt Writing and Background Design
I developed custom prompts that embed cultural context and scene aesthetics. Example:
A half-length portrait of a Thai woman (1942), wearing a knee-length floral silk dress with a belted waist, her hair styled in soft 1940s waves, seated beside a carved wooden window with natural daylight streaming in.
Backgrounds were designed using rendered environments reminiscent of 1940s Bangkok—featuring:
Colonial-style shopfronts
Timber verandas
Palm-lined streets
Interiors styled with teak furniture and period details
This approach helps root the generated images in an authentic spatial and temporal setting. Lighting and tone were also adjusted to reflect the soft, subdued atmosphere of mid-20th-century studio photography.
6. Upscaling and Post-Processing
To enhance final image quality:
Magnific Upscaling (via Freepik) was used to enlarge images by 2×. This improved fabric sharpness, embroidery detail, and facial clarity.
PicSi AI’s Face-Swap Tool was then used to restore each subject’s facial identity using my custom-trained facial LoRA models, ensuring consistency and realism across the dataset.
Conclusion
This training workflow—rooted in historical research, cultural sensitivity, and AI precision—results in an AI model that doesn’t just mimic the look of 1940s Thai fashion, but genuinely understands its forms, silhouettes, and visual language. By combining male and female fashion in a single training environment, the model gains a broader, richer understanding of fashion during Thailand’s WWII-era transformation under King Rama VIII.
Specialised LoRA training requires time, care, and a deep respect for history. But the reward is a tool that can bring the past to life, not as fantasy, but as fashion heritage reconstructed through AI.
#aifashionlab #AI #aiartist #aiart #aifashion #aifashiondesign #aifashionstyling #aifashiondesigner #fashion #fashionhistory #historyoffashion #fashionstyling #fashionphotography #digitalfashion #digitalfashiondesign #digitalcostumedesign #digitaldesign #digitalaiart #ThaiFashionHistory #ThaiFashionAI






















































