Comments (2)
This error seems to be not related to my code.
It is an error about reading your training images.
I haven't encountered this error before and have no idea on how to solve it.
Maybe you can search OSError: cannot identify image file
and find the solution on the Internet.
from dualstylegan.
Hi, I am training my own dataset on Colab follwing the steps of Readme, but the training fails in the second step of Facial destylization : "Step 2: Fine-tune StyleGAN". The error information is as followed:
load model: ./checkpoint/stylegan2-ffhq-config-f.pt
0%| | 0/600 [00:00<?, ?it/s]
Traceback (most recent call last):
File "finetune_stylegan.py", line 391, in
train(args, loader, generator, discriminator, g_optim, d_optim, g_ema, device)
File "finetune_stylegan.py", line 115, in train
real_img = next(loader)
File "/content/DualStyleGAN/util.py", line 58, in sample_data
for batch in loader:
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 681, in next
data = self._next_data()
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 721, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/DualStyleGAN/model/stylegan/dataset.py", line 37, in getitem
img = Image.open(buffer)
File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2657, in open
% (filename if filename else fp))
OSError: cannot identify image file <_io.BytesIO object at 0x7f070291c410>
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 2003) of binary: /usr/bin/python3
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/dist-packages/torch/distributed/launch.py", line 193, in
main()
File "/usr/local/lib/python3.7/dist-packages/torch/distributed/launch.py", line 189, in main
launch(args)
File "/usr/local/lib/python3.7/dist-packages/torch/distributed/launch.py", line 174, in launch
run(args)
File "/usr/local/lib/python3.7/dist-packages/torch/distributed/run.py", line 755, in run
)(*cmd_args)
File "/usr/local/lib/python3.7/dist-packages/torch/distributed/launcher/api.py", line 131, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/usr/local/lib/python3.7/dist-packages/torch/distributed/launcher/api.py", line 247, in launch_agent
failures=result.failures,
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:finetune_stylegan.py FAILED
Failures:
<NO_OTHER_FAILURES>
Root Cause (first observed failure):
[0]:
time : 2022-11-23_07:27:01
host : a3b13d7b3fb3
rank : 0 (local_rank: 0)
exitcode : 1 (pid: 2003)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
I guess your training pictures should be placed in the images/train/directory @wbfwonderful
from dualstylegan.
Related Issues (20)
- 为什么重建的人脸跟以前相差很多呢? HOT 1
- RuntimeError: CUDA error: no kernel image is available for execution on the device
- How to change weights for getting better results of style transformation ? HOT 2
- How to make toon image ,Instead of changing style transformation of original Image ? HOT 2
- 我想使用生成的风格图像进行风格迁移,应该如何操作呢? HOT 1
- Why " W+ " encoder giving fully different style transformation ? HOT 23
- How to use this code in mac OS and building in IOS Device ? HOT 1
- 卡通化的人物可以保留人物的真实感吗? HOT 1
- Why dose the destylization process work? HOT 3
- 灌篮高手风格模型 HOT 1
- """Add --wplus in style_transfer.py to use original w+ pSp encoder rather than z+.""" integrate in demo of Hf spaces HOT 3
- Toon images HOT 2
- integrate stable diffusion pretrained models
- How is this picture drawn? HOT 1
- Memory issue while toonifying the image using "VToonify" but not while style transfering the image using "DualStyleGAN" why ?
- AttributeError: module 'model.stylegan' has no attribute 'lpips' HOT 1
- RuntimeError: mat1 dim 1 must match mat2 dim 0 HOT 1
- RuntimeError: input must be contiguous HOT 2
- pre-train ConditionalDiscriminator HOT 1
- 生成图片的脖子有痕迹 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dualstylegan.