Closed AndrewRainfall closed 6 months ago
You can fix dubious ownership by
git config --global --add safe.directory *
Try running Precision: Full, FP32, and the two tick boxes underneath (the ones with --no-half and --no-half-vae in parentheses) and see if that solves black images.
Thanks for the dubious ownership fix, I tried smth like this before but it didn't work without a star.
The second part didn't help and I already tried it before. Is it just me or does this improve the image quality a bit?
Upd.: Tried with SDXL (juggernautXL). Same issue, but even worse - bigger chance to get all images black and even if one of the images is not black it is corrupted most of the time (if not always).
With compute settings it's still probably the same: at least one image turned black before I stopped generation (cuz generation time increased from 1 minute to 1 hour)
You have way too many deleted files, modified files and permission issues. Try with a new install and without modifying anything.
You have way too many deleted files, modified files and permission issues. Try with a new install and without modifying anything.
They happened after I tried to fix the GFPGAN & basicsr errors. Black images was from fresh installation. I'll revert all & post the results.
Deleted the automatic folder & git cloned automatic to another internal ssd (before it was on external ssd). Does installing on internal drive give better performance?
For some reason I got way less errors during launch, but it didn't resolve the issue.
Using VENV: C:\automatic\venv 13:37:25-082523 INFO Starting SD.Next 13:37:25-089025 INFO Logger: file="C:\automatic\sdnext.log" level=INFO size=61345 mode=append 13:37:25-093026 INFO Python 3.10.6 on Windows 13:37:29-378779 INFO Version: app=sd.next updated=2024-02-23 hash=c5f6c25a url=https://github.com/vladmandic/automatic/tree/master 13:37:30-721015 INFO Platform: arch=AMD64 cpu=AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD system=Windows release=Windows-10-10.0.19045-SP0 python=3.10.6 13:37:30-727016 INFO Intel OneAPI Toolkit detected 13:37:32-222779 INFO Extensions: disabled=[] 13:37:32-225280 INFO Extensions: enabled=['Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg'] extensions-builtin 13:37:32-236281 INFO Extensions: enabled=[] extensions 13:37:32-238782 INFO Startup: quick launch 13:37:32-240283 INFO Verifying requirements 13:37:32-257786 INFO Verifying packages 13:37:32-261786 INFO Extensions: disabled=[] 13:37:32-264287 INFO Extensions: enabled=['Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg'] extensions-builtin 13:37:32-274789 INFO Extensions: enabled=[] extensions 13:37:32-285791 INFO Command line args: ['--use-ipex', '--autolaunch'] autolaunch=True use_ipex=True 13:37:42-572599 INFO Load packages: {'torch': '2.1.0a0+cxx11.abi', 'diffusers': '0.26.3', 'gradio': '3.43.2'} 13:37:43-789813 INFO Engine: backend=Backend.DIFFUSERS compute=ipex device=xpu attention="Scaled-Dot-Product" mode=no_grad 13:37:43-794314 INFO Device: device=Intel(R) Arc(TM) A770 Graphics n=1 ipex=2.1.10+xpu 13:37:45-594552 INFO Available VAEs: path="E:\models\VAE" items=3 13:37:45-598552 INFO Disabled extensions: ['sd-webui-controlnet'] 13:37:46-491346 INFO Available models: path="E:\models\Stable-diffusion" items=22 time=0.89 13:37:46-856910 INFO Extension: script='extensions-builtin\Lora\scripts\lora_script.py' 13:37:46-851909 INFO LoRA networks: available=17 folders=2 13:37:47-410508 INFO Extension: script='extensions-builtin\sd-webui-agent-scheduler\scripts\task_scheduler.py' Using sqlite file: extensions-builtin\sd-webui-agent-scheduler\task_scheduler.sqlite3 13:37:47-798575 INFO UI theme: name="black-teal" style=Dark base=sdnext.css 13:37:51-694761 INFO Extension list is empty: refresh required 13:37:53-706114 INFO Local URL: http://127.0.0.1:7860/ 13:37:54-177698 INFO [AgentScheduler] Task queue is empty 13:37:54-180199 INFO [AgentScheduler] Registering APIs 13:37:54-365731 INFO Select: model="cyberrealistic_v41BackToBasics [41b6846108]" 13:37:54-423240 INFO Torch override dtype: no-half set 13:37:54-425241 INFO Torch override VAE dtype: no-half set 13:37:54-427242 INFO Setting Torch parameters: device=xpu dtype=torch.float32 vae=torch.float32 unet=torch.float32 context=no_grad fp16=None bf16=None optimization=Scaled-Dot-Product 13:37:54-516756 INFO Loading VAE: model=E:\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors source=settings 13:37:54-608272 INFO Autodetect: vae="Stable Diffusion" class=StableDiffusionPipeline file="E:\models\Stable-diffusion\cyberrealistic_v41BackToBasics.safetensors" size=2034MB 13:37:54-972337 INFO Autodetect: model="Stable Diffusion" class=StableDiffusionPipeline file="E:\models\Stable-diffusion\cyberrealistic_v41BackToBasics.safetensors" size=2034MB 13:38:00-847825 INFO IPEX Optimize: time=0.08 13:38:00-942342 INFO Load embeddings: loaded=0 skipped=0 time=0.00 13:38:01-163880 INFO Load model: time=6.58 config=0.05 load=6.52 native=512 {'ram': {'used': 2.03, 'total': 31.95}, 'gpu': {'used': 4.09, 'total': 15.54}, 'retries': 0, 'oom': 0} 13:38:01-171882 INFO Startup time: 28.88 torch=8.57 olive=0.11 gradio=1.60 libraries=2.52 samplers=0.15 vae=0.33 extensions=1.15 models=0.89 face-restore=0.10 ui-en=2.36 ui-txt2img=0.07 ui-img2img=0.08 ui-control=0.13 ui-settings=0.47 ui-extensions=2.32 ui-defaults=0.11 launch=0.20 api=0.14 app-started=0.51 checkpoint=6.81 13:38:01-185884 INFO Launching browser 13:38:07-942707 INFO MOTD: N/A 13:38:11-304799 INFO Browser session: user=None client=127.0.0.1 agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Progress 1.51s/it █████████████████████████████████ 100% 25/25 00:37 00:00 Base 13:39:47-448609 INFO Saving: image="outputs\text\00008-cyberrealistic_v41BackToBasics-hatsune miku in the forest daylight upper body.jpg" type=JPEG resolution=512x512 size=0 13:39:47-466612 INFO Saving: image="outputs\text\00009-cyberrealistic_v41BackToBasics-hatsune miku in the forest daylight upper body.jpg" type=JPEG resolution=512x512 size=0 13:39:47-478114 ERROR Failed to validate samples: sample=(512, 512, 3) invalid=786432 13:39:47-484615 WARNING Attempted to correct samples: min=0.00 max=0.00 mean=0.00 13:39:47-493616 INFO Saving: image="outputs\text\00010-cyberrealistic_v41BackToBasics-hatsune miku in the forest daylight upper body.jpg" type=JPEG resolution=512x512 size=0 13:39:47-501118 ERROR Failed to validate samples: sample=(512, 512, 3) invalid=786432 13:39:47-507119 WARNING Attempted to correct samples: min=0.00 max=0.00 mean=0.00 13:39:47-516121 INFO Saving: image="outputs\text\00011-cyberrealistic_v41BackToBasics-hatsune miku in the forest daylight upper body.jpg" type=JPEG resolution=512x512 size=0 13:39:47-522122 INFO Processed: images=4 time=52.41 its=1.91 memory={'ram': {'used': 2.6, 'total': 31.95}, 'gpu': {'used': 5.88, 'total': 15.54}, 'retries': 0, 'oom': 0}
Tried again to turn on recomended compute settings, but they didn't help either.
Do you have any ipex specific environment variable set? I am suspecting forced 4GB workaround for ARC doesn't get applied here. And if this is the cause, FP32 / no-half will make thing worse for you.
You can try the Dynamic Attention SDP with slicing rate 4 or less from settings.
Or try setting IPEX_SDPA_SLICE_TRIGGER_RATE
and IPEX_ATTENTION_SLICE_RATE
environment variables to 4 or less from cmd.
And try disabling IPEX Optimize from settings. It might be bad on Windows.
Do you have any ipex specific environment variable set? = I didn't installed anything with ipex aside SD.Next, so I guess no.
You can try the Dynamic Attention SDP with slicing rate 4 or less from settings. Or try setting IPEX_SDPA_SLICE_TRIGGER_RATE and IPEX_ATTENTION_SLICE_RATE environment variables to 4 or less from cmd. = How to do this properly? I get 'IPEX_ATTENTION_SLICE_RATE' is not recognized as an internal or external command, operable program or batch file.
And try disabling IPEX Optimize from settings. It might be bad on Windows. = It didn't work.
set ENV_VAR=value
is the command on Windows. This needs to be applied every time tho.
Use Dynamic Attention SDP from Compute Settings if you don't want to mess with command line. Changing Attention Optimization method and IPEX Optimize needs model reload.
Use Dynamic Attention SDP from Compute Settings
Found it, reloaded model & restarted SD Next. Reducing it to any value up to 0.1GB didn't work. But it significantly reduced image quality & it seems even increased chances of generating all images black, so I reverted it to 4GB and Scaled-Dot-Product.
set ENV_VAR=value is the command on Windows
Like in the image? If yes - it didn't work.
Is this only happens with 512x512 x4? 512x512 x4 will be the same as 1024x1024 and Intel ARC has 1024x1024 curse. Try any other resolution or batch size.
It happens with any resolution & any batch size. I get one image at average at any batch size up to 32
Idk why, but it's fixed now. Hope it won't be back.
I'm sure I didn't do anything that could fix it since my last SD Next launch.
Thank you for helping me Disty0
Working log output, mb it'll help someone:
Using VENV: C:\automatic\venv 22:08:39-550302 INFO Starting SD.Next 22:08:39-556803 INFO Logger: file="C:\automatic\sdnext.log" level=INFO size=1030603 mode=append 22:08:39-560304 INFO Python 3.10.6 on Windows 22:08:39-795335 INFO Version: app=sd.next updated=2024-02-23 hash=c5f6c25a url=https://github.com/vladmandic/automatic/tree/master 22:08:40-500474 INFO Latest published version: c1dfb1b28e37f286107b44740ccf6d1733233992 2024-02-24T13:23:08Z 22:08:40-519478 INFO Platform: arch=AMD64 cpu=AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD system=Windows release=Windows-10-10.0.19045-SP0 python=3.10.6 22:08:40-527979 INFO Intel OneAPI Toolkit detected 22:08:40-702166 INFO Extensions: disabled=[] 22:08:40-705165 INFO Extensions: enabled=['Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg'] extensions-builtin 22:08:40-718164 INFO Extensions: enabled=[] extensions 22:08:40-720665 INFO Startup: quick launch 22:08:40-722165 INFO Verifying requirements 22:08:40-740168 INFO Verifying packages 22:08:40-744169 INFO Extensions: disabled=[] 22:08:40-747169 INFO Extensions: enabled=['Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg'] extensions-builtin 22:08:40-758171 INFO Extensions: enabled=[] extensions 22:08:40-769674 INFO Command line args: ['--use-ipex', '--autolaunch'] autolaunch=True use_ipex=True 22:08:52-695328 INFO Load packages: {'torch': '2.1.0a0+cxx11.abi', 'diffusers': '0.26.3', 'gradio': '3.43.2'} 22:08:54-056425 INFO Engine: backend=Backend.DIFFUSERS compute=ipex device=xpu attention="Scaled-Dot-Product" mode=no_grad 22:08:54-061424 INFO Device: device=Intel(R) Arc(TM) A770 Graphics n=1 ipex=2.1.10+xpu 22:08:55-749083 INFO Available VAEs: path="E:\models\VAE" items=3 22:08:55-752584 INFO Disabled extensions: ['sd-webui-controlnet'] 22:08:55-762572 INFO Available models: path="E:\models\Stable-diffusion" items=21 time=0.01 22:08:55-962588 INFO Extension: script='extensions-builtin\Lora\scripts\lora_script.py' 22:08:55-955587 INFO LoRA networks: available=17 folders=2 22:08:56-594514 INFO Extension: script='extensions-builtin\sd-webui-agent-scheduler\scripts\task_scheduler.py' Using sqlite file: extensions-builtin\sd-webui-agent-scheduler\task_scheduler.sqlite3 22:08:57-039681 INFO UI theme: name="black-teal" style=Dark base=sdnext.css 22:08:58-954237 INFO Extension list is empty: refresh required 22:09:00-127698 INFO Local URL: http://127.0.0.1:7860/ 22:09:00-621784 INFO [AgentScheduler] Task queue is empty 22:09:00-624285 INFO [AgentScheduler] Registering APIs 22:09:00-812819 INFO Select: refiner="cyberrealistic_v41BackToBasics [41b6846108]" 22:09:01-220779 INFO Setting Torch parameters: device=xpu dtype=torch.bfloat16 vae=torch.bfloat16 unet=torch.bfloat16 context=no_grad fp16=True bf16=True optimization=Scaled-Dot-Product 22:09:01-225780 INFO Loading VAE: model=E:\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors source=settings 22:09:01-228280 INFO Autodetect: vae="Stable Diffusion" class=StableDiffusionPipeline file="E:\models\Stable-diffusion\cyberrealistic_v41BackToBasics.safetensors" size=2034MB 22:09:01-528834 INFO Autodetect: refiner="Stable Diffusion" class=StableDiffusionPipeline file="E:\models\Stable-diffusion\cyberrealistic_v41BackToBasics.safetensors" size=2034MB 22:09:05-679780 INFO Load refiner: time=4.61 load=4.61 native=512 {'ram': {'used': 5.29, 'total': 31.95}, 'gpu': {'used': 0.0, 'total': 15.54}, 'retries': 0, 'oom': 0} 22:09:05-687781 INFO Startup time: 24.91 torch=10.03 olive=0.12 gradio=1.77 libraries=2.99 extensions=1.08 face-restore=0.12 ui-en=0.38 ui-txt2img=0.08 ui-img2img=0.10 ui-control=0.13 ui-settings=0.47 ui-extensions=1.46 ui-defaults=0.12 launch=0.22 api=0.15 app-started=0.53 checkpoint=4.88 22:09:05-700283 INFO Launching browser 22:09:08-254239 INFO MOTD: N/A 22:09:13-208332 INFO Browser session: user=None client=127.0.0.1 agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 22:09:54-375548 INFO Select: model="cyberrealistic_v41BackToBasics [41b6846108]" 22:09:54-384049 INFO Setting Torch parameters: device=xpu dtype=torch.bfloat16 vae=torch.bfloat16 unet=torch.bfloat16 context=no_grad fp16=True bf16=True optimization=Scaled-Dot-Product 22:09:54-389050 INFO Loading VAE: model=E:\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors source=settings 22:09:54-392051 INFO Autodetect: vae="Stable Diffusion" class=StableDiffusionPipeline file="E:\models\Stable-diffusion\cyberrealistic_v41BackToBasics.safetensors" size=2034MB 22:09:54-719608 INFO Autodetect: model="Stable Diffusion" class=StableDiffusionPipeline file="E:\models\Stable-diffusion\cyberrealistic_v41BackToBasics.safetensors" size=2034MB 22:10:02-059572 INFO Load embeddings: loaded=7 skipped=1 time=0.86 22:10:02-317617 INFO Load model: time=7.68 load=7.68 native=512 {'ram': {'used': 5.08, 'total': 31.95}, 'gpu': {'used': 2.11, 'total': 15.54}, 'retries': 0, 'oom': 0}
Issue Description
2-4 images go black with this error, in most cases only one image out of four is actually generated:
20:00:38-781232 ERROR Failed to validate samples: sample=(512, 512, 3) invalid=786432 20:00:38-787233 WARNING Attempted to correct samples: min=0.00 max=0.00 mean=0.00
No nan errors and any combination of those settings didn't help: Precision type Autocast, Full; Device precision type FP32. FP16, BF16; Full precision for model (--no-half), Full precision for VAE (--no-half-vae), Upcast sampling.
I tried with different models & VAEs (but only 1.5).
I'm also concerned about "Error running git" messages & "Cmd('git') failed due to: exit code(128)", but I don't know are those connected with the issue or not.
Version Platform Description
New build downloaded yesterday, Win10, Google Chrome, Intel GPU Arc A770 16G VRAM with the latest drivers but without ReBAR
19:56:25-839716 INFO Starting SD.Next 19:56:25-845717 INFO Logger: file="E:\automatic\sdnext.log" level=INFO size=524555 mode=append 19:56:25-848717 INFO Python 3.10.6 on Windows 19:56:26-236785 INFO Version: app=sd.next updated=2024-02-22 hash=d6906c1b url=https://github.com/vladmandic/automatic/tree/master 19:56:27-827456 INFO Latest published version: c5f6c25a37858daedc6c59988d2e684c4fa7ddfb 2024-02-23T14:53:07Z 19:56:27-839459 INFO Platform: arch=AMD64 cpu=AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD system=Windows release=Windows-10-10.0.19045-SP0 python=3.10.6 19:56:27-844960 INFO Intel OneAPI Toolkit detected
Relevant log output
Backend
Diffusers
Branch
Master
Model
SD 1.5
Acknowledgements