Update make_captions.py

Append sys path for make_captions.py to load blip module in the same folder to fix the error when you don't run this script under the folder
This commit is contained in:
mio
2023-06-08 23:39:06 +08:00
committed by GitHub
parent 6417f5d7c1
commit 334d07bf96

View File

@@ -3,6 +3,7 @@ import glob
import os
import json
import random
import sys
from pathlib import Path
from PIL import Image
@@ -11,6 +12,7 @@ import numpy as np
import torch
from torchvision import transforms
from torchvision.transforms.functional import InterpolationMode
sys.path.append(os.path.dirname(__file__))
from blip.blip import blip_decoder
import library.train_util as train_util