Open BreadMoon opened 3 years ago
!python encode_images.py --optimizer=lbfgs --face_mask=True --iterations=6 --use_lpips_loss=0 --use_discriminator_loss=0 --output_video=True aligned_images/ generated_images/ latent_representations/ print("\n************ Latent code optimization finished! ***************")
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
apt-get install libgl1-mesa-glx
OSError: Google Drive quota exceeded
원격 접속으로 파일 직접 받아 해결, Notion에 업로드 하겠음
encode_images.py
parser.add_argument('--model_url', default='https://drive.google.com/uc?id=1MEGjdvVpUsu1jB4zrXZN7Y4kBBOzizDQ', help='Fetch a StyleGAN model to train on from this URL') #
default값 변경
https://drive.google.com/file/d/1CA7bap7-XHpU5p59zfOAxqy4QMoF4MnE/view?usp=sharing
2021-09-10 04:00:09.852414: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: CUDA_ERROR_INVALID_DEVICE: invalid device ordinal
Traceback (most recent call last):
File "encode_images.py", line 242, in
**** Latent code optimization finished! ***
cuda issue, picle.load() issue
/encode_images.py
with dnnlib.util.open_url(args.model_url, cache_dir=config.cache_dir) as f:
generator_network, discriminator_network, Gs_network = pickle.load(f)
/dnnlb/util.py
if cache_dir is not None:
safe_name = re.sub(r"[^0-9a-zA-Z-._]", "_", url_name)
cache_file = os.path.join(cache_dir, url_md5 + "_" + safe_name)
temp_file = os.path.join(cache_dir, "tmp_" + uuid.uuid4().hex + "_" + url_md5 + "_" + safe_name)
os.makedirs(cache_dir, exist_ok=True)
with open(temp_file, "wb") as f:
f.write(url_data)
os.replace(temp_file, cache_file) # atomic
위 코드에서 error 발생.