invoke-ai / InvokeAI

Invoke 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, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.58k stars 2.43k forks source link

[bug]: InvokeAI crashes on Mac when using Lora #3158

Closed slavikshen closed 1 year ago

slavikshen commented 1 year ago

Is there an existing issue for this?

OS

macOS

GPU

mps

VRAM

No response

What version did you experience this issue on?

2.3.4

What happened?

The python process crashes when using lora.

/AppleInternal/Library/BuildRoots/f0468ab4-4115-11ed-8edc-7ef33c48bc85/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSCore/Types/MPSNDArray.mm:705: failed assertion `[MPSNDArray initWithDevice:descriptor:] Error: product of dimension sizes > 2**31'
./start.sh: line 27:  6399 Abort trap: 6           invokeai --web $@
slavik@SlaviksacStudio InvokeAI % /opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

The prompt I'm using

withLora(Shenhe_Hard,0.75) masterpiece (ultra-detailed) illustration (mature_female)++ 1girl stands under sakura tree blossom,(school_uniform,bustier).blend(1,1)  (mini frilled skirt) underboob++++ (detailed-embroidery) (full body) (detailed face) (\:3)++++ (seductive smile)   (hair_ornament) (detailed eyes) (falling_petals)++:3 

(detailed background) (insanely detailed and intricate) (hyper maximalist) (light from above):1 

Screenshots

No response

Additional context

No response

Contact Details

No response

slavikshen commented 1 year ago

Updates The txt2img can pass when the size is under 512x768. However, the result is far from correct 007477 e776f8da 1212659739

This png contains parameters.

lstein commented 1 year ago

Duplicate of #3157

slavikshen commented 1 year ago

Duplicate of #3157

That's a different one. Actually I find the InvokeAI crashes without withLora as well. The only requirement to reproduce this issue is to set the output size larger than 512x768

lstein commented 1 year ago

I can't reproduce this one. It happens with short prompts as well?

slavikshen commented 1 year ago

I'm not sure if the length of the prompt affects the result. I'm using a MacStudio M1Max 64G RAM The model is https://civitai.com/models/9942/abyssorangemix3-aom3 The VAE is kl-f8-anime2.ckpt The params in the log file is

[Generated] "/Volumes/Work/AIArt/007480.9689e9e3.1212659739.png": ""SamDoesArt-8000":1

masterpiece (ultra-detailed) illustration (mature_female)++ 1girl stands under sakura tree blossom,(school_uniform,bustier).blend(1,1)  (mini frilled skirt) underboob++++ (detailed-embroidery) (full body) (detailed face) (\:3)++++ (seductive smile)   (hair_ornament) (detailed eyes) (falling_petals)++:3 

(detailed background) (insanely detailed and intricate) (hyper maximalist) (light from above):1 [(flat_shading) loli+++ child+++ (low quality)+++ (worst quality)+++ (out of frame)++ (band hand) (fused fingers) "bad_prompt_version2"- "NG_DeepNegative_V1_T75"++ "bad-hands-5"++]" -s 30 -S 1212659739 -W 512 -H 512 -C 7 -A k_dpm_2_a --hires -f 0.8

The same setup works in the previous release.

slavikshen commented 1 year ago

@lstein https://github.com/invoke-ai/InvokeAI/issues/2444

This ticket looks very close to the bug.

slavikshen commented 1 year ago

The crash is gone after the latest MacOS update. However, the txt2img result is significantly worse than the previous release. 007494 9daef238 1194350559