candle-lora
candle-lora copied to clipboard
Flux Model
Adding the macros to the Flux Model gives error that it is now expecting an Arc
mismatched types
expected struct `Arc<(dyn LinearLayerLike + 'static)>`
found struct `candle_nn::Linear
do we need to modify the model code or are we missing something?
I tried adding Arc::new to the fields but i still get this error
the trait bound `Arc<dyn LinearLayerLike>: Module` is not satisfied
the following other types implement trait `Module`:
AttentionBlock
BeitVisionTransformer
BertLMPredictionHead
BertOnlyMLMHead
ChineseClipVisionEmbeddings
ChineseClipVisionTransformer
ClipVisionTransformer
Conv1d
and 131 others
required for `Arc<dyn LinearLayerLike>` to implement `Module`
at a few spot like this on the qkv apply
fn qkv(&self, xs: &Tensor) -> Result<(Tensor, Tensor, Tensor)> {
let qkv = xs.apply(&self.qkv)?;