Step-by-step guide to building an AI kissing generator using prompts, automation tools, and debugging techniques, plus a shortcut to deploy via our vault blueprint.
Last month I needed to generate a short video clip of two avatars kissing for a client’s ad mock‑up, and the only way I could think of was to chain a text‑to‑image model with a lip‑sync tool to build an ai kissing generator.
Choosing the right image generator
I started with Stable Diffusion XL because it offers fine‑grained control over style and seed. The free tier of the hosted API gives you 500 images per month, which is enough for early testing. I found the $12/mo Pro plan fair for the extra concurrency and faster generation times.
The first mistake I made was using a generic prompt like “two people kissing”. The model returned cartoonish figures that looked nothing like the realistic avatars I needed. Adding concrete details about clothing, lighting, and facial features made a huge difference.
- Prompt: “a realistic 3D render of a woman in a red dress and a man in a black suit, standing under soft studio light, lips about to touch, 8k resolution”
- Negative prompt: “cartoon, anime, low‑poly, blurry, extra limbs”
- Seed: 424242 (locked to keep the same characters across frames)
Locking the seed is the feature I love most; it guarantees the avatars stay identical from frame to frame, which is essential for a believable kiss.
Setting up lip‑sync with a real‑world example
For lip‑sync I used Wav2Lip hosted via Replicate. The tool takes a source video (or image sequence) and an audio file, then outputs a video where the lips move to the sound.
- Export the image sequence from Stable Diffusion as PNG files (one per frame).
- Generate a short kissing sound effect with a text‑to‑speech service (I used ElevenLabs voice, $5/mo for 30k characters).
- Upload the frame folder and audio to Replicate’s Wav2Lip endpoint.
- Set the “fps” to 24 and “pad” to 0.2 to avoid cut‑off lips.
- Download the resulting MP4.
Here is the exact curl command I used (replace YOUR_TOKEN with your Replicate key):
curl -X POST \
https://api.replicate.com/v1/predictions \
-H "Authorization: Token YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"version":"wav2lip","input":{"video":"https://mybucket.frames.zip","audio":"https://mybucket.kiss.wav","fps":24,"pad":0.2}}'
The first run failed silently; the output video showed the avatars with frozen lips. After checking the logs I discovered the audio needed to be 16 kHz mono PCM. The documentation hid this requirement in a FAQ, which was a concrete gripe: you have to pre‑process the audio with ffmpeg or the tool just ignores it.
I love how the Wav2Lip model preserves the original head pose; there’s no weird stretching or morphing, which makes the kiss look natural.
Why most guides get wrong the prompt structure
Many tutorials suggest you can get away with a simple description and rely on the model’s “creativity”. In practice, the model defaults to a generic style unless you anchor it with specific visual cues. I’ve seen guides tell you to add “high detail” or “8k” as if those words alone fix the problem. They don’t; you need to describe the scene, the lighting, the materials, and the exact moment you want to capture.
What works for me is a three‑part prompt: subject, setting, action. For example: “Subject: a woman in a red dress and a man in a black suit. Setting: a minimalist studio with a softbox left and right. Action: the woman leans forward, lips parted, about to meet the man’s.” This structure forces the model to stay within the realistic domain.
How to debug when the output looks glitchy
When the lips jitter or the faces distort, start by checking three things:
- Frame rate mismatch – ensure the image sequence fps matches the fps you passed to Wav2Lip.
- Audio clipping – loud peaks cause the model to push lip positions beyond the mesh limits; normalize audio to -3 dB.
- Seed drift – if you regenerate images without locking the seed, the avatars change shape between frames, causing a morphing effect.
I once spent an hour tweaking the model’s CFG scale before realizing the audio file was stereo; converting to mono fixed the issue in seconds.
Reader question: How do you keep avatars consistent across frames?
Consistency comes from two controls: a fixed seed and a shared style reference. In Stable Diffusion you can pass a reference image via the “image_to_image” mode and set a low denoising strength (0.2‑0.3). This tells the model to keep the overall look while allowing small pose changes.
Another trick is to generate a base pose sheet (front, side, ¾ view) and use those as control nets for each frame. It adds a bit of setup time, but the result is a smooth, believable kiss that never slips into the uncanny valley.
Cost breakdown and opinion
Here’s what I actually paid for a 10‑second clip at 24 fps (240 frames):
- Stable Diffusion XL Pro: $12/mo (covers all image generation)
- ElevenLabs TTS: $5/mo for the short audio
- Replicate Wav2Lip: $0.006 per second of video → $0.06 for 10 s
- Minor storage and transfer fees: <$0.01
Total: roughly $17.06 per month if you batch a few clips, or $0.71 per clip if you already have the subscriptions. I think $0.71 per clip is a fair price for a polished result; the free tier of the image generator would work for occasional tests, but the paid plan saves you from waiting in the queue.
One concrete love: the ability to lock the seed and reuse the same avatar across multiple campaigns saves hours of re‑work. One concrete gripe: the lip‑sync service’s documentation hides the 16 kHz mono requirement, which caused my first batch to fail silently and forced me to hunt through community forums for the answer.
(which, yes, is annoying) If you’d rather skip the build and deploy a working version in an afternoon, we’ve packaged this workflow as a blueprint at deepusecase.com/vault.