Views
No views yet


mewzoom library for inference.| Name | Upscale | Architecture | Channels | Layers | Parameters | Library Version |
|---|---|---|---|---|---|---|
| andrewdalpino/MewZoom-V1-2X-Unet | 2X | UNet | 48/96/192/384 | 4/4/4/4 | 32M | 1.x |
| andrewdalpino/MewZoom-V1-2X | 2X | TrunkNet | 48 | 64 | 5.3M | 1.x |
| andrewdalpino/MewZoom-V1-4X-Unet | 4X | UNet | 96/192/384/768 | 4/4/4/4 | 128M | 1.x |
| andrewdalpino/MewZoom-V1-4X | 4X | TrunkNet | 96 | 64 | 21M | 1.x |
ultrazoom library for inference.| Name | Upscale | Channels | Layers | Parameters | Control Modules | Library Version |
|---|---|---|---|---|---|---|
| andrewdalpino/MewZoom-V0-2X | 2X | 48 | 20 | 1.8M | No | 0.1.x |
| andrewdalpino/MewZoom-V0-2X-Ctrl | 2X | 48 | 20 | 1.8M | Yes | 0.2.x |
| andrewdalpino/MewZoom-V0-3X | 3X | 54 | 30 | 3.5M | No | 0.1.x |
| andrewdalpino/MewZoom-V0-3X-Ctrl | 3X | 54 | 30 | 3.5M | Yes | 0.2.x |
| andrewdalpino/MewZoom-V0-4X | 4X | 96 | 40 | 14M | No | 0.1.x |
| andrewdalpino/MewZoom-V0-4X-Ctrl | 4X | 96 | 40 | 14M | Yes | 0.2.x |
mewzoom library which utilizes PyTorch under the hood. First, you'll need the mewzoom package installed into your project. We'll also need the torchvision library to do some basic image preprocessing. We recommend using a virtual environment to make package management easier.pip install mewzoom~=1.0.0 torchvisionfrom_pretrained() method, load and convert the input image to a tensor using Torch Vision, upscale the image using the model, and then display the upscaled image.1import torch
2
3from torchvision.io import decode_image, ImageReadMode
4from torchvision.transforms.v2 import ToDtype, ToPILImage
5
6from mewzoom.model import MewZoom
7
8
9model_name = "andrewdalpino/MewZoom-V1-2X-Unet"
10image_path = "./bird.png"
11
12model = MewZoom.from_pretrained(model_name)
13
14image_to_tensor = ToDtype(torch.float32, scale=True)
15tensor_to_pil = ToPILImage()
16
17image = decode_image(image_path, mode=ImageReadMode.RGB)
18
19x = image_to_tensor(image).unsqueeze(0)
20
21y_pred = model.upscale(x)
22
23pil_image = tensor_to_pil(y_pred.squeeze(0))
24
25pil_image.show()onnxruntime, numpy, and pillow dependencies into your project using your favorite package manager.pip install onnxruntime numpy pillow1import numpy as np
2import onnxruntime as ort
3
4from PIL import Image
5
6model_path = "./model.onnx"
7image_path = "./bird.png"
8
9session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])
10
11image = Image.open(image_path).convert("RGB")
12
13image_array = np.array(image, dtype=np.float32) / 255.0 # Normalize to [0, 1]
14
15# Convert from (H, W, C) to (1, C, H, W)
16input_tensor = np.transpose(image_array, (2, 0, 1))
17input_tensor = np.expand_dims(input_tensor, axis=0)
18
19outputs = session.run(None, {"x": input_tensor})
20
21output_tensor = outputs[0][0] # Remove batch dimension
22
23output_array = np.transpose(output_tensor, (1, 2, 0)) # (C, H, W) -> (H, W, C)
24output_array = np.clip(output_array, 0.0, 1.0)
25
26output_image = (output_array * 255).astype(np.uint8)
27
28result = Image.fromarray(output_image, "RGB")
29
30result.show()




- A. Jolicoeur-Martineau. The Relativistic Discriminator: A Key Element Missing From Standard GAN, 2018.
- J. Yu, et al. Wide Activation for Efficient and Accurate Image Super-Resolution, 2018.
- J. Johnson, et al. Perceptual Losses for Real-time Style Transfer and Super-Resolution, 2016.
- W. Shi, et al. Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network, 2016.
- T. Salimans, et al. Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks, OpenAI, 2016.
- T. Miyato, et al. Spectral Normalization for Generative Adversarial Networks, ICLR, 2018.
- A. Kendall, et. al. Multi-task Learning Using Uncertainty to Weigh Losses for Scene Geomtery and Semantics, 2018.
- L. Mescheder, et al. Which Training Methods for GANs do actually Converge?, PMLR 80, 2018.
- M. Heusel, et al. GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium, NIPS 2017.
- Z. Huang, et al. ScaleLong: Towards More Stable Training of Diffusion Model via Scaling Network Long Skip Connection, NeurIPS 2023.
- H. Wang, et al. Narrowing the semantic gaps in U-Net with learnable skip connections: The case of medical image segmentation, 2023.
- Z. Wang, et al. RA‑Net: reverse attention for generalizing residual learning, Nature Scientific Reports, 2024.
- X. Jiang, et al. Residual Spatial and Channel Attention Networks for Single Image Dehazing, Sensors, 2024.
- A. Gomaa, et al. Residual Channel-attention (RCA) network for remote sensing image scene classification, Multimedia Tools and Applications, 2025.