SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.11728 · 2021

BlendGAN: Implicitly GAN Blending for Arbitrary Stylized Face Generation

arXiv · PDF · Open in the Atlas

Code that ran

19 of 21 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; 1 honoured the contract we drafted, 1 violated it and 10 have no contract verdict; 7 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2110.11728.json · badge: /api/ran/2110.11728.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
onion-liu/BlendGAN canonical (classifier label)
classifier basis: plan_row
11 ran · 1 no recorded run
songquanpeng/BlendGAN community (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
all_gather Ran
ran on a synthesized input
songquanpeng/BlendGAN/distributed.py
code served (permissive licence) · get_code("ed03ba54397adbe4")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import pickle

torch.manual_seed(0)

# The function all_gather takes one parameter: data
# It should be something that can be pickled and unpickled
# We'll use a simple dictionary containing a tensor and some other data

data = {
    'tensor': torch.randn(2, 4),
    'value': 42,
    'string': 'test'
}

ARGS = {
    'data': data
}
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
calc_fid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
songquanpeng/BlendGAN/fid.py
pointer only (licence: MIT); the stored copy get_code serves, from seasonSH/LiftedGAN, is pointer only (licence: NONE) · get_code("e6c1de4697e7ed81")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from seasonSH/LiftedGAN, 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.

convert_conv Ran
ran; our contract draft was wrong, not the code
songquanpeng/BlendGAN/convert_weight.py
code served (permissive licence) · get_code("7fe245a7216ae67b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned dict. 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
import numpy as np

torch.manual_seed(0)

# Create a stand-in class for vars that mimics TensorFlow variable behavior
class MockTFVariable:
    def __init__(self, numpy_array):
        self._value = numpy_array
    
    def value(self):
        return self
    
    def eval(self):
        return self._value

class MockVarsDict:
    def __init__(self):
        self.data = {}
    
    def __getitem__(self, key):
        return self.data[key]
    
    def __setitem__(self, key, value):
        self.data[key] = value

# Create mock vars dictionary
vars_dict = MockVarsDict()

# Create weight tensor with shape (H, W, C_in, C_out) for TensorFlow convention
# Using distinct dimensions: height=3, width=5, in_channels=2, out_channels=4
weight_np = np.random.randn(3, 5, 2, 4).astype(np.float32)
vars_dict['conv_layer/weight'] = MockTFVariable(weight_np)

# Create bias tensor with shape (C_out,)
bias_np = np.random.randn(4).astype(np.float32)
vars_dict['conv_layer/bias'] = MockTFVariable(bias_np)

ARGS = {
    'vars': vars_dict,
    'source_name': 'conv_layer',
    'target_name': 'model.conv',
    'bias': True,
    'start': 0
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
convert_modconv Ran
ran; our contract draft was wrong, not the code
songquanpeng/BlendGAN/convert_weight.py
code served (permissive licence) · get_code("1c7cd5abc48bcf75")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned dict. 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
import numpy as np

torch.manual_seed(0)

# Create a stand-in class that mimics TensorFlow variable behavior
class TFVariable:
    def __init__(self, data):
        self.data = data
    
    def value(self):
        return self
    
    def eval(self):
        return self.data

# Create mock variables dictionary with the required keys
# The function expects TensorFlow-style variables with .value().eval() chain

# weight shape: (H, W, in_channels, out_channels) in TensorFlow format
weight_data = np.random.randn(3, 3, 5, 7).astype(np.float32)

# mod_weight shape: (in_features, out_features) in TensorFlow format
mod_weight_data = np.random.randn(6, 5).astype(np.float32)

# mod_bias shape: (out_features,)
mod_bias_data = np.random.randn(5).astype(np.float32)

# noise_strength: scalar
noise_data = np.array(0.5, dtype=np.float32)

# bias shape: (out_channels,)
bias_data = np.random.randn(7).astype(np.float32)

vars_dict = {
    'source_layer/weight': TFVariable(weight_data),
    'source_layer/mod_weight': TFVariable(mod_weight_data),
    'source_layer/mod_bias': TFVariable(mod_bias_data),
    'source_layer/noise_strength': TFVariable(noise_data),
    'source_layer/bias': TFVariable(bias_data)
}

ARGS = {
    'vars': vars_dict,
    'source_name': 'source_layer',
    'target_name': 'target_layer',
    'flip': True
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
convert_torgb Ran
ran; our contract draft was wrong, not the code
songquanpeng/BlendGAN/convert_weight.py
code served (permissive licence) · get_code("96b279b9ef818d94")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned dict. 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
import numpy as np

torch.manual_seed(0)

class MockTensorValue:
    def __init__(self, array):
        self.array = array
    
    def value(self):
        return self
    
    def eval(self):
        return self.array

# Create mock variables dictionary
# The function expects vars to have keys like 'source_name/weight', 'source_name/mod_weight', etc.
# Each value should have .value().eval() methods that return numpy arrays

# Define shapes based on typical StyleGAN ToRGB layer:
# - weight: (H, W, in_channels, out_channels) = (1, 1, 5, 3) for RGB output
# - mod_weight: (in_channels, style_dim) = (5, 7)
# - mod_bias: (in_channels,) = (5,)
# - bias: (out_channels,) = (3,) for RGB

weight_array = np.random.randn(1, 1, 5, 3).astype(np.float32)
mod_weight_array = np.random.randn(5, 7).astype(np.float32)
mod_bias_array = np.random.randn(5).astype(np.float32)
bias_array = np.random.randn(3).astype(np.float32)

vars_dict = {
    'my_source/weight': MockTensorValue(weight_array),
    'my_source/mod_weight': MockTensorValue(mod_weight_array),
    'my_source/mod_bias': MockTensorValue(mod_bias_array),
    'my_source/bias': MockTensorValue(bias_array)
}

source_name = 'my_source'
target_name = 'my_target'

ARGS = {
    'vars': vars_dict,
    'source_name': source_name,
    'target_name': target_name
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
cv2ten Ran
ran on a synthesized input
onion-liu/BlendGAN/utils.py
code served (permissive licence) · get_code("ef82a9da38de6627")
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 4, dtype family float, shape (1, 3, 4, 3) 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 numpy as np

torch.manual_seed(0)

# Create a small dummy image in OpenCV format (HxWxC, BGR, uint8)
# Height=4, Width=3, Channels=3
img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

device = torch.device('cpu')

ARGS = {
    'img': img,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 4, 3) — shape (1, 3, 4, 3) 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
extract_features Ran
ran on a synthesized input
songquanpeng/BlendGAN/calc_inception.py
code served (permissive licence) · get_code("826a4bfd8b5cb2fc")
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 (6, 8) 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 inception model that returns a tuple with a tensor
class MiniInception(nn.Module):
    def __init__(self):
        super().__init__()
        # Simple conv layer to process input
        self.conv = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.pool = nn.AdaptiveAvgPool2d((1, 1))
    
    def forward(self, x):
        # x shape: (batch, 3, H, W)
        x = self.conv(x)  # (batch, 8, H, W)
        x = self.pool(x)  # (batch, 8, 1, 1)
        # Return as tuple with first element being the feature tensor
        return (x,)

# Create a data loader - list of batches (just image tensors)
# The function iterates over loader and treats each item as img
batch_size = 2
num_batches = 3
image_height = 4
image_width = 4
num_channels = 3

loader = [
    torch.randn(batch_size, num_channels, image_height, image_width)
    for _ in range(num_batches)
]

# Create the inception model
inception = MiniInception()

# Set device to CPU
device = 'cpu'

ARGS = {
    'loader': loader,
    'inception': inception,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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 (6, 8) — shape (6, 8) 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
fused_leaky_relu Ran
ran on a synthesized input
onion-liu/BlendGAN/op/fused_act.py
code served (permissive licence) · get_code("fe59e9e831c5c641")
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 4, dtype family float, shape (2, 4, 3, 3) 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 small tensors for testing
# input: (batch_size, channels, height, width) = (2, 4, 3, 3)
input_tensor = torch.randn(2, 4, 3, 3, requires_grad=True)

# bias: (channels,) = (4,)
bias_tensor = torch.randn(4, requires_grad=True)

# negative_slope: small positive float
negative_slope = 0.2

# scale: positive float
scale = 2 ** 0.5

ARGS = {
    'input': input_tensor,
    'bias': bias_tensor,
    'negative_slope': negative_slope,
    'scale': scale,
}
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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) 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
get_alphas Ran
ran on a synthesized input
onion-liu/BlendGAN/gen_video.py
code served (permissive licence) · get_code("380e205f2b8ababc")
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 numpy as np

ARGS = {
    "start": -5,
    "end": 5,
    "step": 0.5,
    "len_tail": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
gram_matrix Ran
ran; our contract draft was wrong, not the code
onion-liu/BlendGAN/model_encoder.py
pointer only (licence: MIT); the stored copy get_code serves, from davidpengucf/SFDAHPE, is pointer only (licence: NONE) · get_code("430c582cd8bbb1df")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from davidpengucf/SFDAHPE, 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.

make_kernel Ran
ran, violated the contract we drafted
onion-liu/BlendGAN/model.py
pointer only (licence: MIT); the stored copy get_code serves, from dkn16/multi-fidel-gan-21cm, is pointer only (licence: NOASSERTION) · get_code("6f65e378a4313f87")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from dkn16/multi-fidel-gan-21cm, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

reduce_loss_dict Ran
ran on a synthesized input
songquanpeng/BlendGAN/distributed.py
code served (permissive licence) · get_code("5144ad456049f8ce")
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 dict. 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
from torch import distributed as dist

torch.manual_seed(0)

# Create a sample loss_dict with tensor values
# The function iterates over keys, stacks values, and performs distributed operations
loss_dict = {
    'loss_classifier': torch.tensor(0.5),
    'loss_box_reg': torch.tensor(0.3),
    'loss_objectness': torch.tensor(0.2),
}

ARGS = {
    'loss_dict': loss_dict,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
reduce_sum Ran
ran, honoured the contract we drafted
songquanpeng/BlendGAN/distributed.py
code served (permissive licence) · get_code("3f0a1105ef251d78")
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
from torch import distributed as dist

torch.manual_seed(0)

# The function takes a single parameter: tensor
# It calls .clone() on it and passes it to dist.all_reduce()
# So we need a torch.Tensor

tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
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
scale_image Ran
ran on a synthesized input
onion-liu/BlendGAN/BlendGANGUI.py
code served (permissive licence) · get_code("d6ed19bb4dc739d3")
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 ndarray, ndim 3, dtype family int, shape (3, 4, 3) 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 cv2
import numpy as np

# Create a small test image with shape (height, width, channels)
# Using distinct dimensions: height=6, width=8, channels=3
img = np.random.randint(0, 256, (6, 8, 3), dtype=np.uint8)

# Scale factor
scale_factor = 2

ARGS = {
    'img': img,
    'scale_factor': scale_factor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (3, 4, 3) — shape (3, 4, 3) 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
sigmoid Ran
ran on a synthesized input
onion-liu/BlendGAN/gen_video.py
code served (permissive licence) · get_code("8b483042fac3893a")
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 ndarray, ndim 1, dtype family float, shape (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 numpy as np

# The function sigmoid takes two parameters:
# - x: a numeric value or array
# - w: a weight parameter with default value 1

# Create a small numpy array for x
x = np.array([0.0, 1.0, -1.0, 2.0])

# Create a scalar weight parameter
w = 1.0

ARGS = {
    "x": x,
    "w": w
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
slide Ran
ran on a synthesized input
onion-liu/BlendGAN/gen_video.py
code served (permissive licence) · get_code("b01b40e47c0ad0a0")
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 4, dtype family float, shape (31, 3, 8, 40) 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 numpy as np

torch.manual_seed(0)

# Create two reference images: x_prev and x_next
# Shape: (1, 3, H, W) where H=4, W=8
x_prev = torch.randn(1, 3, 4, 8)
x_next = torch.randn(1, 3, 4, 8)

entries = [x_prev, x_next]
margin = 32

ARGS = {
    "entries": entries,
    "margin": margin,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (31, 3, 8, 40) — shape (31, 3, 8, 40) 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
ten2cv Ran
ran on a synthesized input
onion-liu/BlendGAN/utils.py
code served (permissive licence) · get_code("b8061c98786922f3")
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 ndarray, ndim 3, dtype family int, shape (4, 5, 3) 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

torch.manual_seed(0)

# Create a small image tensor
# Shape: (batch, channels, height, width) = (1, 3, 4, 5)
# Values in range [-1, 1] as expected by the function (mul 0.5, add 0.5 transforms to [0, 1])
img_ten = torch.randn(1, 3, 4, 5) * 0.5

ARGS = {
    'img_ten': img_ten,
    'bgr': True
}
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 ndarray, ndim 3, dtype family int, shape (4, 5, 3) — shape (4, 5, 3) 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
upfirdn2d Ran
ran; our contract draft was wrong, not the code
onion-liu/BlendGAN/op/upfirdn2d.py
code served (permissive licence) · get_code("0282bebb07512369")
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 4, dtype family float, shape (2, 3, 2, 2) 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.functional as F

torch.manual_seed(0)

# Create minimal valid arguments for upfirdn2d function
input_tensor = torch.randn(2, 3, 4, 4)  # (batch, channel, height, width)
kernel = torch.randn(3, 3)  # (kernel_h, kernel_w)
up = 1
down = 1
pad = (0, 0)

ARGS = {
    'input': input_tensor,
    'kernel': kernel,
    'up': up,
    'down': down,
    'pad': pad
}
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 4, dtype family float, shape (2, 3, 2, 2) — shape (2, 3, 2, 2) 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
upfirdn2d_native Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
onion-liu/BlendGAN/op/upfirdn2d.py
pointer only (licence: MIT); the stored copy get_code serves, from koushiksrivats/face_attribute_attack, is pointer only (licence: NONE) · get_code("fe99cfd294676edb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from koushiksrivats/face_attribute_attack, 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.

extract_feature_from_samples Not yet run
unverified (harvested, no recorded run)
songquanpeng/BlendGAN/fid.py
code served (permissive licence) · get_code("7284618ab4d5847d")
How it ran

no invocation recorded.

image_align Not yet run
unverified (harvested, no recorded run)
onion-liu/BlendGAN/ffhq_dataset/face_alignment.py
code served (permissive licence) · get_code("95abe150acbe2d3f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 15 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 2 the same month, 10 later) and 6 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
make_kernel 40 other papers
17 dated earlier, 23 later · 10 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
and 37 more not named here
reduce_sum 14 other papers
5 dated earlier, 9 later
1910.05852 (2019-10)
Implicit competitive regularization in GANs
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
and 11 more not named here
all_gather 13 other papers
5 dated earlier, 8 later
1910.05852 (2019-10)
Implicit competitive regularization in GANs
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
and 10 more not named here
reduce_loss_dict 13 other papers
5 dated earlier, 8 later
1910.05852 (2019-10)
Implicit competitive regularization in GANs
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
and 10 more not named here
upfirdn2d_native 11 other papers
4 dated earlier, 7 later · 5 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
2104.06820 (2021-04)
Few-shot Image Generation via Cross-domain Correspondence
and 8 more not named here
gram_matrix 9 other papers
7 dated earlier, 2 later
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1607.08022 (2016-07)
Instance Normalization: The Missing Ingredient for Fast Stylization
and 6 more not named here
extract_features 6 other papers
4 dated earlier, 2 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
2105.14230 (2021-05)
Transforming the Latent Space of StyleGAN for Real Face Editing
and 3 more not named here
calc_fid 5 other papers
5 dated earlier
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
2011.13126 (2020-11)
Lifting 2D StyleGAN for 3D-Aware Face Generation
and 2 more not named here
convert_conv 4 other papers
4 dated earlier
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
and 1 more not named here
convert_modconv 4 other papers
4 dated earlier
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
and 1 more not named here
convert_torgb 4 other papers
4 dated earlier
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
and 1 more not named here
extract_feature_from_samples 3 other papers
3 dated earlier
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
get_alphas 2 other papers
1 the same month, 1 later
2110.04176 (2021-10)
PHNNs: Lightweight Neural Networks via Parameterized Hypercomplex Convolutions
2203.09301 (2022-03)
One-Shot Adaptation of GAN in Just One CLIP
sigmoid 2 other papers
1 the same month, 1 later
2110.04176 (2021-10)
PHNNs: Lightweight Neural Networks via Parameterized Hypercomplex Convolutions
2203.09301 (2022-03)
One-Shot Adaptation of GAN in Just One CLIP
upfirdn2d 2 other papers
2 later
2203.07319 (2022-03)
GCFSR: a Generative and Controllable Face Super Resolution Method Without Facial and GAN Priors
2303.16491 (2023-03)
Implicit Diffusion Models for Continuous Super-Resolution

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-23.

Repositories linked to this paper

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

Abstract

Generative Adversarial Networks (GANs) have made a dramatic leap in high-fidelity image synthesis and stylized face generation. Recently, a layer-swapping mechanism has been developed to improve the stylization performance. However, this method is incapable of fitting arbitrary styles in a single model and requires hundreds of style-consistent training images for each style. To address the above issues, we propose BlendGAN for arbitrary stylized face generation by leveraging a flexible blending strategy and a generic artistic dataset. Specifically, we first train a self-supervised style encoder on the generic artistic dataset to extract the representations of arbitrary styles. In addition, a weighted blending module (WBM) is proposed to blend face and style representations implicitly and control the arbitrary stylization effect. By doing so, BlendGAN can gracefully fit arbitrary styles in a unified model while avoiding case-by-case preparation of style-consistent training images. To this end, we also present a novel large-scale artistic face dataset AAHQ. Extensive experiments demonstrate that BlendGAN outperforms state-of-the-art methods in terms of visual quality and style diversity for both latent-guided and reference-guided stylized face synthesis.

For agents

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

get_harvested_code_for_paper("2110.11728")
get_code_for_paper("2110.11728")
have("2110.11728")

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

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

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

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

Connect an agent — have() is free.