Downloads · 30 days
18
15% of all-time downloads
sprited/sprite-dx-anti-corruption-v1
sprite-dx-anti-corruption-v1 is a image-to-image model from sprited. Use it when you need one image transformed into another. The card lists the license as mit.
Pixel art restoration model that performs both quantization (denoising/sharpening) and optional background matting.
Downloads · 30 days
18
15% of all-time downloads
All-time downloads
123
Public
Parameters
13.3M
213 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors53.2 MB · 100%
From the Hugging Face model README
Pixel art restoration model that performs both quantization (denoising/sharpening) and optional background matting.
import torch
from PIL import Image
import numpy as np
# Load model (you'll need the model architecture from train_v1.1.3.py)
from train_v1_1_1 import AntiCorruptionUNet
model = AntiCorruptionUNet()
checkpoint = torch.load("model.safetensors")
model.load_state_dict(checkpoint)
model.eval()
# Process image
image = Image.open("input.png").convert("RGBA")
image_tensor = torch.from_numpy(
np.array(image, dtype=np.float32).transpose(2, 0, 1) / 255.0
).unsqueeze(0)
with torch.no_grad():
output = model(image_tensor)
output = model.post_process(output)
# Convert back to PIL
output_np = output[0].permute(1, 2, 0).numpy()
output_np = np.clip(output_np * 255, 0, 255).astype(np.uint8)
output_image = Image.fromarray(output_np, mode='RGBA')
MIT