Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RunTime Error: Input type (torch.cuda.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same #32

Open
urbanscribe opened this issue Sep 18, 2022 · 0 comments

Comments

@urbanscribe
Copy link

urbanscribe commented Sep 18, 2022

generates the SD base image fine
then fails (i[m assuming when upscaling)

Any thoughts?
windows
model and scripts installed
enviroment activated

error =
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same

full dump
File "scripts/txt2imghd.py", line 550, in
main()
File "scripts/txt2imghd.py", line 365, in main
text2img2(opt)
File "scripts/txt2imghd.py", line 489, in text2img2
init_latent = model.get_first_stage_encoding(model.encode_first_stage(init_image)) # move to latent space
File "C:\Users\ajfsh\anaconda3\envs\ldm2\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "c:\stablediffusion\stable-diffusion-main\ldm\models\diffusion\ddpm.py", line 863, in encode_first_stage
return self.first_stage_model.encode(x)
File "c:\stablediffusion\stable-diffusion-main\ldm\models\autoencoder.py", line 325, in encode
h = self.encoder(x)
File "C:\Users\ajfsh\anaconda3\envs\ldm2\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "c:\stablediffusion\stable-diffusion-main\ldm\modules\diffusionmodules\model.py", line 439, in forward
hs = [self.conv_in(x)]
File "C:\Users\ajfsh\anaconda3\envs\ldm2\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\ajfsh\anaconda3\envs\ldm2\lib\site-packages\torch\nn\modules\conv.py", line 447, in forward
return self._conv_forward(input, self.weight, self.bias)
File "C:\Users\ajfsh\anaconda3\envs\ldm2\lib\site-packages\torch\nn\modules\conv.py", line 443, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same

@urbanscribe urbanscribe changed the title RunTime Error RunTime Error: Input type (torch.cuda.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant