InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[enhancement]: Upscaling in CLI -U [factor] [strength] doesn't allow for selecting denoise strength like webUI

Open ymgenesis opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Contact Details

No response

What should this feature add?

The webUI has options to change both upscale and denoise strengths:

Screen Shot 2023-06-25 at 4 19 48 PM

The CLI has an upscale option:

-U UPSCALE [UPSCALE ...], --upscale UPSCALE [UPSCALE ...]
                        Scale factor (1, 2, 3, 4, etc..) for upscaling final output followed by upscaling strength (0-1.0). If strength not specified, defaults to 0.75

The developer console has some esrgan options:

  --esrgan_bg_tile ESRGAN_BG_TILE
                        Tile size for background sampler, 0 for no tile during testing. Default:
                        400.
  --esrgan_denoise_str ESRGAN_DENOISE_STR
                        esrgan denoise str. 0 is no denoise, 1 is max denoise. Default: 0.75

On the CLI you only specify scale factor & upscale strength.

Output shows default denoise strength of 0.75 when doing -U 4 0.3, suggesting it falls to the default value:

>> Real-ESRGAN Upscaling seed:1822142313, scale:4x, tile:400, denoise:0.75
	Tile 1/4
	Tile 2/4
	Tile 3/4
	Tile 4/4

Would be great to be able to specify a denoise strength on the CLI.

Alternatives

I did try adding --esrgan_denoise_str in the venv function that launches my invokes:

invoke() {
        cd $HOME/invokeai
        source .venv/bin/activate
        PYTORCH_ENABLE_MPS_FALLBACK=1 invokeai --model "$1" --esrgan_denoise_str 0.3 --from_file $HOME/invokeai/prompts.txt
}

It took the argument, but no matter where I put it, it didn't change the denoise:0.75 shown above to denoise:0.3. The CLI doesn't take --esrgan_denoise_str.

Maybe I'm missing something... that the webUI has this feature while the CLI does not?

Aditional Content

No response

ymgenesis avatar Jun 25 '23 14:06 ymgenesis