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

candle-transformers is not compiling #2621

Closed
profitgrowinginnovator opened this issue Nov 16, 2024 · 2 comments
Closed

candle-transformers is not compiling #2621

profitgrowinginnovator opened this issue Nov 16, 2024 · 2 comments

Comments

@profitgrowinginnovator
Copy link

Compiling candle-transformers v0.8.0 (/projects/ai/candle/candle/candle-transformers)
error[E0716]: temporary value dropped while borrowed
--> candle-transformers/src/models/chinese_clip/text_model.rs:157:22
|
155 | let token_type_ids = match token_type_ids {
| -------------- borrow later stored here
156 | Some(token_type_ids) => token_type_ids,
157 | None => &self.token_type_ids.i((.., 0..seq_length))?,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| | |
| | temporary value is freed at the end of this statement
| creates a temporary value which is freed while still in use
|
help: consider using a let binding to create a longer lived value
|
155 ~ let binding = self.token_type_ids.i((.., 0..seq_length))?;
156 ~ let token_type_ids = match token_type_ids {
157 | Some(token_type_ids) => token_type_ids,
158 ~ None => &binding,
|

error[E0716]: temporary value dropped while borrowed
--> candle-transformers/src/models/stable_diffusion/vae.rs:399:39
|
397 | let xs = match &self.post_quant_conv {
| -- borrow later stored here
398 | None => xs,
399 | Some(post_quant_conv) => &post_quant_conv.forward(xs)?,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| | |
| | temporary value is freed at the end of this statement
| creates a temporary value which is freed while still in use
|
help: consider using a let binding to create a longer lived value
|
397 ~ let binding = post_quant_conv.forward(xs)?;
398 ~ let xs = match &self.post_quant_conv {
399 | None => xs,
400 ~ Some(post_quant_conv) => &binding,
|

For more information about this error, try rustc --explain E0716.
error: could not compile candle-transformers (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@LaurentMazare
Copy link
Collaborator

You might have to update your rust toolchain, see #2598

@profitgrowinginnovator
Copy link
Author

Thanks for the amazingly quick response

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

2 participants