SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.11929 · 2024

DiLightNet: Fine-grained Lighting Control for Diffusion-based Image Generation

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 4 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/2402.11929.json · badge: /api/ran/2402.11929.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
iamNCJ/DiLightNet canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
FunctionStatusWhere it lives
depth_to_points Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iamNCJ/DiLightNet/demo/mesh_recon.py
code served (permissive licence) · get_code("aa54bd445660296c")
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 (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 numpy as np

# Create a small depth map with shape (batch=2, height=4, width=3)
depth = np.random.rand(2, 4, 3).astype(np.float32) * 5.0 + 0.5

# Create rotation matrix (identity)
R = np.eye(3, dtype=np.float32)

# Create translation vector
t = np.array([0.0, 0.0, 0.0], dtype=np.float32)

# Field of view parameter
fov = 55.0

ARGS = {
    "depth": depth,
    "R": R,
    "t": t,
    "fov": fov
}
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 (4, 3, 3) — shape (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_intrinsics Ran
ran, honoured the contract we drafted
iamNCJ/DiLightNet/demo/mesh_recon.py
code served (permissive licence) · get_code("eba145205efe651e")
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 (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 numpy as np

ARGS = {
    "H": 480,
    "W": 640,
    "fov": 55.0,
}
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 2, dtype family float, shape (3, 3) — shape (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
image_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iamNCJ/DiLightNet/train/train_controlnet.py
code served (permissive licence) · get_code("bd5a05ce886da4ce")
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 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.

from PIL import Image

# Create small test images with distinct dimensions
img1 = Image.new('RGB', size=(64, 48), color=(255, 0, 0))
img2 = Image.new('RGB', size=(64, 48), color=(0, 255, 0))
img3 = Image.new('RGB', size=(64, 48), color=(0, 0, 255))
img4 = Image.new('RGB', size=(64, 48), color=(255, 255, 0))

ARGS = {
    'imgs': [img1, img2, img3, img4],
    'rows': 2,
    'cols': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL — 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
load_single_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iamNCJ/DiLightNet/demo/mesh_recon.py
code served (permissive licence) · get_code("36c037b9ef9a254a")
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
import torchvision.transforms as tvf
import PIL.Image

# Create a small test image array
# PIL expects (height, width, channels) for RGB images
img_array = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)

ARGS = {
    "img_array": img_array
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torchvision — 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
import_model_class_from_model_name_or_path Not yet run
unverified (harvested, no recorded run)
iamNCJ/DiLightNet/train/train_controlnet.py
code served (permissive licence) · get_code("1f631e56c6e042ac")
How it ran

no invocation recorded.

render_bg_images Not yet run
unverified (harvested, no recorded run)
iamNCJ/DiLightNet/demo/render_hints.py
code served (permissive licence) · get_code("31d4afe7c533efe8")
How it ran

no invocation recorded.

render_hint_images Not yet run
unverified (harvested, no recorded run)
iamNCJ/DiLightNet/demo/render_hints.py
code served (permissive licence) · get_code("3ceae5c16daafb71")
How it ran

no invocation recorded.

render_hint_images_btn_func Not yet run
unverified (harvested, no recorded run)
iamNCJ/DiLightNet/demo/render_hints.py
code served (permissive licence) · get_code("16cec448a16f2b37")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 2 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
image_grid 17 other papers
6 dated earlier, 1 the same month, 9 later, 1 same year, order not determinable
2201.08896 (2022-01)
Environment Generation for Zero-Shot Compositional Reinforcement Learning
2303.09522 (2023-03)
P+: Extended Textual Conditioning in Text-to-Image Generation
2311.16518 (2023-11)
SeeSR: Towards Semantics-Aware Real-World Image Super-Resolution
and 14 more not named here
import_model_class_from_model_name_or_path 3 other papers
2 later, 1 same year, order not determinable
01705 (2024 (year only))
Pixel-Aware Stable Diffusion for Realistic Image Super-Resolution and Personalized Stylization
2407.04842 (2024-07)
MJ-Bench: Is Your Multimodal Reward Model Really a Good Judge for Text-to-Image Generation?
2408.06070 (2024-08)
ControlNeXt: Powerful and Efficient Control for Image and Video Generation

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

This paper presents a novel method for exerting fine-grained lighting control during text-driven diffusion-based image generation. While existing diffusion models already have the ability to generate images under any lighting condition, without additional guidance these models tend to correlate image content and lighting. Moreover, text prompts lack the necessary expressional power to describe detailed lighting setups. To provide the content creator with fine-grained control over the lighting during image generation, we augment the text-prompt with detailed lighting information in the form of radiance hints, i.e., visualizations of the scene geometry with a homogeneous canonical material under the target lighting. However, the scene geometry needed to produce the radiance hints is unknown. Our key observation is that we only need to guide the diffusion process, hence exact radiance hints are not necessary; we only need to point the diffusion model in the right direction. Based on this observation, we introduce a three stage method for controlling the lighting during image generation. In the first stage, we leverage a standard pretrained diffusion model to generate a provisional image under uncontrolled lighting. Next, in the second stage, we resynthesize and refine the foreground object in the generated image by passing the target lighting to a refined diffusion model, named DiLightNet, using radiance hints computed on a coarse shape of the foreground object inferred from the provisional image. To retain the texture details, we multiply the radiance hints with a neural encoding of the provisional synthesized image before passing it to DiLightNet. Finally, in the third stage, we resynthesize the background to be consistent with the lighting on the foreground object. We demonstrate and validate our lighting controlled diffusion model on a variety of text prompts and lighting conditions.

For agents

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

get_harvested_code_for_paper("2402.11929")
get_code_for_paper("2402.11929")
have("2402.11929")

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

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

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

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

Connect an agent — have() is free.