You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import init, { TokenizerWasm } from "./diffusion/tokenizers-wasm/tokenizers_wasm.js";
console.log("hello from diffusion_module.js")
var initialized = false;
async function getTokenizer(name) {
if (!initialized) {
await init();
}
// it seems 'name' here points to 'openai/clip-vit-large-patch14': https://huggingface.co/openai/clip-vit-large-patch14/raw/main/tokenizer.json
const jsonText = await (await fetch("https://huggingface.co/" + name + "/raw/main/tokenizer.json")).text(); // could switch this to ./diffusion/tokenizer.json, it's already a file there