[Bug]: AttributeError: 'NoneType' object has no attribute 'shape'
Checklist
- [ ] The issue has not been resolved by following the troubleshooting guide
- [ ] The issue exists on a clean installation of Fooocus
- [X] The issue exists in the current version of Fooocus
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet
What happened?
Traceback (most recent call last): File "/content/Fooocus/modules/async_worker.py", line 1481, in worker handler(task) File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/content/Fooocus/modules/async_worker.py", line 1296, in handler imgs, img_paths, current_progress = process_task(all_steps, async_task, callback, controlnet_canny_path, File "/content/Fooocus/modules/async_worker.py", line 296, in process_task imgs = pipeline.process_diffusion( File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/content/Fooocus/modules/default_pipeline.py", line 379, in process_diffusion sampled_latent = core.ksampler( File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/content/Fooocus/modules/core.py", line 310, in ksampler samples = ldm_patched.modules.sample.sample(model, File "/content/Fooocus/ldm_patched/modules/sample.py", line 100, in sample samples = sampler.sample(noise, positive_copy, negative_copy, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed) File "/content/Fooocus/ldm_patched/modules/samplers.py", line 712, in sample return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed) File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/content/Fooocus/modules/sample_hijack.py", line 107, in sample_hacked positive = encode_model_conds(model.extra_conds, positive, noise, device, "positive", latent_image=latent_image, denoise_mask=denoise_mask) File "/content/Fooocus/ldm_patched/modules/samplers.py", line 498, in encode_model_conds out = model_function(**params) File "/content/Fooocus/ldm_patched/modules/model_base.py", line 117, in extra_conds if len(denoise_mask.shape) == len(noise.shape): AttributeError: 'NoneType' object has no attribute 'shape'
Steps to reproduce the problem
- edited one of the preset to this model https://civitai.com/models/590835/epicrealism-xl-inpainting
- dpmpp_2m_ karras, cfg 7
- inpaint and mask generate
- starts generating and stops with above error
What should have happened?
should've generated inpainted image
What browsers do you use to access Fooocus?
Vivaldi
Where are you running Fooocus?
Colab
What operating system are you using?
windows 11
Console logs
Traceback (most recent call last):
File "/content/Fooocus/modules/async_worker.py", line 1481, in worker
handler(task)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/content/Fooocus/modules/async_worker.py", line 1296, in handler
imgs, img_paths, current_progress = process_task(all_steps, async_task, callback, controlnet_canny_path,
File "/content/Fooocus/modules/async_worker.py", line 296, in process_task
imgs = pipeline.process_diffusion(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/content/Fooocus/modules/default_pipeline.py", line 379, in process_diffusion
sampled_latent = core.ksampler(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/content/Fooocus/modules/core.py", line 310, in ksampler
samples = ldm_patched.modules.sample.sample(model,
File "/content/Fooocus/ldm_patched/modules/sample.py", line 100, in sample
samples = sampler.sample(noise, positive_copy, negative_copy, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "/content/Fooocus/ldm_patched/modules/samplers.py", line 712, in sample
return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/content/Fooocus/modules/sample_hijack.py", line 107, in sample_hacked
positive = encode_model_conds(model.extra_conds, positive, noise, device, "positive", latent_image=latent_image, denoise_mask=denoise_mask)
File "/content/Fooocus/ldm_patched/modules/samplers.py", line 498, in encode_model_conds
out = model_function(**params)
File "/content/Fooocus/ldm_patched/modules/model_base.py", line 117, in extra_conds
if len(denoise_mask.shape) == len(noise.shape):
AttributeError: 'NoneType' object has no attribute 'shape'
Additional information
No response