Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
chore: cleanup unused struct
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Apr 10, 2023
1 parent e27f0f6 commit 1351924
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/clip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,14 @@
use std::path::PathBuf;

use ndarray::Array2;
use serde::{Deserialize, Serialize};
use tokenizers::{models::bpe::BPE, EncodeInput, Tokenizer};

#[derive(Serialize, Deserialize)]
pub struct CLIPStandardTokenizerWrapper {
#[serde(flatten)]
pub tokenizer: Tokenizer,
pub model_max_length: usize,
pub bos_token_id: u32,
pub eos_token_id: u32
}

/// A basic [CLIP](https://arxiv.org/abs/2103.00020) tokenizer.
///
/// CLIP is used by many diffusion models, including Stable Diffusion, for prompt tokenization and feature extraction.
pub struct CLIPStandardTokenizer {
/// The contained [`Tokenizer`] - you probably don't want to use this directly, see
/// [`CLIPStandardTokenizer::encode`] instead.
pub inner: Tokenizer,
model_max_length: usize,
bos_token_id: u32,
Expand Down

0 comments on commit 1351924

Please sign in to comment.