SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.08910 · 2021

Towards Open-World Text-Guided Face Image Generation and Manipulation

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 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/2104.08910.json · badge: /api/ran/2104.08910.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
weihaox/TediGAN canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
IIGROUP/TediGAN canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
build_generator Ran
ran; our contract draft was wrong, not the code
weihaox/TediGAN/base/models/helper.py
code served (permissive licence) · get_code("01ad09c8b01d79ee")
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 StyleGANGenerator. 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 torch.nn as nn
from unittest.mock import MagicMock

torch.manual_seed(0)

# Mock MODEL_POOL - the function checks if model_name is in MODEL_POOL
MODEL_POOL = {
    'styleganinv_256': 'styleganinv',
    'styleganinv_512': 'styleganinv',
}

# Mock the StyleGANGenerator class
class StyleGANGenerator(nn.Module):
    def __init__(self, model_name, logger=None):
        super().__init__()
        self.model_name = model_name
        self.logger = logger
        # Add minimal attributes/methods that might be used
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Mock logger
class MockLogger:
    def info(self, msg):
        pass
    
    def debug(self, msg):
        pass
    
    def warning(self, msg):
        pass
    
    def error(self, msg):
        pass

# Inject mocks into the module namespace for the function
import sys
current_module = sys.modules[__name__]
current_module.MODEL_POOL = MODEL_POOL
current_module.StyleGANGenerator = StyleGANGenerator

# Define arguments
ARGS = {
    'model_name': 'styleganinv_256',
    'logger': MockLogger()
}
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 StyleGANGenerator — a StyleGANGenerator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a StyleGANGenerator 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
get_temp_logger Ran
ran; our contract draft was wrong, not the code
weihaox/TediGAN/base/models/base_module.py
code served (permissive licence) · get_code("ff0d399a0317c249")
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 Logger. 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 logging
import sys

# The function get_temp_logger takes a single parameter: logger_name
# which is a string that should not be empty.
# Looking at the function body:
# - It checks if logger_name is empty and raises ValueError if so
# - It uses logger_name as the argument to logging.getLogger()
# - No other parameters are needed

ARGS = {
    'logger_name': 'test_logger'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
get_weight_path Ran
ran; our contract draft was wrong, not the code
weihaox/TediGAN/base/models/model_settings.py
code served (permissive licence) · get_code("5eb9fdaa872d49a6")
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 os
import tempfile

# Create a temporary directory to simulate MODEL_DIR
temp_dir = tempfile.mkdtemp()
MODEL_DIR = os.path.join(temp_dir, 'pretrain')
os.makedirs(MODEL_DIR, exist_ok=True)

# Test cases for get_weight_path
ARGS = {
    'weight_name': 'model_weights'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
run_on_batch Ran
ran; our contract draft was wrong, not the code
IIGROUP/TediGAN/ext/inference.py
code served (permissive licence) · get_code("4fa4fd0e38079888")
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) and returned tuple. 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 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
import numpy as np

torch.manual_seed(0)

class MockGenerator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(512, 256)
    
    def forward(self, inputs, randomize_noise=False, resize=False, return_latents=False, 
                input_code=False, latent_mask=None, inject_latent=None, alpha=0.5):
        # Handle input_code case
        if input_code:
            # inputs is a latent vector
            latent = self.linear(inputs)
            if return_latents:
                return latent, latent
            return latent
        
        # Normal case: inputs is an image batch
        batch_size = inputs.shape[0]
        result = torch.randn(batch_size, 3, 32, 32)
        latent = torch.randn(batch_size, 512)
        
        if return_latents:
            return result, latent
        return result

class MockOpts:
    def __init__(self):
        self.latent_mask = None
        self.resize_outputs = False
        self.mix_alpha = 0.5

# Create inputs - batch of 2 small images
inputs = torch.randn(2, 3, 32, 32)

# Create network
net = MockGenerator()

# Create options
opts = MockOpts()

ARGS = {
    "inputs": inputs,
    "net": net,
    "opts": opts
}
Setup block drafted by
a language model, Claude Haiku 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 tuple — a tuple output has no array shape of its own; none is 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
build_encoder Not yet run
unverified (harvested, no recorded run)
weihaox/TediGAN/base/models/helper.py
code served (permissive licence) · get_code("6bc5a9d2ae904282")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 1 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
get_temp_logger 3 other papers
3 dated earlier
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
1911.09267 (2019-11)
Semantic Hierarchy Emerges in Deep Generative Representations for Scene Synthesis
2004.00049 (2020-04)
In-Domain GAN Inversion for Real Image Editing
build_encoder 1 other paper
1 dated earlier
2004.00049 (2020-04)
In-Domain GAN Inversion for Real Image Editing
build_generator 1 other paper
1 dated earlier
2004.00049 (2020-04)
In-Domain GAN Inversion for Real Image Editing
get_weight_path 1 other paper
1 dated earlier
2004.00049 (2020-04)
In-Domain GAN Inversion for Real Image Editing

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

The existing text-guided image synthesis methods can only produce limited quality results with at most \mbox{$\text{256}^2$} resolution and the textual instructions are constrained in a small Corpus. In this work, we propose a unified framework for both face image generation and manipulation that produces diverse and high-quality images with an unprecedented resolution at 1024 from multimodal inputs. More importantly, our method supports open-world scenarios, including both image and text, without any re-training, fine-tuning, or post-processing. To be specific, we propose a brand new paradigm of text-guided image generation and manipulation based on the superior characteristics of a pretrained GAN model. Our proposed paradigm includes two novel strategies. The first strategy is to train a text encoder to obtain latent codes that align with the hierarchically semantic of the aforementioned pretrained GAN model. The second strategy is to directly optimize the latent codes in the latent space of the pretrained GAN model with guidance from a pretrained language model. The latent codes can be randomly sampled from a prior distribution or inverted from a given image, which provides inherent supports for both image generation and manipulation from multi-modal inputs, such as sketches or semantic labels, with textual guidance. To facilitate text-guided multi-modal synthesis, we propose the Multi-Modal CelebA-HQ, a large-scale dataset consisting of real face images and corresponding semantic segmentation map, sketch, and textual descriptions. Extensive experiments on the introduced dataset demonstrate the superior performance of our proposed method. Code and data are available at https://github.com/weihaox/TediGAN.

For agents

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

get_harvested_code_for_paper("2104.08910")
get_code_for_paper("2104.08910")
have("2104.08910")

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

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

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

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

Connect an agent — have() is free.