본문 바로가기
728x90
반응형

분류 전체보기167

ncclInvalidArgument: Invalid value for an argument. pytorch 분산 처리 코드 부분에서 다음과 같은 에러가 발생하는 경우가 있습니다. File "/opt/conda/lib/python3.10/site-packages/torch/distributed/c10d_logger.py", line 47, in wrapper return func(*args, **kwargs) File "/opt/conda/lib/python3.10/site-packages/torch/distributed/distributed_c10d.py", line 2806, in all_gather work = default_pg.allgather([tensor_list], [tensor])torch.distributed.DistBackendError: NCCL error in.. 2024. 9. 20.
[Pytorch] 메모리 효율적으로 사용하기 딥러닝으로 task를 진행할 때 여러 모델을 연속적으로 사용해야 하는 경우가 종종 있습니다. 이 때 pytorch에서 메모리를 좀 더 효율적으로 사용할 수 있는 방법에 대해 작성해보겠습니다. 1) 먼저 사용할 모델을 gpu로 옮겨줍니다.model.to($device) 2) 모델의 사용이 끝나면 바로 cpu로 옮겨줍니다.model.to('cpu') 3) garbage collect를 실행하고, 메모리를 비워줍니다.gc.collect()torch.cuda.empty_cache()torch.cuda.ipc_collect() 2024. 8. 30.
ValueError: Cannot load <class 'diffusers.models.controlnet.ControlNetModel'> from / because the following keys are missing: Please make sure to pass `low_cpu_mem_usage=False` and `device_map=None` if you want to randomly initialize those weights or else [전체 에러문구]ValueError: Cannot load from / because the following keys are missing: Please make sure to pass `low_cpu_mem_usage=False` and `device_map=None` if you want to randomly initialize those weights or else make sure your checkpoint file is correct. 아래 코드로 controlnet 모델을 로드 할  때 발생하는 에러입니다.controlnet = ControlNetModel.from_pretrained('controlnet', t.. 2024. 8. 13.
[3] PhotoMaker: Customizing Realistic Human Photos via Stacked ID Embedding [Paper] https://openaccess.thecvf.com//content/CVPR2024/papers/Li_PhotoMaker_Customizing_Realistic_Human_Photos_via_Stacked_ID_Embedding_CVPR_2024_paper.pdf [Github] https://github.com/TencentARC/PhotoMaker GitHub - TencentARC/PhotoMaker: PhotoMakerPhotoMaker. Contribute to TencentARC/PhotoMaker development by creating an account on GitHub.github.com  1. Introduction  바로 앞의 FaceChain과 마찬가지로 pers.. 2024. 7. 30.
728x90
반응형