future: transparency / alpha-channel image diffusion #20
Labels
No labels
NaNs
area/backup
area/data
area/diffusion
area/docs
area/dsh
area/eval
area/forgejo
area/host
area/infra
area/model
area/security
area/train
needs-operator
priority/later
priority/next
priority/now
type/bug
type/docs
type/experiment
type/feature
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ml-lab/wink#20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Operator idea for later: generate images with an alpha channel, not just RGB. That is a real gap in small image-generation models and a natural extension of the pixel-space denoiser.
Why it fits WINK:
in_channels); RGBA would be 4.Open design questions:
No implementation yet. Keep this as a scoped M3 idea after the current CIFAR/M2 work; do not start before the RGB capacity/level questions are settled.
Design note on how WINK encodes values today (to save you reading the code first):
[B, C, H, W], normalised to [-1, 1]. RGB is just 3 real channels.PatchEmbedflattens each 4x4 patch toC*4*4real values, then a realnn.Linearmaps them ton_embd * hyper_dim * 2reals andview_as_complexpacks them. So the complex/hypercomplex axes live after a learned projection; the raw RGB channels are not packed into complex components per pixel.in_channels=4at the data/patch level; alpha is a fourth real channel and the loss/sampler can treat it like RGB (with optional alpha weighting). No algebra change required.Your "2 complex values or one quaternion per pixel" idea is a different (and interesting) encoding: map RGB into the real part and alpha into the imaginary part of one complex value (or pack RGBA into one quaternion at level 2). That is a per-pixel channel encoding, not what the current patch projection does. It would need a custom patch embed and a decision about alpha range: alpha in [0,1] vs RGB in [-1,1], straight vs premultiplied alpha.
Suggested first alpha step when we get there: keep the current real-channel encoding,
in_channels=4, and measure RGB FID + alpha IoU/MAE + composited-background FID. The quaternion-per-pixel encoding is a second, more invasive experiment. No action now.First implementation landed (0.1 path):
wsample --alpharenders white ink on transparent RGBA + a checkerboard preview.docs/scripts/mnist_to_alpha.pyexports the real MNIST split as RGBA PNGs (no GIMP, no manual edits).docs/assets/mnist/alpha_digits_preview.png; real-data sheet:docs/assets/mnist/mnist_alpha_real_100.png.This closes the "how do we make alpha MNIST" question for 0.1. The issue stays open for the later, genuinely new thing: RGBA colour+alpha diffusion (issue title), where alpha is not just grayscale ink. The JS toy is tracked separately.