Skip to content
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

Migrating to torch 1.x #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Migrating to torch 1.x #12

wants to merge 2 commits into from

Conversation

ramilmsh
Copy link

@ramilmsh ramilmsh commented Jul 4, 2019

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 ramilmsh mentioned this pull request Jul 4, 2019
@liuqk3
Copy link

liuqk3 commented Aug 9, 2019

@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

@ramilmsh
Copy link
Author

ramilmsh commented Aug 16, 2019

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.

@Trass3r
Copy link

Trass3r commented Nov 14, 2019

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

@ramilmsh
Copy link
Author

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

@imcomking
Copy link

It works well at pytorch 1.5.1
thank you

@Xu-Justin
Copy link

I have tried this code. It's working!

@junguler
Copy link

junguler commented Nov 7, 2022

just tried this and it works, thanks

@junguler
Copy link

junguler commented Nov 7, 2022

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

@Xu-Justin
Copy link

Xu-Justin commented Nov 7, 2022

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?

@junguler
Copy link

junguler commented Nov 7, 2022

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

@Xu-Justin
Copy link

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

@junguler
Copy link

junguler commented Nov 8, 2022

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants