invoke-ai / InvokeAI

InvokeAI is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, supports terminal use through a CLI, and serves as the foundation for multiple commercial products.

Home Page:https://invoke-ai.github.io/InvokeAI/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug]: Prompt with term weighted 0 results in an all-black image

JPPhoto opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

OS

Linux

GPU

cuda

VRAM

12GB

What happened?

Generating an image with a zero-weight prompt (prompt with term weighted++ (zero)0.0) results in a black image.

>> Image Generation Parameters:

{'prompt': 'prompt with term weighted++ (zero)0.0', 'iterations': 1, 'steps': 100, 'cfg_scale': 7.5, 'threshold': 0, 'perlin': 0, 'height': 1024, 'width': 576, 'sampler_name': 'k_euler_a', 'seed': 2084177759, 'progress_images': False, 'progress_latents': True, 'save_intermediates': 5, 'generation_mode': 'txt2img', 'init_mask': '...', 'hires_fix': True, 'strength': 0.6, 'seamless': False, 'variation_amount': 0.01}

>> ESRGAN Parameters: False
>> Facetool Parameters: False

>> [TOKENLOG] Parsed Prompt: FlattenedPrompt:[Fragment:'prompt with term'@1.0, Fragment:'weighted'@1.2100000000000002, Fragment:'zero'@0.0]

>> [TOKENLOG] Parsed Negative Prompt: FlattenedPrompt:[Fragment:''@1.0]

>> [TOKENLOG] Tokens  (5):
prompt with term weighted zero

Tagging @damian0815.

Screenshots

No response

Additional context

No response

Contact Details

No response

I think this is a bug that @damian0815 will be best able to find and fix.

hmm, i can't reproduce this on my m1

What do you need from me?

@JPPhoto maybe can you try with xformers disabled and/or attention slicing disabled? i'll have to log in to a vast.ai instance before i can debug it myself

This happens with both disabled - I still avoid xformers and I've tried with images large and small. It also doesn't matter where the term weighted 0 appears in the prompt.

ok, i'll see if i can take a look tomorrow then

issue was an epsilon that was set too low for fp16