Write a working Google Colab for this.
- User
Write a working Google Colab for this.
Assistant
I'll help you create a Google Colab notebook to run FlashSR. Here's a complete working example:
python#@title Install Dependencies and Download Weights %%capture !git clone https://github.com/jakeoneijk/FlashSR_Inference.git %cd FlashSR_Inference !pip install torch torchvision torchaudio !pip install -e ./ # Download model weights from Hugging Face !wget https://huggingface.co/datasets/jakeoneijk/FlashSR_weights/resolve/main/student_ldm.pth -P ModelWeights/ !wget https://huggingface.co/datasets/jakeoneijk/FlashSR_weights/resolve/main/sr_vocoder.pth -P ModelWeights/ !wget https://huggingface.co/datasets/jakeoneijk/FlashSR_weights/resolve/main/vae.pth -P ModelWeights/python#@title Import Required Libraries import torch from TorchJaekwon.Util.UtilAudio import UtilAudio from TorchJaekwon.Util.UtilData import UtilData from FlashSR.FlashSR import FlashSR # Set device device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') print(f"Using device: {device}")python#@title Initialize FlashSR Model student_ldm_ckpt_path = './ModelWeights/student_ldm.pth' sr_vocoder_ckpt_path = './ModelWeights/sr_vocoder.pth' vae_ckpt_path = './ModelWeights/vae.pth' # Initialize model flashsr = FlashSR(student_ldm_ckpt_path, sr_vocoder_ckpt_path, vae_ckpt_path) flashsr = flashsr.to(device)python
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.