Sprite Dx Anti Corruption v1
Pixel art restoration model that performs both quantization (denoising/sharpening) and optional background matting.
Model source
- Kind
- Other
- File size
- 50.8 MB
- Version
- vRevision b195cbf
- Updated
- Oct 20, 2026
- Downloads
- 17
- Source
- Hugging Face
Source description
SpriteDX Anti-Corruption Model v1.1.3
Pixel art restoration model that performs both quantization (denoising/sharpening) and optional background matting.
Model Description
- Architecture: U-Net with residual connections
- Input: 128x128 RGBA (4 channels)
- Output: 128x128 RGBA (4 channels)
- Training: Mixed dataset strategy with 50/50 split between:
- Background matting task (composited images)
- Quantization task (transparent images)
Capabilities
- Pixel Art Quantization: Removes blur, noise, and interpolation artifacts
- Background Matting: Extracts transparency from composited images
- Unified Processing: Handles both tasks in a single forward pass
Usage
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')
Training Details
- Corruption pipeline: nearest neighbor upscaling → noise → blur → translation → bicubic downscaling
- Loss: Weighted RGB + Alpha loss with contrast and whiteness weighting
- Data augmentation: Color shifts, flips, grayscale conversion
Limitations
- Input must be 128x128 pixels
- Best results on pixel art and sprites
- May struggle with very complex transparency patterns
License
MIT
Sources
1 source
Sources
1 sourceVerified Oct 20
Model artifacts
1 artifact
Model artifacts
1 artifactSource excerpts
3 excerpts
Source excerpts
3 excerpts--- license: mit tags: - image-to-image - pixel-art - sprite - background-removal - quantization --- # SpriteDX Anti-Corruption Model v1.1.3 Pixel art restoration model that performs both quantization (denoising/sharpening) and optional background matting. ## Model Description - **Architecture**: U-Net with residual connections - **Input**: 128x128 RGBA (4 channels) - **Output**: 128x128 RGBA (4 channels) - **Training**: Mixed dataset strategy with 50/50 split between: - Background matting task (composited images) - Quantization task (transparent images) ## Capabilities 1. **Pixel Art Quantization**: Removes blur, noise, and interpolation artifacts 2. **Background Matting**: Extracts transparency from composited images 3. **Unified Processing**: Handles both tasks in a single forward pass ## Usage ```python 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') ``` ## Training Details - Corruption pipeline: nearest neighbor upscaling → noise → blur → translation → bicubic downscaling - Loss: Weighted RGB + Alpha loss with contrast and whiteness weighting - Data augmentation: Color shifts, flips, grayscale conversion ## Limitations - Input must be 128x128 pixels - Best results on pixel art and sprites - May struggle with very complex transparency patterns ## License MIT
Source context: 17 downloads · 1 likes · Pipeline image-to-image · Repo sprited/sprite-dx-anti-corruption-v1
Source context: 8 downloads · 1 likes · Pipeline image-to-image · Repo sprited/sprite-dx-anti-corruption-v1
