Skip to content

Commit

Permalink
INFERENCEKIND
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Nov 11, 2023
1 parent 590ce48 commit c4d5ebe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/voicevox_core/src/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub(crate) trait InferenceSignature: Sized + Send + 'static {
type Group: InferenceGroup;
type Input: InferenceInputSignature<Signature = Self>;
type Output: TryFrom<Vec<OutputTensor>, Error = anyhow::Error> + Send;
const INFERENCE: <Self::Group as InferenceGroup>::Kind;
const KIND: <Self::Group as InferenceGroup>::Kind;
}

pub(crate) trait InferenceInputSignature: Send + 'static {
Expand Down Expand Up @@ -121,7 +121,7 @@ impl<G: InferenceGroup, R: InferenceRuntime> InferenceSessionSet<G, R> {
I::Signature: InferenceSignature<Group = G>,
{
InferenceSessionCell {
inner: self.0[I::Signature::INFERENCE].clone(),
inner: self.0[I::Signature::KIND].clone(),
marker: PhantomData,
}
}
Expand Down
6 changes: 3 additions & 3 deletions crates/voicevox_core/src/infer/signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl InferenceSignature for PredictDuration {
type Group = InferenceGroupImpl;
type Input = PredictDurationInput;
type Output = PredictDurationOutput;
const INFERENCE: InferencelKindImpl = InferencelKindImpl::PredictDuration;
const KIND: InferencelKindImpl = InferencelKindImpl::PredictDuration;
}

#[derive(InferenceInputSignature)]
Expand All @@ -44,7 +44,7 @@ impl InferenceSignature for PredictIntonation {
type Group = InferenceGroupImpl;
type Input = PredictIntonationInput;
type Output = PredictIntonationOutput;
const INFERENCE: InferencelKindImpl = InferencelKindImpl::PredictIntonation;
const KIND: InferencelKindImpl = InferencelKindImpl::PredictIntonation;
}

#[derive(InferenceInputSignature)]
Expand All @@ -71,7 +71,7 @@ impl InferenceSignature for Decode {
type Group = InferenceGroupImpl;
type Input = DecodeInput;
type Output = DecodeOutput;
const INFERENCE: InferencelKindImpl = InferencelKindImpl::Decode;
const KIND: InferencelKindImpl = InferencelKindImpl::Decode;
}

#[derive(InferenceInputSignature)]
Expand Down

0 comments on commit c4d5ebe

Please sign in to comment.