Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错 #74

Open
yunjiefeng123 opened this issue Jun 24, 2024 · 0 comments
Open

报错 #74

yunjiefeng123 opened this issue Jun 24, 2024 · 0 comments

Comments

@yunjiefeng123
Copy link

尊敬的作者您好,很抱歉又来打扰您,当我用服务器运行python inference_resshift.py -i /mnt/ResShift-journal/testdata/inpainting/face/lq_mark -o /mnt/RS --mask_path /mnt/ResShift-journal/testdata/inpainting/face/mask --task inpaint_face --scale 1
这一命令时,出现Traceback (most recent call last):
File "/mnt/ResShift-journal/inference_resshift.py", line 197, in
main()
File "/mnt/ResShift-journal/inference_resshift.py", line 188, in main
resshift_sampler.inference(
File "/mnt/ResShift-journal/sampler.py", line 275, in inference
for data in dataloader:
File "/root/miniconda3/envs/resshift/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 630, in next
data = self._next_data()
File "/root/miniconda3/envs/resshift/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 674, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/root/miniconda3/envs/resshift/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/miniconda3/envs/resshift/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/mnt/ResShift-journal/datapipe/datasets.py", line 471, in getitem
im_mask = util_image.imread(im_path, chn='gray', dtype='float32')
File "/mnt/ResShift-journal/utils/util_image.py", line 465, in imread
assert im.ndim == 2, f"{str(path)} has {im.ndim} channels!"
AttributeError: 'NoneType' object has no attribute 'ndim'
我找到该项目下utils的util_image.py,运行发现NameError: name 'zero_pad' is not defined,请问该如何解决这些问题,到扰您了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant