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

[Instruction] Run style2paints v3 offline #100

Closed
HynoR opened this issue Jan 21, 2019 · 39 comments
Closed

[Instruction] Run style2paints v3 offline #100

HynoR opened this issue Jan 21, 2019 · 39 comments

Comments

@HynoR
Copy link
Contributor

HynoR commented Jan 21, 2019

Here is the instruction about how to install the offline code on Windows(x64) devices.
中文教程:http://c7.gg/fEPeq

Instruction

Anaconda is a useful tool to contain python env. https://www.anaconda.com/
1.Download python 3.6.7 and install.
I.If you have installed other version,you need to uninstall it.
pic
2.Open cmd and input
pip install -r requirement_xxx.txt
GPU(GTX 1060 6G or better):
https://raw.githubusercontent.com/SNSLogty/style2paints_v3_launcher/master/requirement_gpu.txt
CPU:(high compatibility)
https://raw.githubusercontent.com/SNSLogty/style2paints_v3_launcher/master/requirement_cpu.txt
pic
3.Download the source code and models
Put the models into 'server' folder.
4.Run server.py
pic
5.When you see "Listening to 0.0.0.0:port" , open "http://127.0.0.1:port/" in your web browser (use Chrome or Edge.Do NOT use firefox)
pic
pic

F&A

About error 403 Forbidden: #84

you can download server.py_corrected and replace the file.

**About V4 resources:**#87 (comment)

You can get the latest news from our social account
Twitter: https://twitter.com/IlIIlIIIllIllII
Sina Weibo: https://www.weibo.com/STYLE2PAINTS
Bilibili(not official):https://space.bilibili.com/4582779
Youtube:https://www.youtube.com/channel/UCFEVJIaqRneO2Y3VpdIFI3w
This Tutorial is not perfect at present.

If you have too many unknown problems.
Try non-install pack (CPU)
https://mega.nz/#!x8lhQa6Q!EZb75h9f1VoWrLDiQj79GK5UVC0LM3G785wiChfzeJ0
you can find the instruction here
#71

@Ben76904
Copy link

I followed the instructions and they were great. But I keep getting "unable to connect". Here's a screenshot.
server unable to con

@ghost
Copy link

ghost commented Jan 22, 2019

I followed the instructions and they were great. But I keep getting "unable to connect". Here's a screenshot.
server unable to con

127.0.0.1:80*

@Ben76904
Copy link

@onsoho I tried using 127.0.0.1:80* but it did not work either. I'll check back tomorrow. Thanks.

@HynoR
Copy link
Contributor Author

HynoR commented Jan 22, 2019

@Ben76904 @onsoho Try 127.0.0.1:80

@Ben76904
Copy link

@SNSLogty I've tried that as well. I keep getting "Access Denied". I think It's my proxy settings. Will try again. If it doesn't work, no problem. I'll wait for the server to come back online.
server error

@CambaCambaCambaCambaCambaCamba

I'm getting a white blank page, any ideas why?

@drbobo0
Copy link

drbobo0 commented Jan 23, 2019

@Ben76904 try 0.0.0.0:80 and use Google Chrome.

@HynoR
Copy link
Contributor Author

HynoR commented Jan 23, 2019

@CambaCambaCambaCambaCambaCamba

I'm getting a white blank page, any ideas why?

Use Chrome or Edge to open the page

@HynoR
Copy link
Contributor Author

HynoR commented Jan 23, 2019

@SNSLogty I've tried that as well. I keep getting "Access Denied". I think It's my proxy settings. Will try again. If it doesn't work, no problem. I'll wait for the server to come back online.
server error

@Ben76904
From issue #84

Windows 10, this worked for me:
In server.py change:
static_file("index.html", root='game/')
To:
static_file("index.html", root='./game')

@HynoR HynoR changed the title [Tutorial] Run style2paints v3 offline [Instruction] Run style2paints v3 offline Jan 23, 2019
@Ben76904
Copy link

@SNSLogty Had to change one other line as well after following your instructions. Or else I get white blank page. It works now. Thank you so much! Here's the two lines.

@route('/<filename:path>')
def send_static(filename):
    return static_file(filename, root='./game')


@route('/')
def send_static():
    return static_file("index.html", root='./game')

@LapoRighini
Copy link

problem
After i "upload" the image the server crash, Can anyone help me? :c

@Ben76904
Copy link

For me, the offline version is slow. Uploading an image takes 30 seconds and to render a painting takes about 50 seconds. I did the CPU install. Is this normal?

@usakha123
Copy link

@SNSLogty, how can i integrate Danbooru2017 Dataset?

@Luke-lujunxian
Copy link

For me, the offline version is slow. Uploading an image takes 30 seconds and to render a painting takes about 50 seconds. I did the CPU install. Is this normal?

I believe it is normal. But, taking 30s to "upload" sounds strange for local sever. Maybe some works are done during the upload process.

@Ben76904
Copy link

@Luke-lujunxian Good to know. Thanks!

@stefnotch
Copy link

stefnotch commented Feb 2, 2019

@SNSLogty
On my system, it always throws a 404 not found error (127.0.0.1 - - [02/Feb/2019:17:22:49 +0200] "GET /rooms/Feb02H17M22S39R151/sketch.colorization.jpg HTTP/1.1" 404 227890 "http://127.0.0.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0") after uploading a picture. I fixed it by adding the following:

# Because the other one apparently only searches in the ./game directory
@route('/rooms/<filename:path>')
def send_static(filename):
    return static_file(filename, root='./gamerooms')

I added it before

@route('/<filename:path>')
def send_static(filename):
    return static_file(filename, root='./game')

System Information:
Windows 10 - 64 bit
Python 3.6.7

@usakha123
Copy link

usakha123 commented Feb 2, 2019

@stefnotch i also had the same problem, i solved it by replacing server.py with server.py_corrected

@stefnotch
Copy link

stefnotch commented Feb 2, 2019

@Ikar0s I replaced mine with the corrected server.py, however the issue persisted (1).

  1. Actually, I'm not sure if I had the issue before replacing the server.py. I just instantly replaced it with the corrected one, because that seemed like the correct thing to do.

@HynoR
Copy link
Contributor Author

HynoR commented Feb 3, 2019

@stefnotch Try non-install pack
https://mega.nz/#!x8lhQa6Q!EZb75h9f1VoWrLDiQj79GK5UVC0LM3G785wiChfzeJ0
you can find the instruction here
#71

@melocule
Copy link

melocule commented Feb 7, 2019

It doesn't work for me.
image

@HynoR
Copy link
Contributor Author

HynoR commented Feb 7, 2019

@melocule
Try non-install pack
https://mega.nz/#!x8lhQa6Q!EZb75h9f1VoWrLDiQj79GK5UVC0LM3G785wiChfzeJ0
you can find the instruction here
#71

@Datguypotato
Copy link

image

I am new to python it seems that I am missing a module
I can't find anything useful on google can somebody help me out?

@stefnotch
Copy link

stefnotch commented Apr 28, 2019

As written in the instructions, you'll need to download
https://raw.githubusercontent.com/SNSLogty/style2paints_v3_launcher/master/requirement_cpu.txt

and run
pip install -r requirement_cpu.txt

@Datguypotato
Copy link

https://raw.githubusercontent.com/SNSLogty/style2paints_v3_launcher/master/requirement_cpu

I get this error.
ERROR: Could not find a version that satisfies the requirement tensorflow (from -r requirement_cpu.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for tensorflow (from -r requirement_cpu.txt (line 1))

@HynoR
Copy link
Contributor Author

HynoR commented May 4, 2019

https://raw.githubusercontent.com/SNSLogty/style2paints_v3_launcher/master/requirement_cpu

I get this error.
ERROR: Could not find a version that satisfies the requirement tensorflow (from -r requirement_cpu.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for tensorflow (from -r requirement_cpu.txt (line 1))

@Datguypotato
Try this command first
pip install tensorflow-1.10.0-cp36-cp36m-win_amd64.whl
then install requirement_cpu.txt

@852953573
Copy link

screenshot20190616122100
我是不是漏了一步QAQ

@usakha123
Copy link

@852953573 try this version

@852953573
Copy link

@ 852953573试试这个版本

谢谢

thank you

@exi3t
Copy link

exi3t commented Aug 12, 2019

screenshot20190616122100
我是不是漏了一步QAQ

我跟你差不多问题,win7
捕获

@stefnotch
Copy link

@exi3t
It looks like it can't find baby.net. Are you sure that you downloaded the tensorflow models and put them in the correct folder?

@exi3t
Copy link

exi3t commented Aug 12, 2019

@exi3t
It looks like it can't find baby.net. Are you sure that you downloaded the tensorflow models and put them in the correct folder?

thanx,I have already used the noinstall version and it works.

@Tomluk811
Copy link

Hi, I got problem when trying to start server. Any idea for fix?
Przechwytywanie

@stefnotch
Copy link

StackOverflow yields a bunch of results when searching for the error message No module named '_pywrap_tensorflow_internal'

Some of the top results are

@HynoR
Copy link
Contributor Author

HynoR commented Aug 14, 2019

@Tomluk811 You may use 32-bit version python,Try to install the 64-bit version.

@MuQQQQQ
Copy link

MuQQQQQ commented Oct 17, 2019

How can I stop the server?
I sucessfully installed s2p, but, although I closed the cmd, the page of 127.0.0.1 is still PaintsTranfer.

@LCYLYM
Copy link

LCYLYM commented Oct 17, 2019

如何停止服务器?
我已成功安装了s2p,但是,尽管我关闭了cmd,但其页面 127.0.0.1 仍然是PaintsTranfer。

那只是缓存

@MuQQQQQ
Copy link

MuQQQQQ commented Oct 17, 2019

如何停止服务器?
我已成功安装了s2p,但是,尽管我关闭了cmd,但其页面 127.0.0.1 仍然是PaintsTranfer。

那只是缓存

kusa,谢谢orz

@mihaelkeelh
Copy link

guys i
how do you make the actual resolution in this application?
i have photo with 2000px but
after I color it, the resolution is only at 1000 px how i can change the resolution ?

@MX-Qulin
Copy link

MX-Qulin commented May 23, 2020

中文版已失效.
另:好像Xeon芯没有AVX,只能用Tensorflow<=1.5的....
报错如下:
Using TensorFlow backend. Traceback (most recent call last): File "server.py", line 16, in <module> from ai import * File "/home/ubuntu/MXtesting/style2paints/V3/server/ai.py", line 2, in <module> import keras File "/usr/local/lib/python3.6/dist-packages/keras/__init__.py", line 3, in <module> from . import utils File "/usr/local/lib/python3.6/dist-packages/keras/utils/__init__.py", line 6, in <module> from . import conv_utils File "/usr/local/lib/python3.6/dist-packages/keras/utils/conv_utils.py", line 9, in <module> from .. import backend as K File "/usr/local/lib/python3.6/dist-packages/keras/backend/__init__.py", line 1, in <module> from .load_backend import epsilon File "/usr/local/lib/python3.6/dist-packages/keras/backend/load_backend.py", line 90, in <module> from .tensorflow_backend import * File "/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py", line 13, in <module> from tensorflow.python.keras.utils import tf_utils ImportError: cannot import name 'tf_utils'

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

No branches or pull requests