-
Notifications
You must be signed in to change notification settings - Fork 48
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
Script to scale is missing? #6
Comments
My codes may seem messy >.< For the most recent model training, I use sqlite to store pre-processed images. The scaling step is defined at Line 87 in 3b8713d
|
Oh, no, what I meant is, for end users and distro packagers, it would be really nice if you could provide the trained models + a waifu2x like command which accepts an input image filename and the output file name (and maybe additional options such as the model and scaling factor). Then we could just clone your repo, and run something like
|
That seems a nice idea, and it will be a good chance for me to learn something new in programming. By the way, this repo was created as a practice to learn PyTorch, and I didn't expected to create something come close to the original waifu2x's repo. |
I'll be looking forward to it! One more added benefit is, as far as I know, there is currently no way of using these new models under Linux or macOS without an NVidia GPU. (waifu2x-caffe does work on CPU, but it's Windows only, waifu2x-converter-cpp works on CPU but doesn't have the new models) |
The new model is trained in fp16, but PyTorch doesn't support fp32 in CPU. You may still use it in CPU only for inference by changing this line in Nvidia apex at here class tofp16(nn.Module):
"""
Utility module that implements::
def forward(self, input):
return input.half()
"""
def __init__(self):
super(tofp16, self).__init__()
def forward(self, input):
return input.half() to def forward(self, input):
return input.float() I once did some comparison on various out of sample test, using fp16 checkpoints to do fp32 inference makes almost no statistical difference. I will add more details in the ReamdMe page and the new checkpoints this weekend. |
Is this repo for training only? (train.py)
It doesn't look like there is a script which would do the actual image scaling.
The text was updated successfully, but these errors were encountered: