EmbarkStudios / texture-synthesis

🎨 Example-based texture synthesis written in Rust 🦀

Home Page:http://embark.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI: using --sample-masks option

Hugo-Trentesaux opened this issue · comments

When running:

texture-synthesis --inpaint mask.png -o output.png --sample-masks IGNORE mask.png -- generate white_square.png texture.png

I get:

error: The subcommand 'generate' wasn't recognized
	Did you mean 'generate'?

If you believe you received this message in error, try re-running with 'texture-synthesis -- generate'

USAGE:
    texture-synthesis --inpaint <inpaint> --out-size <out-size> --out <output-path> --sample-masks <sample-masks>...

Is this the expected behavior? How should I use sample-masks option? (there is no example in the README).

The help says:

--sample-masks <sample-masks>...
            Path(s) to sample masks used to determine which pixels in an example can be used as inputs during
            generation, any example that doesn't have a mask, or uses `ALL`, will consider all pixels in the example. If
            `IGNORE` is specified, then the example image won't be used at all, which is useful with `--inpaint`.

I'm precisely trying to use sample-masks in combination with inpaint but can not manage to do it.

This is a bug in the argument parser we are using, you need to make it so that the last option before the generate subcommand only takes a single value, so if you swap -o output.png with --samples-masks IGNORE mask.png and get rid of the -- it should work.

I tried swapping the options to get rid of the parsing problem, but it runs forever using two CPU cores at 100%. It's seems to be a bug, but I do not know how to fix it. Can you reproduce it? I tried both with the 0.7.1 release binary and a self build binary. I can not address #86 before fixing this.

Fixed by #98