sketch_simplification icon indicating copy to clipboard operation
sketch_simplification copied to clipboard

Migrating to torch 1.x

Open ramilmsh opened this issue 4 years ago • 12 comments

I have updated the models to torch native (they are available through link in README.md) and modified the simplify.py accordingly. All models seem to work

ramilmsh avatar Jul 04 '19 07:07 ramilmsh

@ramilmsh Hi, thanks for your work. Have you validated the converted models? And can you public your models for PyTorch 1.0+? Thanks a lot

liuqk3 avatar Aug 09 '19 02:08 liuqk3

Have you validated the converted models?

I have run several images on it and it seemed to work on all models.

And can you public your models for PyTorch 1.0+?

I have uploaded them on Mega, since I have no CDN account.

ramilmsh avatar Aug 16 '19 12:08 ramilmsh

Note that the original models aren't even available anymore, at least atm.

Trass3r avatar Nov 14 '19 12:11 Trass3r

Note that the original models aren't even available anymore, at least atm.

I think I have a copy on my local machine, I will try to upload them to the same mega folder in a few days

ramilmsh avatar Nov 22 '19 04:11 ramilmsh

It works well at pytorch 1.5.1 thank you

imcomking avatar May 09 '21 17:05 imcomking

I have tried this code. It's working!

Xu-Justin avatar May 06 '22 13:05 Xu-Justin

just tried this and it works, thanks

junguler avatar Nov 07 '22 13:11 junguler

just a quick question tho, how can i change the model? i've tried --model model_gan.pth but it throws out an error

Traceback (most recent call last):
  File "C:\git\sketch_simplification\simplify.py", line 15, in <module>
    model_import = __import__(opt.model, fromlist=['model', 'immean', 'imstd'])
ModuleNotFoundError: No module named 'model_gan.pth'; 'model_gan' is not a package

same error with the other 3 models

junguler avatar Nov 07 '22 13:11 junguler

just a quick question tho, how can i change the model? i've tried --model model_gan.pth but it throws out an error

Traceback (most recent call last):
  File "C:\git\sketch_simplification\simplify.py", line 15, in <module>
    model_import = __import__(opt.model, fromlist=['model', 'immean', 'imstd'])
ModuleNotFoundError: No module named 'model_gan.pth'; 'model_gan' is not a package

same error with the other 3 models

  1. Have you downloaded the model?
  2. How do you run the code? (i.e. the command you use to run the code)

I have tried changing the model and it's working, could you provide more details to recreate the error?

Xu-Justin avatar Nov 07 '22 16:11 Xu-Justin

I have tried changing the model and it's working, could you provide more details to recreate the error?

yes, i've downloaded the 4 .pth models from that mega link, i also have the 4 .t7 models that the download script downloads, both sets of files are at the root of the folder

i'm running this with miniconda on windows 10, here is the command i've tried to run

python simplify.py --img face.jpg --out test.png --model model_gan.pth

the program works fine without specifying model but i can't get it working with any of the 8 model files

junguler avatar Nov 07 '22 19:11 junguler

yes, i've downloaded the 4 .pth models from that mega link, i also have the 4 .t7 models that the download script downloads, both sets of files are at the root of the folder

i'm running this with miniconda on windows 10, here is the command i've tried to run

python simplify.py --img face.jpg --out test.png --model model_gan.pth

the program works fine without specifying model but i can't get it working with any of the 8 model files

You shouldn't include .pth in the model arguments.

python simplify.py --img face.jpg --out test.png --model model_gan

Xu-Justin avatar Nov 08 '22 02:11 Xu-Justin

You shouldn't include .pth in the model arguments.

worked perfectly, thank you for taking the time to explain this to me

junguler avatar Nov 08 '22 02:11 junguler