<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mild King</title>
    <description>The latest articles on DEV Community by Mild King (@mnblabs).</description>
    <link>https://dev.to/mnblabs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3028911%2Ffedd0dec-a784-4844-8ccc-e4c791f03a28.png</url>
      <title>DEV Community: Mild King</title>
      <link>https://dev.to/mnblabs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mnblabs"/>
    <language>en</language>
    <item>
      <title>How to train FLUX.1 for custom emoji generation — dataset size, script, and deployment?</title>
      <dc:creator>Mild King</dc:creator>
      <pubDate>Tue, 08 Apr 2025 07:10:55 +0000</pubDate>
      <link>https://dev.to/mnblabs/how-to-train-flux1-for-custom-emoji-generation-dataset-size-script-and-deployment-4dn7</link>
      <guid>https://dev.to/mnblabs/how-to-train-flux1-for-custom-emoji-generation-dataset-size-script-and-deployment-4dn7</guid>
      <description>&lt;p&gt;I'm working on a personal project where I want to generate custom emoji-style images from text prompts — like turning this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Flying pig&lt;/code&gt; → 🐖 with wings&lt;br&gt;
&lt;strong&gt;&lt;em&gt;(see cover image!)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm using &lt;a href="https://huggingface.co/black-forest-labs/FLUX.1-dev" rel="noopener noreferrer"&gt;black-forest-labs/FLUX.1-dev&lt;/a&gt; as the base model. It’s a diffusion model similar to Stable Diffusion, but optimized for low-VRAM generation.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I have:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;~25k 512x512 emoji-style images&lt;/li&gt;
&lt;li&gt;Captions for each (in .txt files)&lt;/li&gt;
&lt;li&gt;A train.json mapping image to caption
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;dataset&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nt"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;image_001&lt;/span&gt;&lt;span class="nc"&gt;.png&lt;/span&gt;&lt;span class="o"&gt;,...&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nt"&gt;captions&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;caption_001&lt;/span&gt;&lt;span class="nc"&gt;.txt&lt;/span&gt;&lt;span class="o"&gt;,...&lt;/span&gt;
&lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nt"&gt;train&lt;/span&gt;&lt;span class="nc"&gt;.json&lt;/span&gt;  &lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="err"&gt;"image":&lt;/span&gt; &lt;span class="err"&gt;"images/image_001.png",&lt;/span&gt; &lt;span class="err"&gt;"caption":&lt;/span&gt; &lt;span class="err"&gt;"captions/caption_001.txt"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="o"&gt;...]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What I need help with:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;How many images is “enough”? Is 25k too much or just fine?&lt;/li&gt;
&lt;li&gt;Any working training script for FLUX.1?

&lt;ul&gt;
&lt;li&gt;I tried one (PyTorch + diffusers), but outputs look like noise.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Best training config?

&lt;ul&gt;
&lt;li&gt;Should I freeze VAE/text encoder?&lt;/li&gt;
&lt;li&gt;Recommended batch size, LR, etc?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;How do I export the model to ONNX or TFLite?&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Planning to use it in a Flutter app later.&lt;br&gt;
&lt;em&gt;A sample setup or any advice would be helpful for beginners to get started.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>flutter</category>
      <category>diffusionmodels</category>
      <category>flux1dev</category>
    </item>
  </channel>
</rss>
