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

mat1 and mat2 must have the same dtype, but got Half and Double #3

Open
rvijgen opened this issue Oct 14, 2024 · 0 comments
Open

mat1 and mat2 must have the same dtype, but got Half and Double #3

rvijgen opened this issue Oct 14, 2024 · 0 comments

Comments

@rvijgen
Copy link

rvijgen commented Oct 14, 2024

Hey!
I am enjoying this library a lot. When I try Interpolation though I am getting this
`
Scheduler loaded
Stable Diffusion txt2img loaded

Starting interpolation experiment

interpolation.yaml
Output folder generated at ./experiments/2024-10-14_13-25-39_txt2img_interpolation

Interpolating 2 prompts.
D:\BEdi\spacewalk\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py:283: FutureWarning: _encode_prompt() is deprecated and it will be removed in a future version. Use encode_prompt() instead. Also, be aware that the output format changed from a concatenated tensor to a tuple.
deprecate("_encode_prompt()", "1.0.0", deprecation_message, standard_warn=False)
Traceback (most recent call last):
File "D:\BEdi\spacewalk\Stable-Diffusion-Latent-Space-Explorer\run_sd_experiment.py", line 65, in
main()
File "D:\BEdi\spacewalk\Stable-Diffusion-Latent-Space-Explorer\run_sd_experiment.py", line 61, in main
run_sd_experiment(args.exp_config, exp_cfg, sd_model)
File "D:\BEdi\spacewalk\Stable-Diffusion-Latent-Space-Explorer\run_sd_experiment.py", line 42, in run_sd_experiment
experiments.run_interpolation(cfg_path, exp_cfg, sd_model)
File "D:\BEdi\spacewalk\Stable-Diffusion-Latent-Space-Explorer\experiments.py", line 227, in run_interpolation
prompt_embed_1 = sd_model.load_prompt(
File "D:\BEdi\spacewalk\Stable-Diffusion-Latent-Space-Explorer\models.py", line 252, in load_prompt
return self.encode_prompt(prompt)
File "D:\BEdi\spacewalk\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "D:\BEdi\spacewalk\Stable-Diffusion-Latent-Space-Explorer\models.py", line 177, in encode_prompt
prompt_embed = self.sd_pipeline._encode_prompt(
File "D:\BEdi\spacewalk\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 285, in _encode_prompt
prompt_embeds_tuple = self.encode_prompt(
File "D:\BEdi\spacewalk\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 393, in encode_prompt
prompt_embeds = self.text_encoder(text_input_ids.to(device), attention_mask=attention_mask)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\transformers\models\clip\modeling_clip.py", line 997, in forward
return self.text_model(
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\transformers\models\clip\modeling_clip.py", line 901, in forward
encoder_outputs = self.encoder(
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\transformers\models\clip\modeling_clip.py", line 824, in forward
layer_outputs = encoder_layer(
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\transformers\models\clip\modeling_clip.py", line 559, in forward
hidden_states, attn_weights = self.self_attn(
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\transformers\models\clip\modeling_clip.py", line 475, in forward
query_states = self.q_proj(hidden_states)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "D:\BEdi\spacewalk\lib\site-packages\torch\nn\modules\linear.py", line 118, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 must have the same dtype, but got Half and Double`

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