<?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: Guihai</title>
    <description>The latest articles on DEV Community by Guihai (@guihaihu).</description>
    <link>https://dev.to/guihaihu</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F957699%2F81e0d183-e91e-41ad-afa2-92307b581868.jpeg</url>
      <title>DEV Community: Guihai</title>
      <link>https://dev.to/guihaihu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/guihaihu"/>
    <language>en</language>
    <item>
      <title>Building a 3-photo to 9-second AI video pipeline with Higgsfield Wan 3.0</title>
      <dc:creator>Guihai</dc:creator>
      <pubDate>Wed, 11 Nov 2026 15:49:52 +0000</pubDate>
      <link>https://dev.to/guihaihu/building-a-3-photo-to-9-second-ai-video-pipeline-with-higgsfield-wan-30-3k6o</link>
      <guid>https://dev.to/guihaihu/building-a-3-photo-to-9-second-ai-video-pipeline-with-higgsfield-wan-30-3k6o</guid>
      <description>&lt;p&gt;I shipped a small independent product called &lt;strong&gt;Spin That Coupe Like What&lt;/strong&gt;: you upload three solo photos and get one 9-second, 9:16 clip set in the changing-room trend clip, with the original audio and no watermark. It is a paid product (one-off, no account) rather than a demo, so the interesting part is the pipeline behind it.&lt;/p&gt;

&lt;p&gt;This post is about how the generation pipeline works and what I would do differently. If you want to see the output first, the how-it-works page has the flow: &lt;a href="https://spinthatcoupelikewhat.com/how-it-works" rel="noopener noreferrer"&gt;https://spinthatcoupelikewhat.com/how-it-works&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The core constraint: keep the original performance
&lt;/h2&gt;

&lt;p&gt;The source is an existing 9-second vertical clip with three performers: one on the bench drumming the beat, one walking in through the door, and one who ends up on the phone shouting the line. The product is not "generate a new video from a prompt". It is a character-replacement edit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the master clip is the video reference&lt;/li&gt;
&lt;li&gt;three photos become three ordered image references&lt;/li&gt;
&lt;li&gt;the model must preserve the performance, camera, cuts and the original audio&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That distinction matters. When a prompt asks a video model to "recreate" a scene, it invents. When it asks to "replace only these people", it has a much better chance of keeping the timing and the joke.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing three identities to Wan 3.0
&lt;/h2&gt;

&lt;p&gt;The provider is Higgsfield's &lt;code&gt;alibaba/wan-3.0/reference-to-video&lt;/code&gt;. The request shape I use is roughly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"prompt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Replace the performers with Reference Image 1/2/3 ..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"image_urls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mic.jpg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"door.jpg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"bench.jpg"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"video_urls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"master.mp4"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"resolution"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"720p"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"aspect_ratio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"adaptive"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"generate_audio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"prompt_extend"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few lessons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Order is the contract.&lt;/strong&gt; &lt;code&gt;image_urls[0]&lt;/code&gt; is the person who shouts the final line, &lt;code&gt;[1]&lt;/code&gt; walks through the door, &lt;code&gt;[2]&lt;/code&gt; sits on the bench. The prompt names them by reference number. Swap the array and the identities swap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tell the model what not to change.&lt;/strong&gt; Preserve background, props, lighting, camera and cuts; replace only face, hair and clothing. Also tell it not to copy objects from the reference photos, or a phone from one photo can leak into the output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audio comes from the source.&lt;/strong&gt; &lt;code&gt;generate_audio: true&lt;/code&gt; keeps the reference clip's soundtrack instead of generating a new one. I verified the output audio against the master (normalized correlation around 0.91 on the 480p run), which is enough to confirm it is inherited, not regenerated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Billing depends on resolution.&lt;/strong&gt; Reference-to-video is billed per output second with a higher "with video input" rate, so requesting 1080p for a 480p order is about 4x the supplier cost. Request the ordered resolution, then normalise the container with ffmpeg.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The boring parts that make it a product
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Upload once, reuse the master.&lt;/strong&gt; Photos and the master are uploaded to the provider's presigned storage. The master upload URL is cached by its SHA-256 and invalidated when the clip changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gate before payment.&lt;/strong&gt; The execution contract (provider, model, prompt, params, master hash) is checked before a Stripe session is created. A mismatch returns a 503 instead of charging the customer and stalling the order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't retry an ambiguous submission.&lt;/strong&gt; A timeout after submitting could mean the provider accepted the job. The order becomes &lt;code&gt;submission_unknown&lt;/code&gt; for manual resolution instead of being submitted twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refunds are automatic on technical failure.&lt;/strong&gt; If generation fails, the order is refunded without the customer asking; recovery retries live in a per-minute reconcile job.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;7-day retention.&lt;/strong&gt; Photos and rendered videos are deleted on a schedule, and the order link is the only way back in.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I would do differently
&lt;/h2&gt;

&lt;p&gt;The first version had a contract that only hashed the prompt and model. It did not hash the master clip, so replacing the clip could still produce output from the old one. The fix was to include the master SHA-256 in the contract and clear the provider upload cache on activation. That is the kind of thing I now treat as a release gate, not a detail.&lt;/p&gt;

&lt;p&gt;I would also test the boring failure path earlier: a paid order whose webhook never arrives. The safe behaviour is to reconcile the Stripe session before expiring the order, and to refund a payment that lands after expiry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it / feedback
&lt;/h2&gt;

&lt;p&gt;If you make trend edits with friends, the product is at &lt;a href="https://spinthatcoupelikewhat.com" rel="noopener noreferrer"&gt;https://spinthatcoupelikewhat.com&lt;/a&gt;. It is an independent project, not affiliated with the trend creator or any club. I would be glad to hear what breaks first, especially around photo quality and three-person identity consistency.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>buildinpublic</category>
      <category>startup</category>
    </item>
    <item>
      <title>Show DEV: RemixFlick - turn 1-2 photos into ready-made AI videos</title>
      <dc:creator>Guihai</dc:creator>
      <pubDate>Wed, 11 Nov 2026 07:45:53 +0000</pubDate>
      <link>https://dev.to/guihaihu/show-dev-remixflick-turn-1-2-photos-into-ready-made-ai-videos-4hg</link>
      <guid>https://dev.to/guihaihu/show-dev-remixflick-turn-1-2-photos-into-ready-made-ai-videos-4hg</guid>
      <description>&lt;p&gt;Most AI video tools ask you to write a prompt and hope for the best. I wanted the opposite: pick a scene you have already seen on TikTok, upload one or two photos, and get the video back.&lt;/p&gt;

&lt;p&gt;That is what RemixFlick does. Instead of a prompt box, it ships a small catalogue of curated templates. Each template is a reference clip plus a fixed prompt and model configuration, so the result is reproducible and the user never has to learn prompt engineering.&lt;/p&gt;

&lt;p&gt;A few product decisions worth sharing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Templates over prompts.&lt;/strong&gt; A template can be tested, priced and replaced. A free-form prompt cannot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-time credits, not subscriptions.&lt;/strong&gt; Most people want one video for one occasion. Credits never expire and single videos start at $2.99 for 480p.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One free remake within 3 days.&lt;/strong&gt; Generation is stochastic; a bad take should not be a lost purchase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nine locales from day one.&lt;/strong&gt; The trends are global, so the copy should not be English-only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The stack is Next.js with Postgres/Drizzle, Better Auth for sign-in, Stripe for checkout and webhooks, and a reference-to-video model behind Higgsfield. Templates, pricing and localisation live in config, so adding a scene is a data change rather than a new page.&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://remixflick.com" rel="noopener noreferrer"&gt;https://remixflick.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback on the template idea is very welcome - especially if you have used similar tools.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>saas</category>
      <category>showdev</category>
      <category>startup</category>
    </item>
    <item>
      <title>I built a two-photo meme video generator (16:9/9:16, from $5.99)</title>
      <dc:creator>Guihai</dc:creator>
      <pubDate>Sat, 31 Oct 2026 09:41:30 +0000</pubDate>
      <link>https://dev.to/guihaihu/i-built-a-two-photo-meme-video-generator-169916-from-599-5dn6</link>
      <guid>https://dev.to/guihaihu/i-built-a-two-photo-meme-video-generator-169916-from-599-5dn6</guid>
      <description>&lt;p&gt;A friend kept asking me to make that "oh you can make it cap" meme with his own face, so I built a small tool that does exactly one thing: it takes two photos and returns a 15-second meme video with the original sound.&lt;/p&gt;

&lt;p&gt;How it works: upload photo A (the person who laughs) and photo B (the person who turns and keeps a straight face). A hosted generative video model renders the motion, the audio is muxed with the clip, and the result is delivered as a downloadable link by email. Output can be 16:9 or 9:16, in 480p ($5.99) or 720p ($7.99), paid once with no account or subscription.&lt;/p&gt;

&lt;p&gt;A few engineering choices worth mentioning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single-purpose product: one template, so the UI is a form and a result page instead of a creative suite.&lt;/li&gt;
&lt;li&gt;Payment keeps the flow anonymous: the order is identified by a random token, not an account.&lt;/li&gt;
&lt;li&gt;Failed renders and moderation blocks are refunded automatically; a delivered result that misses gets one free retry.&lt;/li&gt;
&lt;li&gt;Content moderation and adult-only/consent rules are enforced before rendering.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is not a general video editor and will not replace one. If you need a quick meme clip for TikTok, Reels or Shorts, it is live at &lt;a href="https://ohyoucanmakeitcap.net" rel="noopener noreferrer"&gt;https://ohyoucanmakeitcap.net&lt;/a&gt; (EN/ES/PT).&lt;/p&gt;

&lt;p&gt;Happy to share more about the render pipeline or the payment integration in the comments.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>showdev</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
