1
0
Fork 0
mirror of synced 2024-06-13 00:14:31 +12:00

add resume option

you can resume video upscaling with `-resume 1` option.
This commit is contained in:
nagadomi 2015-05-26 00:35:34 +09:00
parent 11ff1d54ce
commit 2a30216798

View file

@ -59,7 +59,7 @@ local function convert_frames(opt)
end
fp:close()
for i = 1, #lines do
if path.exists(string.format(opt.o, i)) == false then
if opt.resume == 0 or path.exists(string.format(opt.o, i)) == false then
local x = image_loader.load_float(lines[i])
local new_x = nil
if opt.m == "noise" and opt.noise_level == 1 then
@ -110,6 +110,7 @@ local function waifu2x()
cmd:option("-m", "noise_scale", 'method (noise|scale|noise_scale)')
cmd:option("-noise_level", 1, '(1|2)')
cmd:option("-crop_size", 128, 'patch size per process')
cmd:option("-resume", 0, "skip existing files (0|1)")
local opt = cmd:parse(arg)
if string.len(opt.l) == 0 then