SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.14191 · 2023

SketchDreamer: Interactive Text-Augmented Creative Sketch Ideation

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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, 2 violated it and 2 have no contract verdict; 5 failures of our instrument; 1 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/2308.14191.json · badge: /api/ran/2308.14191.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
winkawaks/sketchdreamer canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
convert_to_grayscale Ran
ran, violated the contract we drafted
winkawaks/sketchdreamer/painterly_rendering.py
code served (permissive licence) · get_code("66f70c7814190f31")
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 float, shape (1, 4, 5) 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 expects im_as_arr to be a numpy array
# Looking at the function body:
# - np.sum(np.abs(im_as_arr), axis=0) is called, so it needs at least 2 dimensions
# - The result is used with np.percentile, np.clip, and np.expand_dims
# - axis=0 is summed over, so we need at least that dimension
# - The function returns an expanded array

# Create a small test image array with shape (3, 4, 5)
# This represents 3 channels, 4x5 spatial dimensions
im_as_arr = np.random.rand(3, 4, 5)

ARGS = {
    "im_as_arr": im_as_arr
}
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 3, dtype family float, shape (1, 4, 5) — shape (1, 4, 5) 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
cos_layers Ran
ran; our contract draft was wrong, not the code
winkawaks/sketchdreamer/models/loss.py
code served (permissive licence) · get_code("44940c05f6245895")
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

torch.manual_seed(0)

# Create small feature tensors for two models
# Shape: (batch_size=2, feature_dim=4)
xs_conv_features = [
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4)
]

ys_conv_features = [
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4)
]

# Test with both RN and non-RN model names
clip_model_name_rn = "RN50"
clip_model_name_vit = "ViT-B/32"

ARGS = {
    "xs_conv_features": xs_conv_features,
    "ys_conv_features": ys_conv_features,
    "clip_model_name": clip_model_name_vit
}
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
fix_image_scale Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
winkawaks/sketchdreamer/sketch_utils.py
code served (permissive licence) · get_code("2a729f02c74a7ad0")
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 Image. 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 numpy as np
from PIL import Image

# Create a small test image (4x3 RGB image)
img_array = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)
test_image = Image.fromarray(img_array)

ARGS = {
    "im": test_image,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
gradCAM Ran
ran; our contract draft was wrong, not the code
winkawaks/sketchdreamer/models/painter_params.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ayanban011/svgcraft, is pointer only (licence: NONE) · get_code("188456eee49a9baf")
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 ayanban011/svgcraft, 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.

interpret Ran
ran; our contract draft was wrong, not the code
winkawaks/sketchdreamer/models/painter_params.py
code served (permissive licence) · get_code("5a90146b8021ad22")
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 2, dtype family float, shape (14, 14) 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
import numpy as np

torch.manual_seed(0)

# Build a minimal args object with required attributes
class Args:
    def __init__(self):
        self.image_scale = (14, 14)

args = Args()

# Create a minimal image tensor (batch=1, channels=3, height=224, width=224)
image = torch.randn(1, 3, 224, 224)

# Create minimal texts (can be a list of strings)
texts = ["a cat", "a dog"]

# Build a minimal CLIP-like model with the required structure
class MinimalAttnBlock(nn.Module):
    def __init__(self, num_heads=4, seq_len=50):
        super().__init__()
        self.num_heads = num_heads
        self.seq_len = seq_len
        # Store attention probs as a buffer so they persist
        self.register_buffer('attn_probs', torch.randn(1, num_heads, seq_len, seq_len))
    
    def forward(self, x):
        return x

class MinimalVisualTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        self.resblocks = nn.ModuleDict({
            'block_0': MinimalAttnBlock(num_heads=4, seq_len=50),
            'block_1': MinimalAttnBlock(num_heads=4, seq_len=50),
            'block_2': MinimalAttnBlock(num_heads=4, seq_len=50),
        })

class MinimalVisual(nn.Module):
    def __init__(self):
        super().__init__()
        self.transformer = MinimalVisualTransformer()

class MinimalCLIPModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.visual = MinimalVisual()
    
    def encode_image(self, images):
        # Just return a dummy encoding
        return torch.randn(1, 512)

model = MinimalCLIPModel()

device = torch.device('cpu')

ARGS = {
    'args': args,
    'image': image,
    'texts': texts,
    'model': model,
    '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 ndarray, ndim 2, dtype family float, shape (14, 14) — shape (14, 14) 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
l1_layers Ran
ran on a synthesized input
winkawaks/sketchdreamer/models/loss.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ayanban011/svgcraft, is pointer only (licence: NONE) · get_code("b904dcd060391f9c")
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 ayanban011/svgcraft, 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.

l2_layers Ran
ran on a synthesized input
winkawaks/sketchdreamer/models/loss.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ayanban011/svgcraft, is pointer only (licence: NONE) · get_code("3aa37678e56ebdb0")
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 ayanban011/svgcraft, 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.

multi_head_attention_forward Ran
ran; our contract draft was wrong, not the code
winkawaks/sketchdreamer/CLIP_/clip/auxilary.py
code served (permissive licence) · get_code("bc3ccaf78ecd6394")
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 tuple. 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.functional as F

torch.manual_seed(0)

# Set up dimensions
embed_dim = 8
num_heads = 2
head_dim = embed_dim // num_heads
tgt_len = 3
src_len = 3
bsz = 2

# Create query, key, value tensors
# Shape: (seq_len, batch_size, embed_dim)
query = torch.randn(tgt_len, bsz, embed_dim)
key = torch.randn(src_len, bsz, embed_dim)
value = torch.randn(src_len, bsz, embed_dim)

# Create projection weights and biases
# in_proj_weight combines q, k, v projections: shape (3 * embed_dim, embed_dim)
in_proj_weight = torch.randn(3 * embed_dim, embed_dim)
in_proj_bias = torch.randn(3 * embed_dim)

# Output projection weights and biases
out_proj_weight = torch.randn(embed_dim, embed_dim)
out_proj_bias = torch.randn(embed_dim)

# Optional bias tensors for key and value
bias_k = None
bias_v = None

# Key padding mask - shape (batch_size, src_len)
key_padding_mask = torch.zeros(bsz, src_len, dtype=torch.bool)

# Attention mask - shape (tgt_len, src_len)
attn_mask = torch.zeros(tgt_len, src_len, dtype=torch.float32)

# Static k and v (for incremental decoding)
static_k = None
static_v = None

# Separate projection weights (not used in this case)
q_proj_weight = None
k_proj_weight = None
v_proj_weight = None

ARGS = {
    'query': query,
    'key': key,
    'value': value,
    'embed_dim_to_check': embed_dim,
    'num_heads': num_heads,
    'in_proj_weight': in_proj_weight,
    'in_proj_bias': in_proj_bias,
    'bias_k': bias_k,
    'bias_v': bias_v,
    'add_zero_attn': False,
    'dropout_p': 0.0,
    'out_proj_weight': out_proj_weight,
    'out_proj_bias': out_proj_bias,
    'training': True,
    'key_padding_mask': key_padding_mask,
    'need_weights': True,
    'attn_mask': attn_mask,
    'use_separate_proj_weight': False,
    'q_proj_weight': q_proj_weight,
    'k_proj_weight': k_proj_weight,
    'v_proj_weight': v_proj_weight,
    'static_k': static_k,
    'static_v': static_v,
    'attention_probs_forward_hook': None,
    'attention_probs_backwards_hook': None,
}
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 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
str_to_bool Ran
ran, violated the contract we drafted
winkawaks/sketchdreamer/config.py
code served (permissive licence) · get_code("10ebc4ca56bae3c2")
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 bool, ndim 0, dtype family float, shape () 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.

ARGS = {
    'value': 'true'
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 bool, ndim 0, dtype family float, shape () — shape () 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
build_model Not yet run
unverified (harvested, no recorded run)
winkawaks/sketchdreamer/CLIP_/clip/model.py
code served (permissive licence) · get_code("7ecaa1ab867d461d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 7 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 5 later) and 3 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
build_model 119 other papers
32 dated earlier, 4 the same month, 78 later, 3 same year, order not determinable, 2 undated
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2104.14294 (2021-04)
Emerging Properties in Self-Supervised Vision Transformers
and 116 more not named here
l2_layers 2 other papers
2 later
aaai_27987 (2024 (year only))
Optimize & Reduce: A Top-Down Approach for Image Vectorization
2404.00412 (2024-04)
CraftSVG: Multi-Object Text-to-SVG Synthesis via Layout Guided Diffusion
fix_image_scale 1 other paper
1 dated earlier
2306.14685 (2023-06)
DiffSketcher: Text Guided Vector Sketch Synthesis through Latent Diffusion Models
gradCAM 1 other paper
1 later
2404.00412 (2024-04)
CraftSVG: Multi-Object Text-to-SVG Synthesis via Layout Guided Diffusion
l1_layers 1 other paper
1 later
2404.00412 (2024-04)
CraftSVG: Multi-Object Text-to-SVG Synthesis via Layout Guided Diffusion
multi_head_attention_forward 1 other paper
1 later
2407.14412 (2024-07)
DEAL: Disentangle and Localize Concept-level Explanations for VLMs
str_to_bool 1 other paper
1 dated earlier
2112.08654 (2021-12)
Learning to Prompt for Continual Learning

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

Artificial Intelligence Generated Content (AIGC) has shown remarkable progress in generating realistic images. However, in this paper, we take a step "backward" and address AIGC for the most rudimentary visual modality of human sketches. Our objective is on the creative nature of sketches, and that creative sketching should take the form of an interactive process. We further enable text to drive the sketch ideation process, allowing creativity to be freely defined, while simultaneously tackling the challenge of "I can't sketch". We present a method to generate controlled sketches using a text-conditioned diffusion model trained on pixel representations of images. Our proposed approach, referred to as SketchDreamer, integrates a differentiable rasteriser of Bezier curves that optimises an initial input to distil abstract semantic knowledge from a pretrained diffusion model. We utilise Score Distillation Sampling to learn a sketch that aligns with a given caption, which importantly enable both text and sketch to interact with the ideation process. Our objective is to empower non-professional users to create sketches and, through a series of optimisation processes, transform a narrative into a storyboard by expanding the text prompt while making minor adjustments to the sketch input. Through this work, we hope to aspire the way we create visual content, democratise the creative process, and inspire further research in enhancing human creativity in AIGC. The code is available at \url{https://github.com/WinKawaks/SketchDreamer}.

For agents

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

get_harvested_code_for_paper("2308.14191")
get_code_for_paper("2308.14191")
have("2308.14191")

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

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

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

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

Connect an agent — have() is free.