From 3f26c040f2c1b17894f2ef1766c4cd1419f9f7ae Mon Sep 17 00:00:00 2001 From: lltcggie Date: Wed, 16 Jan 2019 02:44:33 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8E=E3=82=A4=E3=82=BA=E9=99=A4=E5=8E=BB?= =?UTF-8?q?=E3=81=A8=E6=8B=A1=E5=A4=A7=E3=81=A7UpCUnet=E3=81=A7=E3=81=AF?= =?UTF-8?q?=E3=81=AA=E3=81=8FCUnet=E3=81=8C=E4=BD=BF=E3=82=8F=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20resolved=20#141?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/waifu2x.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/waifu2x.cpp b/common/waifu2x.cpp index 1aa0829..c4675b4 100644 --- a/common/waifu2x.cpp +++ b/common/waifu2x.cpp @@ -655,9 +655,12 @@ Waifu2x::eWaifu2xError Waifu2x::Init(const eWaifu2xModelType mode, const int noi if (ret != Waifu2x::eWaifu2xError_OK) return ret; - mHasNoiseScaleOnly = info.has_noise_scale && !info.has_noise_only; + mHasNoiseScaleOnly = info.has_noise_scale; mInputPlane = info.channels; + if (mode == eWaifu2xModelTypeNoise && info.has_noise_only) // ノイズ除去だけかつノイズ除去モデルが存在するのであればノイズ除去スケールモデルは使わないようにする + mHasNoiseScaleOnly = false; + if (mode == eWaifu2xModelTypeNoise || mode == eWaifu2xModelTypeNoiseScale || mode == eWaifu2xModelTypeAutoScale) { std::string base_name;