Tech10 min read

Playing Back 4,608 Kuramoto Oscillators in a 3D Render to Character Model

IkesanContents

In my June article, I placed a demo showing 28 oscillators synchronizing on a circle to explain Un-0, an existing generative model that produces images from the phases of coupled oscillators. At that time, the demo only ran the Kuramoto model equations with no learning involved.

This time, I adapted Un-0’s mechanism into a model that converts 3D renders of our character into finished illustrations, and trained it on an EVO-X2 (Radeon 8060S). Inside the trained model, 4,608 oscillators move every time it generates an image.

Curious about how those 4,608 movements connect to the resulting picture, I recorded the phases and intermediate images so you can play them back right in this article just like the June demo—and even freeze specific groups of oscillators to see what happens.

The June Demo

28 oscillators in the Kuramoto model. Use the slider to adjust the coupling strength K

Each dot on the circle is an oscillator, and its position (angle) around the circle is its phase. Increasing the coupling strength K pulls the dots together into one spot and lengthens the red arrow.
The length of the red arrow (r) measures how synchronized the oscillators are: 0 when completely scattered, and 1 when all at the same phase. These 28 oscillators simply pull on each other with equal strength and do no learning.

The Adapted Un-0 Model

The input is a 3D render of our character posed in Blender, and the target is an illustration produced by running that same render through Anima I2I (image-to-image translation). The model is trained to output an image close to the target whenever a render is fed in.

Here is how the computation flows:

graph TD
    A[3D Render] --> B[Image-to-Phase Encoder]
    B --> C[Initial Phases<br/>4,608 oscillators]
    C --> D[Phase Time Evolution<br/>10 steps]
    D --> E[Convert Phases to sin and cos]
    E --> F[Phase-to-Latent Decoder]
    F --> G[Latent Representation]
    G --> H[Decode with VAE]
    H --> I[Character Illustration]

The 4,608 oscillators are arranged in a 12×8 grid, with 48 oscillators per cell. Dividing a 512×768 image into a 12×8 grid makes each cell 64×64 pixels, so each cell’s grid position corresponds to that spatial region of the image.

Time evolution (how phases change over time) follows the Kuramoto model equations, using a 4,608×4,608 table (coupling matrix) to represent how strongly each oscillator influences every other one. While the June demo used the same strength K for all pairs, this model learns individual coupling values for every pair along with each oscillator’s natural frequency. The calculation is split into 10 short time steps (10 steps of Euler’s method).

Because raw angles are awkward to feed directly into subsequent layers, the evolved phases after 10 steps are converted into sin and cos pairs before constructing the latent representation. The latent representation is a compressed version of the image handled by a VAE (Variational Autoencoder); during training, the target illustrations are also compressed into this same latent space so the model learns to match them, and at the end a fixed VAE (qwen_image_vae.safetensors, the same one used by the Anima target) decodes the predicted latent back into an illustration.

While the original Un-0 is a generative model that starts from random phases, this adapted model determines the initial phases from the input 3D render. Since there is no randomness at inference time, it acts as a deterministic image-to-image converter that produces the exact same illustration for a given render.

ItemDetails
MachineEVO-X2 (Ryzen AI Max+ 395, Radeon 8060S, 64GB RAM), Ubuntu, PyTorch 2.12.0a0+rocm7.13
RendersBlender 5.3.0 EEVEE, orthographic projection, 512×768. 144 images total (48 poses × 3 camera angles)
TargetsAnima-Base v1.0 with Turbo LoRA v0.1 and character LoRA via I2I. 16 steps, denoise 0.7, 512×768
Training99 of 144 pairs used, batch size 16 for 1,000 iterations. Learning rate 3e-4. Huber loss (reduces outlier sensitivity)
Parameters24.5M total, of which 21.24M are the coupling matrix and per-oscillator frequencies
Training time1,055 seconds
Un-0 baseAdapted from commit 75243ca

The loss is the difference between the model’s predicted latent representation and the target’s latent representation—smaller is closer to the target. Outputting the average of all 99 training targets regardless of the input render gives an error of about 0.16, which serves as the unlearned baseline.

Of the 144 pairs, 99 were used for training and the remaining 45 were held out to test unseen poses and angles: 9 “new angle” pairs (poses seen during training, but with one camera angle held out) and 36 “new pose” pairs (12 completely unseen poses × 3 camera angles).

10-Step Playback Demo

With roughly 21.23 million values in the coupling matrix, the model is too large to ship directly to the browser. Instead, I ran the trained model locally, recorded the phases and images, and built a browser player.
I recorded 11 snapshots—before time evolution starts and after each of the 10 steps—and passed each snapshot’s phases through the latent decoder and VAE to render intermediate images. Note that the latent decoder was trained only on the phases after step 10, so the intermediate images are not direct model outputs, but visualizations of what the intermediate phases look like under that same decoder.

Left: oscillators. Center: image decoded from those phases. Right: target illustration. Use the buttons next to the oscillator grid to freeze or run each 3-row band (pre-recorded playback, not computed in the browser)
UI ElementDescription
Input render3D render fed into the model. Choose from 3 examples (trained pair, new angle, new pose)
4,608 oscillators12×8 grid matching image regions. Each small circle holds 48 oscillators, with dot positions showing phase
Decoded imageImage decoded from the phases at that step, updating as you play back the steps
TargetThe I2I target illustration for that render. Closer at step 10 means better training

When you hit play, the dots move around the circles and the center image shifts from a blur into a character. At step 0 it is just blurred colors; by step 2 the uniform colors and body position appear, by step 4 the face and hair emerge, and up to step 10 the outlines sharpen.

Freezing Specific Bands of Oscillators

I divided the 12×8 grid into 4 horizontal bands of 3 rows each. When a band is frozen, its oscillators stay fixed at their initial phases while the remaining bands evolve normally. Even when frozen, those oscillators continue to influence the other bands through the coupling matrix—yet clicking “Freeze this band” in the demo above turns only that band gray and leaves the corresponding horizontal strip of the image blurry.

I computed all 16 freeze/run combinations across the 4 bands on all 3 renders. In every combination, only the moving bands turned into a sharp illustration while the frozen bands stayed blurry.

Below are the step-10 outputs for the 3rd render (new pose) as moving bands are added from top to bottom:

Step-10 outputs on the 3rd render as moving bands are added from top to bottom Left to right: all frozen, top band only, top 2 bands, top 3 bands, all moving

Here are the step-10 errors (the unlearned target-average baseline is about 0.16):

Moving Bands1st (Trained pair)2nd (New angle)3rd (New pose)
None (all frozen)0.3160.3480.315
Top 1 band only0.2070.2350.249
Top 2 bands0.1550.1850.201
Top 3 bands0.0840.1270.171
All bands0.0430.1030.107

For the 1st and 2nd renders, moving the top 2 bands brings the error down near the 0.16 baseline, whereas the 3rd render (new pose) stays at 0.171 even with 3 bands moving and only drops to 0.107 when all bands run. Even though the coupling matrix connects distant grid cells, whether a region renders clearly depends on whether the oscillators in that specific band actually moved.

Do the Oscillators Synchronize?

Before time evolution, the 48 oscillators in background cells (where the character is not present) are clustered at nearly the same phase, appearing as a tight group on the right side of each circle in the demo. Cells containing the character’s body are already somewhat spread out from the start, meaning the initial phases encode where the body is through differences in phase spread.

As time evolution progresses, the dots spread out around the entire circle, including in the background cells. Calculating the synchronization measure r from the June demo for each cell of 48 oscillators and averaging across all 96 cells gives 0.83 before evolution and 0.24 after 10 steps. For 48 completely random phases, r is about 0.13, so after 10 steps the phases have spread nearly to random.

Each oscillator moves an average of 0.17 radians (about 10°) per step, ending up about 1.55 radians (about 90°) away from its initial phase after 10 steps. Unlike the June demo where stronger coupling simply synchronized all oscillators together, here the goal is not synchronization itself—the learned coupling appears to spread phases into patterns that the decoder can turn into an image, even in the initially synchronized background cells.

Cutting Coupling vs. Starting from Random Phases

I recorded two modified conditions on the 3rd render (new pose):

ConditionModificationMean Angle Moved / StepStep-10 Error
As trainedNo changes0.166 rad (~9.5°)0.107
Coupling cutCoupling matrix zeroed out; oscillators move only by their natural frequencies0.008 rad (~0.5°)0.309
Random initial phasesDiscard render-derived initial phases and start from random phases with learned coupling0.024 rad (~1.4°)0.411

Here are the step-10 outputs in the same order as the table above:

Step-10 outputs: as trained, coupling cut, and random initial phases

Cutting the coupling leaves the phases nearly motionless, so the image stays in its initial blurred state. The phase movement that forms the image comes primarily from the learned coupling rather than each oscillator’s natural frequency.

Starting from random phases breaks the output into scattered fragments of color, with an error worse than the ~0.16 target-average baseline. Unlike the original Un-0, this model was only trained to start from render-derived phases and cannot generate images from random noise. From these two tests, it seems the initial phases carry the pose and image structure, while the learned coupling moves them into a form that decodes into the final illustration.

Comparing Against the Targets

After 10 steps with all oscillators moving, all three renders reproduce the uniform, necktie, side ponytail, ahoge, arm angles, and leg stance of the inputs. However, the faces and hands are blurry—even on the trained 1st render, facial features are faint, and the extended arm on the 3rd render is smudged.

Because fine details like facial expressions and clothing folds are not specified by the 3D render alone, the output appears to average over many training targets, leaving the face blurry.

Speed and Comparison Against a Non-Oscillator Model

Generating one 512×768 image took a median of about 1.04 seconds: 62.9 ms to compute the latent representation from the render, plus about 0.98 seconds for the VAE decode. By comparison, the Anima I2I target takes 7.0 seconds per image at the same resolution.

I also compared this against a standard image-to-image U-Net (1.79M parameters) trained to predict the latent representation directly on the same 99 pairs without any oscillators. Both models were trained 3 times with different random initialization seeds, reporting mean ± standard deviation (lower is better). For the 36 new-pose images, the table shows the 18 images on the same side as the demo:

ModelTrained PairsNew Angle (9)New Pose (18)Time to Latent
U-Net0.0475±0.00180.1432±0.00100.1367±0.002815.5 ms
Oscillator model0.0481±0.00150.1354±0.00240.1314±0.002262.9 ms

While the oscillator model had slightly lower error on the new angles and the demo-side new poses, the difference on the remaining 18 new poses was 0.001 with overlapping ranges across the 3 runs, and visually comparing the outputs showed no distinguishable difference between the two models.