question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use "Show Progress"

See original GitHub issue

Summary: Running lightweight_gan --models_dir "path" --show-progress results in a AttributeError: 'NoneType' object has no attribute 'split'

Full error: Generating progress images: 0% 0/30 [00:04<?, ?it/s] Traceback (most recent call last): File "/usr/local/bin/lightweight_gan", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/lightweight_gan/cli.py", line 185, in main fire.Fire(train_from_folder) File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 138, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 468, in _Fire target=component.__name__) File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 672, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "/usr/local/lib/python3.6/dist-packages/lightweight_gan/cli.py", line 166, in train_from_folder model.show_progress(num_images=num_image_tiles, types=generate_types) File "/usr/local/lib/python3.6/dist-packages/torch/autograd/grad_mode.py", line 26, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/lightweight_gan/lightweight_gan.py", line 1217, in show_progress generated_image = self.generate_truncated(self.GAN.G, latents) File "/usr/local/lib/python3.6/dist-packages/torch/autograd/grad_mode.py", line 26, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/lightweight_gan/lightweight_gan.py", line 1272, in generate_truncated generated_images = evaluate_in_chunks(self.batch_size, G, style) File "/usr/local/lib/python3.6/dist-packages/lightweight_gan/lightweight_gan.py", line 99, in evaluate_in_chunks split_args = list(zip(*list(map(lambda x: x.split(max_batch_size, dim=0), args)))) File "/usr/local/lib/python3.6/dist-packages/lightweight_gan/lightweight_gan.py", line 99, in <lambda> split_args = list(zip(*list(map(lambda x: x.split(max_batch_size, dim=0), args)))) AttributeError: 'NoneType' object has no attribute 'split'

I’ve tried populating all the fields listed in the readme just to check with no luck.

For additional context here’s the command used to train the model and generate the checkpoints: lightweight_gan --num-train-steps 150000 --data /content/images --optimizer "adabelief" --attn-res-layers [32,64,128] --image-size 512 --disc-output-size 5 --models_dir "/LightGAN/" --results_dir "/LightGAN/results" --calculate_fid_every 25000

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
woctezumacommented, Jan 18, 2021

Issue arises at line 1208:

https://github.com/lucidrains/lightweight-gan/blob/359c868ec8eddd83b200e31b49f88501cbff674c/lightweight_gan/lightweight_gan.py#L1197-L1210

It looks like checkpoints (returned at line 1198) is None, as in #48.

You might want to ensure that you are running the latest release of the package.

1reaction
Dok11commented, Jan 18, 2021

Try this: lightweight_gan --name name-of-your-model --show-progress --num-image-tiles 4 --generate-types [ema] Library dont support --models_dir "path" argument.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to display progress dialog in android - Stack Overflow
Caution: Android includes another dialog class called ProgressDialog that shows a dialog with a progress bar. This widget is deprecated because ...
Read more >
Matlab - COMSOL show progress window fails to load
Hi, I might have find a way to make the progress bar appear more often. Even if Matlab was started using the 'COMSOL...
Read more >
Progress bar in update apps in Store stalls and fails to show
Applies to Windows 10 10240. To reproduce: Open Store. Navigate to Downloads. Click Check for Updates. Applications start updating.
Read more >
Apple logo with progress bar after updating or restoring ...
The progress bar shows installation progress. ... This process can take as little as a minute if your device has little or no...
Read more >
unable to display training progress using SVM classifier
unable to display training progress using SVM... Learn more about deep learning, cnn, svm MATLAB.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found