ตัวอย่างดาตาเซ็ตและเวิร์กโฟลว์สำหรับการฝึกโมเดล AI Flux LoRA เกี่ยวกับแฟชั่นไทยในช่วงทศวรรษ 1940s สมัยรัชกาลที่ ๘
ตัวอย่างดาตาเซ็ตและเวิร์กโฟลว์สำหรับการฝึกโมเดล AI Flux LoRA เกี่ยวกับแฟชั่นไทยในช่วงทศวรรษ 1940s สมัยรัชกาลที่ ๘
บทความนี้ผมขอแบ่งปันเวิร์กโฟลว์ที่ได้พัฒนาขึ้นมาเพื่อฝึกโมเดลเฉพาะทางด้วย AI โดยใช้เทคนิคที่เรียกว่า LoRA (Low-Rank Adaptation) ในการศึกษาและอนุรักษ์แฟชั่นไทยในช่วงทศวรรษ 1940s ซึ่งตรงกับช่วงปลายรัชกาลที่ ๘ และยุคสงครามโลกครั้งที่ 2 (World War II)
โปรเจกต์นี้เน้นแฟชั่นของทั้ง ผู้หญิงและผู้ชาย โดยปกติแล้วการฝึก LoRA มักจะแยกเพศเพื่อให้ได้ผลลัพธ์ที่แม่นยำ แต่ในกรณีนี้ผมรวมแฟชั่นทั้งสองเพศไว้ในชุดข้อมูลเดียวกัน เพื่อให้ AI สามารถเรียนรู้และเข้าใจความแตกต่างของแฟชั่นในแต่ละเพศอย่างลึกซึ้งยิ่งขึ้นในยุคนั้นๆ
เหตุผลที่ควรฝึกแฟชั่นชายและหญิงไว้ในโมเดล LoRA เดียวกัน
โดยทั่วไป การฝึกโมเดล LoRA (Low-Rank Adaptation) มักเน้นการรวบรวมภาพที่มีลักษณะทางศิลปะ รูปแบบแฟชั่น หรือกลุ่มเป้าหมายเดียวกัน เช่น ฝึกเฉพาะภาพของผู้หญิงหรือผู้ชาย เพื่อให้โมเดลเรียนรู้รายละเอียดของแฟชั่นได้อย่างแม่นยำ แต่ในโปรเจกต์นี้ ผมตั้งใจผสานภาพของชายและหญิงที่สวมชุดไทยและชุดที่ได้รับอิทธิพลจากตะวันตกในช่วงทศวรรษ 1940s เข้าไว้ด้วยกัน เพื่อให้ AI เข้าใจภาษาแฟชั่นของทั้งสองเพศในบริบทเดียวกันอย่างลึกซึ้ง
ในการฝึกโมเดลที่เข้าใจแฟชั่นของทั้งเพศชายและหญิง ผมเริ่มจากการแยกฝึกโมเดล LoRA สองชุด — ชุดหนึ่งสำหรับแฟชั่นชาย อีกชุดสำหรับแฟชั่นหญิง แล้วนำภาพผลลัพธ์จากทั้งสองโมเดลมาใช้สร้างโมเดลที่สาม ซึ่งเป็นโมเดลแบบผสมเพศ (mixed-sex LoRA) โดยเน้นความเข้าใจแฟชั่นร่วมในภาพเดียวกัน แม้กระบวนการฝึกจะคล้ายกัน แต่การจะได้ผลลัพธ์ที่มีความสมบูรณ์และยืดหยุ่นสูงนั้น จำเป็นต้องฝึก LoRA ทั้งหมด สามชุด เพื่อให้ได้โมเดลสุดท้ายที่ตอบโจทย์
จากการทดลองเพิ่มเติม ผมพบว่าเราสามารถใช้ โมเดลชายและหญิงแยกกันในขั้นตอนการสร้างภาพ (generation) ได้เช่นกัน โดยไม่จำเป็นต้องรวมกันเป็นโมเดลใหม่ เพียงแค่เขียนพรอมต์ให้ชัดเจน เช่น พรอมต์ภาพคู่ (double portrait prompt) ที่อธิบายรายละเอียดเสื้อผ้าของแต่ละเพศอย่างเฉพาะเจาะจง ระบบก็สามารถเรนเดอร์ภาพที่มีทั้งชายและหญิงได้ในฉากเดียว อย่างไรก็ตาม ผลลัพธ์ที่ได้อาจมีความผสมปนกัน เช่น รายละเอียดของชุดอาจหลอมรวมกัน หรือเกิดลักษณะการแต่งกายที่ดูเบลอระหว่างเพศ
ทางออกที่ให้ผลลัพธ์แม่นยำกว่า คือ การฝึกโมเดลหลัก (central LoRA) ที่เข้าใจแฟชั่นของทั้งสองเพศตั้งแต่ต้น แล้วนำมาใช้งานร่วมกับโมเดลชายและหญิงแยกอีกสองชุดในขั้นตอนการสร้างภาพ วิธีนี้ทำให้โมเดลหลักเป็นแกนกลางในการควบคุมโครงสร้างของภาพ ในขณะที่โมเดลชายและหญิงช่วยเติมรายละเอียดและความประณีตของสไตล์แฟชั่นให้สมบูรณ์ยิ่งขึ้น วิธีแบบซ้อนชั้นนี้ (layered approach) ช่วยให้ได้ภาพที่มีความแม่นยำทางประวัติศาสตร์ สอดคล้องกับบริบท และมีความลุ่มลึกทางแฟชั่น เหมาะอย่างยิ่งสำหรับฉากที่มีหลายตัวละครหรือภาพแนวเล่าเรื่องที่ต้องการความหลากหลายและความละเอียดทางวัฒนธรรม
เวิร์กโฟลว์ทีละขั้นตอน
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 เช่น:
ร้านค้าทรงโคโลเนียล
ระเบียงไม้สัก
ถนนที่ปลูกต้นปาล์มเรียงราย
ภายในบ้านที่ตกแต่งด้วยเฟอร์นิเจอร์ไม้แบบดั้งเดิม
รวมถึงการปรับแสงและโทนสีให้นุ่มนวลเหมือนภาพถ่ายสตูดิโอในยุคนั้น ถ้าฉากหลังไม่สมบูรณ์ สามารถนำไปเปลี่ยนได้ใน Midjouney หรือ Krea Editing Suite
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.
To create a LoRA model that understands fashion for both sexes, I first trained two separate models—one focused on male fashion, the other on female fashion. I then used the image outputs from both to build a third LoRA model that represents a combined, gender-inclusive fashion vocabulary. Although the training workflow is similar in each case, this means I had to train three LoRA models in total to achieve the desired level of accuracy and versatility in the final mixed-sex model.
From further experimentation, I found that it’s also possible to use the male and female LoRAs simultaneously during image generation, without combining them into a third model. By writing a clear double portrait prompt—describing each subject’s clothing separately—the system can render both male and female figures within the same scene. However, the result can sometimes blend elements of each style, producing hybrid outfits or mixing fashion cues.
A more effective solution I’ve adopted is to train a central LoRA that already understands both sexes, and then use it in combination with the two original LoRAs during generation. In this setup, the central mixed-sex LoRA provides the structural balance of the image, while the male and female LoRAs contribute stylistic refinement and detail. This layered method yields richer, more historically accurate, and visually coherent fashion imagery—especially useful when generating multi-character scenes or nuanced cultural portraits.
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 or from the internet 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. In cases where the background appears incomplete, it can easily be replaced using either Midjourney or the Krea Editing Suite.
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






















































