Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Support more esrgan models & x2 & x1 models #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pedroCabrera wants to merge 5 commits into leejet:master
base: master
Choose a base branch
Loading
from pedroCabrera:master

Conversation

Copy link

@pedroCabrera pedroCabrera commented Sep 24, 2025

Hi there, i have modified the ESRGAN code to support more models, i tested with a bunch from https://openmodeldb.info/ and some work out of the box but some of them had to be converted with :

import torch
checkpoint = torch.load(r"model.pth",map_location="cpu")
torch.save(checkpoint,r"model_converted.pth",_use_new_zipfile_serialization=True)

I have also tested with x2 and x1 models from that web and some of them works ( 2x-ESRGAN.pth , 1x-Anti-Aliasing.pth )
It also supports RealESRGAN_x4plus.pth as well as the original RealESRGAN_x4plus_anime_6B.pth

PD: I'm integrating stable-diffusion.cpp into Nuke wich is a vfx software , my repo is here -> pc_nuke_diffusion, still early development but most of the cli options are avaliable there already.

esrgan_test

Green-Sky, daniandtheweb, and stduhpf reacted with thumbs up emoji fszontagh and stduhpf reacted with heart emoji Green-Sky reacted with rocket emoji
Copy link
Contributor

fszontagh commented Sep 24, 2025
edited
Loading

A simple python script to convert an old type .pth:
convert_pth.py old_format.pth new_format_pth.pth
https://gist.github.com/fszontagh/4b1765d3ec75e1200f7a17ad8969da8b

Original image (512x768)
0ad0e5d9-7853-49d8-a5d9-3a00d333ef85_resized_512x768_refined_upscale_test_current_sd_normal

Upscaled image with the converted 4x_Nickelback_70000G.pth (2048x3072)

0ad0e5d9-7853-49d8-a5d9-3a00d333ef85_resized_512x768_refined_upscale_test

This is upscaled with RealESRGAN_x4plus.pth (which is worked earlier ) (2048x3072)
0ad0e5d9-7853-49d8-a5d9-3a00d333ef85_resized_512x768_refined

Copy link
Contributor

wbruna commented Sep 29, 2025

#865 can be used to test the upscaler models with external images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@fszontagh fszontagh fszontagh approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /