<jupyter_start><jupyter_text>Here is the [glide-finetune repo](https://github.com/afiaka87/glide-finetune) code modified to make it work on Colab. Tested only with Colab Pro so far.[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/eliohead/glide-finetune-colab/blob/main/glide_finetune_colab.ipynb)<jupyter_code>!git clone https://github.com/eliohead/glide-finetune
!cd glide-finetune/
!pip install -r '/content/glide-finetune/requirements.txt'
!pip install webdataset==0.1.103<jupyter_output><empty_output><jupyter_text>**Train GLIDE**- **Make sure** your dataset folder is named '**data**'. Exact path has to be **'/content/data'**- Images and text files has to be all together in the folder. If an image is named *001.jpg* its relative txt file should be named *001.txt* and so on.- I deactivated sampling during training because continued to give me errors here in Colab. Only checkpoints will be saved (.pt files) and you can test image quality directly in testing notebook.<jupyter_code>!python '/content/glide-finetune/train_glide.py' \
  --epochs 20 \
  --use_captions \
  --project_name 'finetune1' \
  --batch_size 4 \
  --learning_rate 1e-04 \
  --side_x 64 \
  --side_y 64 \
  --resize_ratio 1.0 \
  --uncond_p 0.2 \
  --checkpoints_dir '/content/checkpoints' \<jupyter_output><empty_output><jupyter_text>**Train Upsampler**- Also here I deactivated sampling during training. Only checkpoints will be saved (.pt files) and you can test image quality directly in testing notebook.<jupyter_code>!python '/content/glide-finetune/train_glide.py' \
  --train_upsample \
  --epochs 40 \
  --learning_rate 1e-04 \
  --side_x 64 \
  --side_y 64 \
  --uncond_p 0.0 \
  --checkpoints_dir '/content/checkpoints' \<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1280353200883002, 'fraction_numerical': 0.02152317880794702, 'mean_word_length': 4.078431372549019, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '445034', 'license': 'MIT', 'n_tokens_mistral': 665, 'n_tokens_neox': 624, 'n_words': 169, 'path': 'glide_finetune_colab.ipynb', 'repo_name': 'eliohead/glide-finetune', 'size': '1812'}