SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.07764 · 2024

Stable-Makeup: When Real-World Makeup Transfer Meets Diffusion Model

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2403.07764.json · badge: /api/ran/2403.07764.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Xiaojiu-z/Stable-Makeup canonical (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_noise Ran
ran; our contract draft was wrong, not the code
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py
code served (permissive licence) · get_code("149188d4856b3bdc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal scheduler mock that has the required attributes and methods
class MockSchedulerConfig:
    def __init__(self):
        self.num_train_timesteps = 1000
        self.clip_sample = True

class MockScheduler:
    def __init__(self):
        self.config = MockSchedulerConfig()
        self.num_inference_steps = 50
        # Create a small alphas_cumprod tensor with values between 0 and 1
        self.alphas_cumprod = torch.linspace(0.9999, 0.1, 1000)
        self.final_alpha_cumprod = 0.0
    
    def _get_variance(self, timestep, prev_timestep):
        # Return a small positive variance value
        return torch.tensor(0.01)

# Create small tensor arguments
prev_latents = torch.randn(2, 4)
latents = torch.randn(2, 4)
noise_pred = torch.randn(2, 4)

# Create scheduler instance
scheduler = MockScheduler()

# Set timestep to be in valid range (between num_inference_steps and num_train_timesteps)
timestep = 500

# eta parameter for noise computation
eta = 0.0

ARGS = {
    "scheduler": scheduler,
    "prev_latents": prev_latents,
    "latents": latents,
    "timestep": timestep,
    "noise_pred": noise_pred,
    "eta": eta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess_mask Ran
ran; our contract draft was wrong, not the code
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py
code served (permissive licence) · get_code("291c31214008a679")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ArrayImpl, ndim 4, dtype family float, shape (1, 1, 96, 96) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from PIL import Image
import jax.numpy as jnp
import numpy as np

# Create a simple PIL Image object with a size that's not a multiple of 32
# so we can test the rounding down logic
img_array = np.random.randint(0, 256, (100, 96, 3), dtype=np.uint8)
mask = Image.fromarray(img_array, mode='RGB')

# The function expects mask.size to return (w, h)
# and mask.resize() to work, and mask.convert('L') to convert to grayscale
# These are all standard PIL Image methods

dtype = jnp.float32

ARGS = {
    "mask": mask,
    "dtype": dtype,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 4, dtype family float, shape (1, 1, 96, 96) — shape (1, 1, 96, 96) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
renew_resnet_paths Ran
ran; our contract draft was wrong, not the code
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
code served (permissive licence) · get_code("dfb052a0af48540f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Define the function to be tested
def shave_segments(path, n_shave_prefix_segments=1):
    """
    Removes segments. Positive values shave the first segments, negative shave the last segments.
    """
    if n_shave_prefix_segments >= 0:
        return '.'.join(path.split('.')[n_shave_prefix_segments:])
    else:
        return '.'.join(path.split('.')[:n_shave_prefix_segments])

def renew_resnet_paths(old_list, n_shave_prefix_segments=0):
    """
    Updates paths inside resnets to the new naming scheme (local renaming)
    """
    mapping = []
    for old_item in old_list:
        new_item = old_item.replace('in_layers.0', 'norm1')
        new_item = new_item.replace('in_layers.2', 'conv1')
        new_item = new_item.replace('out_layers.0', 'norm2')
        new_item = new_item.replace('out_layers.3', 'conv2')
        new_item = new_item.replace('emb_layers.1', 'time_emb_proj')
        new_item = new_item.replace('skip_connection', 'conv_shortcut')
        new_item = shave_segments(new_item, n_shave_prefix_segments=n_shave_prefix_segments)
        mapping.append({'old': old_item, 'new': new_item})
    return mapping

# Construct valid arguments
ARGS = {
    'old_list': [
        'module.in_layers.0.weight',
        'module.in_layers.2.bias',
        'module.out_layers.0.weight',
        'module.out_layers.3.bias',
        'module.emb_layers.1.weight',
        'module.skip_connection.weight',
    ],
    'n_shave_prefix_segments': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
renew_vae_resnet_paths Ran
ran; our contract draft was wrong, not the code
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from tuananhbui89/Erasing-Adversarial-Preservation, is pointer only (licence: NONE) · get_code("c5ec9c13e456a046")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from tuananhbui89/Erasing-Adversarial-Preservation, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

shave_segments Ran
ran; our contract draft was wrong, not the code
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
code served (permissive licence) · get_code("cea0bc82e0c96896")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Analyzing the function:
# - path: string parameter that gets split by '.' and rejoined
# - n_shave_prefix_segments: int parameter that controls slicing behavior

ARGS = {
    'path': 'module.layer.weight.data.value',
    'n_shave_prefix_segments': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unshard Ran
ran, violated the contract we drafted
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yushuiwx/Mixture-of-LoRA-Experts, is pointer only (licence: NONE) · get_code("e75e95456d9039f5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from yushuiwx/Mixture-of-LoRA-Experts, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

posterior_sample Not yet run
unverified (harvested, no recorded run)
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py
code served (permissive licence) · get_code("d3de8e0f9e293d59")
How it ran

no invocation recorded.

preprocess Not yet run
unverified (harvested, no recorded run)
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py
code served (permissive licence) · get_code("107a1125408a883b")
How it ran

no invocation recorded.

preprocess_image Not yet run
unverified (harvested, no recorded run)
Xiaojiu-z/Stable-Makeup/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py
code served (permissive licence) · get_code("90abefb63ec10393")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 9 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
renew_resnet_paths 14 other papers
8 dated earlier, 6 later
2307.04725 (2023-07)
AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2311.03054 (2023-11)
AnyText: Multilingual Visual Text Generation And Editing
and 11 more not named here
shave_segments 14 other papers
8 dated earlier, 6 later
2307.04725 (2023-07)
AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2311.03054 (2023-11)
AnyText: Multilingual Visual Text Generation And Editing
and 11 more not named here
renew_vae_resnet_paths 11 other papers
7 dated earlier, 4 later
2307.04725 (2023-07)
AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2311.16933 (2023-11)
SparseCtrl: Adding Sparse Controls to Text-to-Video Diffusion Models
and 8 more not named here
preprocess 2 other papers
2 later
2407.14078 (2024-07)
Stable-Hair: Real-World Hair Transfer via Diffusion Model
2502.08590 (2025-02)
Light-A-Video: Training-free Video Relighting via Progressive Light Fusion
unshard 2 other papers
1 dated earlier, 1 later
2307.13269 (2023-07)
LoraHub: Efficient Cross-Task Generalization via Dynamic LoRA Composition
2407.14078 (2024-07)
Stable-Hair: Real-World Hair Transfer via Diffusion Model
compute_noise 1 other paper
1 later
2407.14078 (2024-07)
Stable-Hair: Real-World Hair Transfer via Diffusion Model
posterior_sample 1 other paper
1 later
2407.14078 (2024-07)
Stable-Hair: Real-World Hair Transfer via Diffusion Model
preprocess_image 1 other paper
1 later
2407.14078 (2024-07)
Stable-Hair: Real-World Hair Transfer via Diffusion Model
preprocess_mask 1 other paper
1 later
2407.14078 (2024-07)
Stable-Hair: Real-World Hair Transfer via Diffusion Model

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Current makeup transfer methods are limited to simple makeup styles, making them difficult to apply in real-world scenarios. In this paper, we introduce Stable-Makeup, a novel diffusion-based makeup transfer method capable of robustly transferring a wide range of real-world makeup, onto user-provided faces. Stable-Makeup is based on a pre-trained diffusion model and utilizes a Detail-Preserving (D-P) makeup encoder to encode makeup details. It also employs content and structural control modules to preserve the content and structural information of the source image. With the aid of our newly added makeup cross-attention layers in U-Net, we can accurately transfer the detailed makeup to the corresponding position in the source image. After content-structure decoupling training, Stable-Makeup can maintain content and the facial structure of the source image. Moreover, our method has demonstrated strong robustness and generalizability, making it applicable to varioustasks such as cross-domain makeup transfer, makeup-guided text-to-image generation and so on. Extensive experiments have demonstrated that our approach delivers state-of-the-art (SOTA) results among existing makeup transfer methods and exhibits a highly promising with broad potential applications in various related fields. Code released: https://github.com/Xiaojiu-z/Stable-Makeup

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2403.07764")
get_code_for_paper("2403.07764")
have("2403.07764")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2403.07764.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2403.07764.svg)](https://syntology.ai/paper/2403.07764)

Connect an agent — have() is free.