| CocoSegmentationMaskEmbedder |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("80c21d2438a32b0e") How it ranRan 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 an instance of its own class, CocoSegmentationMaskEmbedder: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np
torch.manual_seed(0)
ARGS = {}
- 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 CocoSegmentationMaskEmbedder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CocoSegmentationMaskEmbedder 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
|
| Contrast |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("e9eafb1566e6b410") How it ranRan 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 an instance of its own class, Contrast: the run constructed the object and did not call it, so no result was computed. 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 nn
torch.manual_seed(0)
# Create tiny test tensors
# Image tensor: normalized, shape (2, 3, 4, 4) for batch of 2, 3 channels, 4x4 spatial
image = torch.randn(2, 3, 4, 4) * 0.2 + 0.5 # roughly in [0, 1] range after unnormalization
image = torch.clamp(image, 0, 1)
# Mask tensor: shape (2, 4, 4) for batch of 2, 4x4 spatial
mask = torch.randint(0, 2, (2, 4, 4)).float()
ARGS = {
'min_factor': 0.5,
'max_factor': 1.5
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Contrast — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Contrast 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
|
| Crop |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("01cf303cd45363e0") How it ranRan 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 an instance of its own class, Crop: the run constructed the object and did not call it, so no result was computed. 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 nn
torch.manual_seed(0)
# Create sample image and mask tensors
# Image: (batch=2, channels=3, height=4, width=5)
image = torch.randn(2, 3, 4, 5)
# Mask: same spatial dimensions as image
mask = torch.randn(2, 1, 4, 5)
ARGS = {
'min_size': 0.5,
'max_size': 0.9,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Crop — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Crop 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
|
| CustomMaskEmbedder |
Ran ran on a synthesized input |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("06b45d2bcb7006fd") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned list, ndim 3, 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
INIT_ARGS = {}
METHOD = 'generate_rectangle_masks'
ARGS = {
'num_masks': 5,
'num_rectangles': 2,
'image_size': 32,
'min': 0.2,
'max': 0.8
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 3, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| DepthWiseSeperableConv |
Ran ran on a synthesized input · constructed an object; no result was computed |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("5802352d3cfc6757") How it ranRan 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 an instance of its own class, DepthWiseSeperableConv: the run constructed the object and did not call it, so no result was computed. 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
torch.manual_seed(0)
# Define ARGS dict with all parameters for DepthWiseSeperableConv
ARGS = {
'in_dim': 4,
'out_dim': 8,
'kernel_size': 3,
'padding': 1,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DepthWiseSeperableConv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DepthWiseSeperableConv 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
|
| DumbAreaMaskEmbedder |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("0586a3f60f44d1f6") How it ranRan 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 an instance of its own class, DumbAreaMaskEmbedder: the run constructed the object and did not call it, so no result was computed. 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 math
import numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Create a small test image (C, H, W format)
# Using distinct dimensions: 3 channels, 4 height, 5 width
test_image = np.random.rand(3, 4, 5).astype(np.float32)
# Create ARGS dict with all parameters for DumbAreaMaskEmbedder.__init__
ARGS = {
"is_training": True,
}
- 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 DumbAreaMaskEmbedder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DumbAreaMaskEmbedder 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
|
| Embedder |
Ran ran on a synthesized input |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("219f742447bb98ef") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned ellipsis. 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 nn
class Embedder(nn.Module):
"""
Abstract class for watermark embedding.
"""
def __init__(self) -> None:
super(Embedder, self).__init__()
def get_random_msg(self, bsz: int=1, nb_repetitions=1) -> torch.Tensor:
"""
Generate a random message
"""
msg_len = 4 # Small distinct size for message length
return torch.randint(0, 2, (bsz, msg_len * nb_repetitions))
def get_last_layer(self) -> torch.Tensor:
return None
def forward(self, imgs: torch.Tensor, msgs: torch.Tensor) -> torch.Tensor:
"""
Args:
imgs: (torch.Tensor) Batched images with shape BxCxHxW
msgs: (torch.Tensor) Batched messages with shape BxL, or empty tensor.
Returns:
The watermarked images.
"""
return imgs # Identity for testing setup
# Setup code
INIT_ARGS = {}
ARGS = {
'imgs': torch.randn(2, 3, 8, 8), # B=2, C=3, H=8, W=8
'msgs': torch.randint(0, 2, (2, 4)) # B=2, L=4
}
# Construct and call
embedder = Embedder(**INIT_ARGS)
output = embedder(**ARGS)
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ellipsis — a ellipsis output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ellipsis 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| Extractor |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("e3ec9af8c9ef9bee") How it ranRan 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 an instance of its own class, Extractor: the run constructed the object and did not call it, so no result was computed. 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 nn
torch.manual_seed(0)
class SimpleExtractor(nn.Module):
"""
Concrete implementation of Extractor for testing.
"""
def __init__(self) -> None:
super(SimpleExtractor, self).__init__()
self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
self.conv2 = nn.Conv2d(16, 1, kernel_size=3, padding=1)
def forward(self, imgs: torch.Tensor) -> torch.Tensor:
"""
Args:
imgs: (torch.Tensor) Batched images with shape BxCxHxW
Returns:
The predicted masks and/or messages.
"""
x = torch.relu(self.conv1(imgs))
x = self.conv2(x)
return x
ARGS = {}
- 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 Extractor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Extractor 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
|
| FFC |
Ran ran on a synthesized input · constructed an object; no result was computed |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("883a16a7d30049e6") How it ranRan 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 an instance of its own class, FFC: the run constructed the object and did not call it, so no result was computed. 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
torch.manual_seed(0)
# Define a minimal stand-in for the incomplete FFC class signature
# We need to construct arguments that would work for FFC's __init__
ARGS = {
'in_channels': 3,
'out_channels': 16,
'kernel_size': 3,
'ratio_gin': 0.5,
'ratio_gout': 0.5,
'stride': 1,
'padding': 1,
'dilation': 1,
'groups': 1,
'bias': False,
'enable_lfu': True,
'padding_type': 'reflect',
'gated': False,
'spectral_pos_encoding': False,
'use_se': False,
'se_kwargs': None,
'ffc3d': False,
'fft_norm': 'ortho',
}
- 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 FFC — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FFC 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
|
| FFC_BN_ACT |
Ran ran on a synthesized input · constructed an object; no result was computed |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("9654be1ceb1764d3") How it ranRan 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 an instance of its own class, FFC_BN_ACT: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.functional as F
torch.manual_seed(0)
class SELayer(nn.Module):
def __init__(self, channel, reduction=16):
super(SELayer, self).__init__()
self.fc1 = nn.Conv2d(channel, channel // reduction, 1)
self.fc2 = nn.Conv2d(channel // reduction, channel, 1)
def forward(self, x):
return x
class SpectralTransform(nn.Module):
def __init__(self, in_channels, out_channels, stride=1, groups=1, enable_lfu=True, **spectral_kwargs):
super(SpectralTransform, self).__init__()
self.enable_lfu = enable_lfu
self.fou = FourierUnit(in_channels, out_channels, groups=groups, **spectral_kwargs)
self.stride = stride
def forward(self, x):
return self.fou(x)
class FourierUnit(nn.Module):
def __init__(self, in_channels, out_channels, groups=1, spatial_scale_factor=None, spatial_scale_mode='bilinear', spectral_pos_encoding=False, use_se=False, se_kwargs=None, ffc3d=False, fft_norm='ortho'):
super(FourierUnit, self).__init__()
self.groups = groups
self.conv_layer = torch.nn.Conv2d(in_channels=in_channels * 2 + (2 if spectral_pos_encoding else 0), out_channels=out_channels * 2, kernel_size=1, stride=1, padding=0, groups=self.groups, bias=False)
self.bn = torch.nn.BatchNorm2d(out_channels * 2)
self.relu = torch.nn.ReLU(inplace=True)
self.use_se = use_se
if use_se:
if se_kwargs is None:
se_kwargs = {}
self.se = SELayer(self.conv_layer.in_channels, **se_kwargs)
self.spatial_scale_factor = spatial_scale_factor
self.spatial_scale_mode = spatial_scale_mode
self.spectral_pos_encoding = spectral_pos_encoding
self.ffc3d = ffc3d
self.fft_norm = fft_norm
def forward(self, x):
batch = x.shape[0]
if self.spatial_scale_factor is not None:
orig_size = x.shape[-2:]
x = F.interpolate(x, scale_factor=self.spatial_scale_factor, mode=self.spatial_scale_mode, align_corners=False)
r_size = x.size()
fft_dim = (-3, -2, -1) if self.ffc3d else (-2, -1)
ffted = torch.fft.rfftn(x, dim=fft_dim, norm=self.fft_norm)
ffted = torch.stack((ffted.real, ffted.imag), dim=-1)
ffted = ffted.permute(0, 1, 4, 2, 3).contiguous()
ffted = ffted.view((batch, -1) + ffted.size()[3:])
if self.spectral_pos_encoding:
height, width = ffted.shape[-2:]
coords_vert = torch.linspace(0, 1, height)[None, None, :, None].expand(batch, 1, height, width).to(ffted)
coords_hor = torch.linspace(0, 1, width)[None, None, None, :].expand(batch, 1, height, width).to(ffted)
ffted = torch.cat((coords_vert, coords_hor, ffted), dim=1)
if self.use_se:
ffted = self.se(ffted)
ffted = self.conv_layer(ffted)
ffted = self.relu(self.bn(ffted))
ffted = ffted.view((batch, -1, 2) + ffted.size()[2:]).permute(0, 1, 3, 4, 2).contiguous()
ffted = torch.complex(ffted[..., 0], ffted[..., 1])
ifft_shape_slice = x.shape[-3:] if self.ffc3d else x.shape[-2:]
output = torch.fft.irfftn(ffted, s=ifft_shape_slice, dim=fft_dim, norm=self.fft_norm)
if self.spatial_scale_factor is not None:
output = F.interpolate(output, size=orig_size, mode=self.spatial_scale_mode, align_corners=False)
return output
ARGS = {
'in_channels': 8,
'out_channels': 16,
'kernel_size': 3,
'ratio_gin': 0.5,
'ratio_gout': 0.5,
'stride': 1,
'padding': 1,
'dilation': 1,
'groups': 1,
'bias': False,
'enable_lfu': True,
'padding_type': 'reflect',
'gated': False,
}
- 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 FFC_BN_ACT — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FFC_BN_ACT 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
|
| FourierUnit |
Ran ran on a synthesized input · constructed an object; no result was computed |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("9a681920adecc1a9") How it ranRan 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 an instance of its own class, FourierUnit: the run constructed the object and did not call it, so no result was computed. 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
torch.manual_seed(0)
ARGS = {
'in_channels': 4,
'out_channels': 8,
'groups': 1,
'spatial_scale_factor': None,
'spatial_scale_mode': 'bilinear',
'spectral_pos_encoding': False,
'use_se': False,
'se_kwargs': None,
'ffc3d': False,
'fft_norm': 'ortho'
}
- 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 FourierUnit — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FourierUnit 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
|
| FullMaskEmbedder |
Ran ran on a synthesized input |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("843dfd652b76d05e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned ndarray, ndim 3, 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
INIT_ARGS = {
'invert_proba': 0.5
}
ARGS = {
'img': np.random.randn(3, 8, 6).astype(np.float32),
'iter_i': 5,
'raw_image': np.random.randn(3, 8, 6).astype(np.float32)
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| GaussianBlur |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("45df3aed2dab3bf2") How it ranRan 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 an instance of its own class, GaussianBlur: the run constructed the object and did not call it, so no result was computed. 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 nn
from torch.nn import functional as F
from torchvision import transforms
torch.manual_seed(0)
image_mean = torch.tensor([0.485, 0.456, 0.406])
image_std = torch.tensor([0.229, 0.224, 0.225])
normalize_img = transforms.Normalize(image_mean, image_std)
unnormalize_img = transforms.Normalize(-image_mean / image_std, 1 / image_std)
class GaussianBlur(nn.Module):
def __init__(self, min_kernel_size=None, max_kernel_size=None):
super(GaussianBlur, self).__init__()
self.min_kernel_size = min_kernel_size
self.max_kernel_size = max_kernel_size
def forward(self, image, mask, kernel_size=None):
if kernel_size is None:
if self.min_kernel_size is None or self.max_kernel_size is None:
raise ValueError('Kernel size range must be specified')
kernel_size = torch.randint(self.min_kernel_size, self.max_kernel_size + 1, size=(1,)).item()
kernel_size = kernel_size + 1 if kernel_size % 2 == 0 else kernel_size
image = unnormalize_img(image).clamp(0, 1)
image = F.gaussian_blur(image, kernel_size)
return (normalize_img(image), mask)
# Create instance with valid min/max kernel sizes
gaussian_blur_model = GaussianBlur(min_kernel_size=3, max_kernel_size=7)
# Create sample tensors: batch_size=2, channels=3 (for RGB)
# image should have shape (2, 3, 4, 5) - batch, channels, height, width
image = torch.randn(2, 3, 4, 5)
mask = torch.randint(0, 2, (2, 4, 5))
ARGS = {
"min_kernel_size": 3,
"max_kernel_size": 7
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type GaussianBlur — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GaussianBlur 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
|
| Identity |
Ran ran on a synthesized input |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("bcb4b3ed6a29fdd0") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from torch import nn
class Identity(nn.Module):
def __init__(self):
super(Identity, self).__init__()
def forward(self, image, mask, *args, **kwargs):
return (image, mask)
INIT_ARGS = {}
ARGS = {
'image': torch.randn(2, 3, 4, 4),
'mask': torch.randn(2, 1, 4, 4),
}
if __name__ == '__main__':
model = Identity(**INIT_ARGS)
output = model(**ARGS)
print(f"Output type: {type(output)}")
print(f"Output[0] shape: {output[0].shape}")
print(f"Output[1] shape: {output[1].shape}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| JND |
Ran ran on a synthesized input |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("9bf49095b19f1774") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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
import numpy as np
# INIT_ARGS for JND.__init__
INIT_ARGS = {
'preprocess': lambda x: x,
'postprocess': lambda x: x,
'in_channels': 1,
'out_channels': 3,
'blue': False
}
# ARGS for JND.forward
# imgs and imgs_w should be in [0,1] range and have shape (batch, channels, height, width)
# Since in_channels=1 but the class expects 3-channel input for processing (see heatmaps method),
# we need to provide 3-channel images
batch_size = 2
height = 8
width = 6
imgs = torch.rand(batch_size, 3, height, width) # Random images in [0,1]
imgs_w = torch.rand(batch_size, 3, height, width) # Random watermarked images in [0,1]
ARGS = {
'imgs': imgs,
'imgs_w': imgs_w,
'alpha': 1.0
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| LinearRamp |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("8b41e1fbee5d7c00") How it ranRan 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 an instance of its own class, LinearRamp: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
ARGS = {
"start_value": 0,
"end_value": 1,
"start_iter": -1,
"end_iter": 0,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type LinearRamp — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LinearRamp 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
|
| MedianFilter |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("22b2c33174652dc9") How it ranRan 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 an instance of its own class, MedianFilter: the run constructed the object and did not call it, so no result was computed. 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 nn
from torchvision import transforms
torch.manual_seed(0)
image_mean = torch.tensor([0.485, 0.456, 0.406])
image_std = torch.tensor([0.229, 0.224, 0.225])
normalize_img = transforms.Normalize(image_mean, image_std)
unnormalize_img = transforms.Normalize(-image_mean / image_std, 1 / image_std)
def median_filter(image, kernel_size):
"""Stand-in median filter function"""
return image
class MedianFilter(nn.Module):
def __init__(self, min_kernel_size=None, max_kernel_size=None, passthrough=True):
super(MedianFilter, self).__init__()
self.min_kernel_size = min_kernel_size
self.max_kernel_size = max_kernel_size
self.passthrough = passthrough
def forward(self, image, mask, kernel_size=None):
if kernel_size is None:
if self.min_kernel_size is None or self.max_kernel_size is None:
raise ValueError('Kernel size range must be specified')
kernel_size = torch.randint(self.min_kernel_size, self.max_kernel_size + 1, size=(1,)).item()
kernel_size = kernel_size + 1 if kernel_size % 2 == 0 else kernel_size
image = unnormalize_img(image).clamp(0, 1)
if self.passthrough:
image = (median_filter(image, kernel_size) - image).detach() + image
else:
image = median_filter(image, kernel_size)
return (normalize_img(image), mask)
ARGS = {
'min_kernel_size': 3,
'max_kernel_size': 7,
'passthrough': True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type MedianFilter — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MedianFilter 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
|
| MixedMaskEmbedder |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("8122ac142e3190b1") How it ranRan 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 an instance of its own class, MixedMaskEmbedder: the run constructed the object and did not call it, so no result was computed. 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
from enum import Enum
torch.manual_seed(0)
np.random.seed(0)
class CocoSegmentationMaskEmbedder:
def __init__(self):
pass
class CustomMaskEmbedder:
def __init__(self):
pass
def generate_rectangle_masks(self, num_masks=10, num_rectangles=1, image_size=256, min=0.1, max=1):
percentages = np.linspace(min, max, num_masks)
masks = []
for percentage in percentages:
mask = np.zeros((image_size, image_size))
if num_rectangles == 1:
rect_size = int(np.sqrt(percentage) * image_size)
start_idx = (image_size - rect_size) // 2
end_idx = start_idx + rect_size
mask[start_idx:end_idx, start_idx:end_idx] = 1
else:
subpart_width = image_size // num_rectangles
for i in range(num_rectangles):
rect_width = int(np.sqrt(percentage / num_rectangles) * subpart_width)
rect_height = int(percentage / num_rectangles * image_size)
start_idx_x = i * subpart_width + (subpart_width - rect_width) // 2
end_idx_x = start_idx_x + rect_width
start_idx_y = (image_size - rect_height) // 2
end_idx_y = start_idx_y + rect_height
mask[start_idx_y:end_idx_y, start_idx_x:end_idx_x] = 1
masks.append(mask)
return masks
class DrawMethod(Enum):
LINE = 'line'
CIRCLE = 'circle'
SQUARE = 'square'
class FullMaskEmbedder:
def __init__(self, invert_proba=0.5):
self.invert_proba = invert_proba
def __call__(self, img, iter_i=None, raw_image=None):
mask = np.zeros((img.shape[-2], img.shape[-1]), np.float32)
if self.invert_proba > 0 and np.random.random() < self.invert_proba:
mask = 1 - mask
return mask[None, ...]
class LinearRamp:
def __init__(self, start_value=0, end_value=1, start_iter=-1, end_iter=0):
self.start_value = start_value
self.end_value = end_value
self.start_iter = start_iter
self.end_iter = end_iter
def __call__(self, i):
if i < self.start_iter:
return self.start_value
if i >= self.end_iter:
return self.end_value
part = (i - self.start_iter) / (self.end_iter - self.start_iter)
return self.start_value * (1 - part) + self.end_value * part
class OutpaintingMaskEmbedder:
def __init__(self, min_padding_percent=0.04, max_padding_percent=0.25, left_padding_prob=0.5, top_padding_prob=0.5, right_padding_prob=0.5, bottom_padding_prob=0.5, is_fixed_randomness=False):
self.min_padding_percent = min_padding_percent
self.max_padding_percent = max_padding_percent
self.probs = [left_padding_prob, top_padding_prob, right_padding_prob, bottom_padding_prob]
self.is_fixed_randomness = is_fixed_randomness
ARGS = {
'coco_mask_embedder': CocoSegmentationMaskEmbedder(),
'custom_mask_embedder': CustomMaskEmbedder(),
'custom_mask_embedder_kwargs': {
'num_masks': 5,
'num_rectangles': 2,
'image_size': 128,
'min': 0.1,
'max': 0.8
},
'full_mask_embedder': FullMaskEmbedder(invert_proba=0.3),
'outpainting_mask_embedder': OutpaintingMaskEmbedder(
min_padding_percent=0.04,
max_padding_percent=0.25,
left_padding_prob=0.5,
top_padding_prob=0.5,
right_padding_prob=0.5,
bottom_padding_prob=0.5,
is_fixed_randomness=False
),
'linear_ramp': LinearRamp(start_value=0.0, end_value=1.0, start_iter=-10, end_iter=100),
'draw_method': DrawMethod.SQUARE,
'inpainting_mask_proba': 0.5,
'outpainting_mask_proba': 0.3,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type MixedMaskEmbedder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MixedMaskEmbedder 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
|
| MultidilatedConv |
Ran ran on a synthesized input · constructed an object; no result was computed |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("3460d3a7d1d7d183") How it ranRan 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 an instance of its own class, MultidilatedConv: the run constructed the object and did not call it, so no result was computed. 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
import random
torch.manual_seed(0)
random.seed(0)
ARGS = {
'in_dim': 4,
'out_dim': 8,
'kernel_size': 3,
'dilation_num': 2,
'comb_mode': 'sum',
'equal_dim': True,
'shared_weights': False,
'padding': 1,
'min_dilation': 1,
'shuffle_in_channels': False,
'use_depthwise': False,
}
- 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 MultidilatedConv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultidilatedConv 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
|
| MultidilatedResnetBlock |
Ran ran on a synthesized input · constructed an object; no result was computed |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("66f5d3721ebaec97") How it ranRan 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 an instance of its own class, MultidilatedResnetBlock: the run constructed the object and did not call it, so no result was computed. 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
torch.manual_seed(0)
# Create a simple normalization layer (BatchNorm1d for 1D input or BatchNorm2d for 2D)
norm_layer = nn.BatchNorm2d
# Create a simple activation function
activation = nn.ReLU(True)
# Create a simple conv layer (Conv2d)
conv_layer = nn.Conv2d
# Define the dimension
dim = 4
# Define padding type
padding_type = 'reflect'
# Define whether to use dropout
use_dropout = False
# Create the arguments dictionary
ARGS = {
'dim': dim,
'padding_type': padding_type,
'conv_layer': conv_layer,
'norm_layer': norm_layer,
'activation': activation,
'use_dropout': use_dropout
}
- 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 MultidilatedResnetBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultidilatedResnetBlock 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
|
| OutpaintingMaskEmbedder |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("78f1137a7dc7ad7f") How it ranRan 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 an instance of its own class, OutpaintingMaskEmbedder: the run constructed the object and did not call it, so no result was computed. 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
ARGS = {
'min_padding_percent': 0.04,
'max_padding_percent': 0.25,
'left_padding_prob': 0.5,
'top_padding_prob': 0.5,
'right_padding_prob': 0.5,
'bottom_padding_prob': 0.5,
'is_fixed_randomness': False,
}
- 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 OutpaintingMaskEmbedder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a OutpaintingMaskEmbedder 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
|
| RandomIrregularMaskEmbedder |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("3d789e9b974a7cdf") How it ranRan 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 an instance of its own class, RandomIrregularMaskEmbedder: the run constructed the object and did not call it, so no result was computed. 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 enum import Enum
class DrawMethod(Enum):
LINE = 'line'
CIRCLE = 'circle'
SQUARE = 'square'
class LinearRamp:
def __init__(self, start_value=0, end_value=1, start_iter=-1, end_iter=0):
self.start_value = start_value
self.end_value = end_value
self.start_iter = start_iter
self.end_iter = end_iter
def __call__(self, i):
if i < self.start_iter:
return self.start_value
if i >= self.end_iter:
return self.end_value
part = (i - self.start_iter) / (self.end_iter - self.start_iter)
return self.start_value * (1 - part) + self.end_value * part
# Create sample image tensor with shape (batch, channels, height, width)
sample_img = np.random.rand(2, 3, 64, 48).astype(np.float32)
ARGS = {
'max_angle': 4,
'max_len': 60,
'max_width': 20,
'min_len': 10,
'min_width': 5,
'min_times': 0,
'max_times': 5,
'ramp_kwargs': {'start_value': 0.0, 'end_value': 1.0, 'start_iter': -10, 'end_iter': 100},
'draw_method': DrawMethod.LINE,
}
- 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 RandomIrregularMaskEmbedder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RandomIrregularMaskEmbedder 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
|
| RandomRectangleMaskEmbedder |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("1f79e4607cb770db") How it ranRan 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 an instance of its own class, RandomRectangleMaskEmbedder: the run constructed the object and did not call it, so no result was computed. 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
# LinearRamp with custom ramp_kwargs
ramp_kwargs = {
'start_value': 0.0,
'end_value': 1.0,
'start_iter': 0,
'end_iter': 100
}
ARGS = {
'margin': 10,
'bbox_min_size': 30,
'bbox_max_size': 100,
'min_times': 1,
'max_times': 3,
'ramp_kwargs': ramp_kwargs
}
- 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 RandomRectangleMaskEmbedder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RandomRectangleMaskEmbedder 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
|
| RandomSuperresMaskEmbedder |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("07b001f953998cdf") How it ranRan 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 an instance of its own class, RandomSuperresMaskEmbedder: the run constructed the object and did not call it, so no result was computed. 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
import torch
# RandomSuperresMaskEmbedder takes **kwargs which are passed to make_random_superres_mask
# The function make_random_superres_mask accepts: shape, min_step, max_step, min_width, max_width
# The __call__ method receives img (which has .shape[1:] accessed) and iter_i (optional)
# Create a mock image tensor with shape (batch, height, width, channels) or similar
# The shape[1:] will be used as the shape parameter to make_random_superres_mask
mock_img = torch.randn(2, 8, 12) # batch=2, height=8, width=12
ARGS = {
"kwargs": {
"min_step": 2,
"max_step": 4,
"min_width": 1,
"max_width": 3
}
}
- 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 RandomSuperresMaskEmbedder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RandomSuperresMaskEmbedder 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
|
| Resize |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("b3a188c9eac7c269") How it ranRan 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 an instance of its own class, Resize: the run constructed the object and did not call it, so no result was computed. 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 nn
torch.manual_seed(0)
# Create sample image and mask tensors
# Image: batch=2, channels=3, height=4, width=5
image = torch.randn(2, 3, 4, 5)
# Mask: batch=2, channels=1, height=4, width=5
mask = torch.randint(0, 2, (2, 1, 4, 5)).float()
ARGS = {
"min_size": 0.5,
"max_size": 1.5,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Resize — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Resize 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
|
| Rotate |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("d6cd467d5838c3d0") How it ranRan 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 an instance of its own class, Rotate: the run constructed the object and did not call it, so no result was computed. 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 nn
from torch.nn import functional as F
torch.manual_seed(0)
# Create minimal test tensors
# Using distinct sizes: batch=2, channels=3, height=4, width=5
image = torch.randn(2, 3, 4, 5)
mask = torch.randn(2, 3, 4, 5)
ARGS = {
'min_angle': 0,
'max_angle': 45,
}
- 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 Rotate — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Rotate 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
|
| SELayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("6786197ec4189fdc") How it ranRan 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 an instance of its own class, SELayer: the run constructed the object and did not call it, so no result was computed. 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
torch.manual_seed(0)
# SELayer expects:
# - channel: int (number of input channels)
# - reduction: int (optional, default=16)
# The forward method expects:
# - x: a 4D tensor of shape (batch, channels, height, width)
# Build a small test input tensor
batch_size = 2
num_channels = 4
height = 3
width = 5
x = torch.randn(batch_size, num_channels, height, width)
ARGS = {
'channel': num_channels,
'reduction': 16
}
- 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 SELayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SELayer 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
|
| Saturation |
Ran ran on a synthesized input · constructed an object; no result was computed |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("3fb53df7c3ecd86c") How it ranRan 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 an instance of its own class, Saturation: the run constructed the object and did not call it, so no result was computed. 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 nn
from torch.nn import functional as F
from torchvision import transforms
torch.manual_seed(0)
image_mean = torch.tensor([0.485, 0.456, 0.406])
image_std = torch.tensor([0.229, 0.224, 0.225])
normalize_img = transforms.Normalize(image_mean, image_std)
unnormalize_img = transforms.Normalize(-image_mean / image_std, 1 / image_std)
class Saturation(nn.Module):
def __init__(self, min_factor=None, max_factor=None):
super(Saturation, self).__init__()
self.min_factor = min_factor
self.max_factor = max_factor
def forward(self, image, mask, factor=None):
if factor is None:
if self.min_factor is None or self.max_factor is None:
raise ValueError('Factor range must be specified')
factor = torch.rand(1).item() * (self.max_factor - self.min_factor) + self.min_factor
image = unnormalize_img(image).clamp(0, 1)
image = F.adjust_saturation(image, factor)
return (normalize_img(image), mask)
# Construct setup arguments
min_factor = 0.5
max_factor = 1.5
ARGS = {
"min_factor": min_factor,
"max_factor": max_factor,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Saturation — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Saturation 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
|
| SpectralTransform |
Ran ran on a synthesized input · constructed an object; no result was computed |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("51002caac8ee78d2") How it ranRan 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 an instance of its own class, SpectralTransform: the run constructed the object and did not call it, so no result was computed. 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
torch.manual_seed(0)
ARGS = {
'in_channels': 4,
'out_channels': 8,
'stride': 1,
'groups': 1,
'enable_lfu': 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 SpectralTransform — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SpectralTransform 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
|
| deconv_factory |
Ran ran; our contract draft was wrong, not the code |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("7413418e45686eef") How it ranRan 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
import torch.nn as nn
torch.manual_seed(0)
# Define a minimal norm layer that works like BatchNorm2d
class MinimalNorm(nn.Module):
def __init__(self, num_features):
super().__init__()
self.num_features = num_features
def forward(self, x):
return x
# Define a minimal activation that works like ReLU
class MinimalActivation(nn.Module):
def forward(self, x):
return torch.relu(x)
ARGS = {
'kind': 'bilinear',
'ngf': 64,
'mult': 2,
'norm_layer': MinimalNorm,
'activation': MinimalActivation(),
'max_features': 512
}
- 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
|
| get_activation |
Ran ran; our contract draft was wrong, not the code |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("b67152b806ff0b3b") How it ranRan 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 Tanh. 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
torch.manual_seed(0)
ARGS = {
'kind': 'tanh'
}
- 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 Tanh — a Tanh output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Tanh 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_conv_block_ctor |
Ran ran; our contract draft was wrong, not the code |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("fdc644eb68bfe341") How it ranRan 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 type. 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
import random
torch.manual_seed(0)
random.seed(0)
# Test case 1: kind as string 'default'
ARGS = {
'kind': 'default'
}
- 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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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_norm_layer |
Ran ran; our contract draft was wrong, not the code |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("56ce4c3dada95575") How it ranRan 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 type. 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
torch.manual_seed(0)
# The function get_norm_layer takes a 'kind' parameter that can be:
# 1. A string ('bn', 'in', or other)
# 2. A non-string object (which it returns directly)
# Test case 1: string argument 'bn'
ARGS = {
'kind': 'bn'
}
- 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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
|
| make_random_rectangle_mask |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("f174810f10e50f60") How it ranRan 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, 128, 96) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Set seed for reproducibility
np.random.seed(0)
# Define arguments for make_random_rectangle_mask
ARGS = {
"shape": (128, 96), # height=128, width=96
"margin": 10,
"bbox_min_size": 30,
"bbox_max_size": 100,
"min_times": 0,
"max_times": 3,
"no_overlap": False,
}
- 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, 128, 96) — shape (1, 128, 96) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_random_superres_mask |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("d7e21a6d2678b40a") How it ranRan 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, 32, 48) 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 = {
"shape": (32, 48),
"min_step": 2,
"max_step": 4,
"min_width": 1,
"max_width": 3,
}
- 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, 32, 48) — shape (1, 32, 48) 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
|
| Augmenter |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("7862f045dd0fd872") How it ran |
| Brightness |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("615d578f9886ba11") How it ran |
| CropResizePad |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("529c6fe4a443b596") How it ran |
| DrawMethod |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("d3878cd75bb34bcc") How it ran |
| FFCResnetBlock |
Not yet run unverified (harvested, no recorded run) |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("b2ce99e0ce1fe547") How it ran |
| HorizontalFlip |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("195434aa62fd8554") How it ran |
| Hue |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("6f71f109c486291d") How it ran |
| JPEG |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("01ba359cc74e2aaa") How it ran |
| LearnableSpatialTransformWrapper |
Not yet run unverified (harvested, no recorded run) |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("916d54931038c869") How it ran |
| MultiDilatedGlobalGenerator |
Not yet run unverified (harvested, no recorded run) |
advimman/lama/saicinpainting/training/modules/pix2pixhd.py code served (permissive licence) · get_code("3f1b2dec311a2e80") How it ran |
| Perspective |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("9b9166a37f2ebce0") How it ran |
| Wam |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("e27c0cf92043cd20") How it ran |
| get_mask_embedder |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("0769e3294c73148e") How it ran |
| make_random_irregular_mask |
Not yet run unverified (harvested, no recorded run) |
facebookresearch/watermark-anything/watermark_anything/models/wam.py code served (permissive licence) · get_code("49e8f05f9263440b") How it ran |