RuntimeError: Input type (c10::Half) and bias type (float) should be the same

#1
by lk99 - opened

images = pipe(prompt, height=args.height, width=args.height, num_inference_steps=args.num_steps,guidance_scale=args.guidance_scale, negative_prompt=ne_prompt,num_images_per_prompt=args.num_images, generator=generator)

When I use multiple prompts to generate images, I traverse to the second prompt, and after reasoning to the end, an error will be reported here.

Loading pipeline components...: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 7/7 [00:01<00:00, 6.95it/s]100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 15/15 [00:26<00:00, 1.79s/it]100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 15/15 [00:26<00:00, 1.78s/it]172.16.139.155 - - [12/Sep/2023 09:45:35] "GET /animagine/gen/ani.txt HTTP/1.1" 500 -
Traceback (most recent call last):
File "/anaconda/envs/505/lib/python3.7/site-packages/flask/app.py", line 2552, in call
return self.wsgi_app(environ, start_response)
File "/anaconda/envs/505/lib/python3.7/site-packages/flask/app.py", line 2532, in wsgi_app
response = self.handle_exception(e)
File "/anaconda/envs/505/lib/python3.7/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/anaconda/envs/505/lib/python3.7/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/anaconda/envs/505/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/anaconda/envs/505/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/w505/AIGC/AIGC_diffusers_0911/diffusers_generator_server_0908.py", line 47, in generator_animagine_img
return generator_images(file_name, model_name, args)
File "/home/w505/AIGC/AIGC_diffusers_0911/aigc_model.py", line 90, in generator_images
num_images_per_prompt=args.num_images, generator=generator
File "/anaconda/envs/505/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/anaconda/envs/505/lib/python3.7/site-packages/diffusers-0.21.0.dev0-py3.7.egg/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py", line 845, in call
image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]
File "/anaconda/envs/505/lib/python3.7/site-packages/diffusers-0.21.0.dev0-py3.7.egg/diffusers/utils/accelerate_utils.py", line 46, in wrapper
return method(self, *args, **kwargs)
File "/anaconda/envs/505/lib/python3.7/site-packages/diffusers-0.21.0.dev0-py3.7.egg/diffusers/models/autoencoder_kl.py", line 270, in decode
decoded = self._decode(z).sample
File "/anaconda/envs/505/lib/python3.7/site-packages/diffusers-0.21.0.dev0-py3.7.egg/diffusers/models/autoencoder_kl.py", line 256, in _decode
z = self.post_quant_conv(z)
File "/anaconda/envs/505/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/anaconda/envs/505/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/anaconda/envs/505/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 460, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Input type (c10::Half) and bias type (float) should be the same

That's an A1111 issue not the model, i've had that with SDXL models that aren't this one as weell it's a python/UI isue i think

Sign up or log in to comment