AliaksandrSiarohin / first-order-model

This repository contains the source code for the paper First Order Motion Model for Image Animation
https://aliaksandrsiarohin.github.io/first-order-model-website/
MIT License
14.57k stars 3.22k forks source link

Colab demo: widgets no longer displaying #509

Open NeilFranks opened 2 years ago

NeilFranks commented 2 years ago

Not sure if there was a recent update to colab, but now when i run the notebook, the cells all run successfully but no UI appears. Instead, I get a message from Colab saying:

Third-party Jupyter widgets
Support for third party widgets (widgets outside of the ipywidgets package) needs to be enabled separately. Support for these widgets will be loaded from a CDN external from Colab.

along with a block of code to run which supposedly enables 3rd party widgets:

from google.colab import output
output.enable_custom_widget_manager()

I can add and run that block but get the same problem, no UI. Is there a known workaround?

VigneshBaskar commented 2 years ago

I am facing the same problem

JamothyJame commented 2 years ago

I am having the same issue

JoePilliner commented 2 years ago

Likewise. Someone needs to fix it ASAP. i'm noticing that the "demo" package is yellow-underlined so that might be why? Also, could it be because one or more of the widgets is being misidentified as a custom widget?

I can see some but not all of the widgets now.

graphemecluster commented 2 years ago

Hello, I am the author of demo.ipynb. I can see that the Tab widgets disappeared after running enable_custom_widget_manager() but I am not sure if there's any difference with or without disable_custom_widget_manager(). Could anyone reproduce it now?

@JoePilliner I think it's unrelated and it might be a bug in the linter Pyright. Prepending content. to the path silences the warning but causes an error. Maybe python.analysis.extraPaths is configured incorrectly

graphemecluster commented 2 years ago

For those who are facing the problem, do pip install ipywidgets==7.7.1 fix the issue?

JoePilliner commented 2 years ago

For those who are facing the problem, do pip install ipywidgets==7.7.1 fix the issue?

Thanks for the suggestion, I gave it a try and I could still only see some of the widgets. It seems like the widgets that aren't loading are the ones with images.

graphemecluster commented 2 years ago

@JoePilliner Thanks for the try, I think that's exactly what I saw with enable_custom_widget_manager(). Could you also try running disable_custom_widget_manager()?

JoePilliner commented 2 years ago

disable_custom_widget_manager()

Is there anything I need to preface that with? Colab isn't recognising the function.

graphemecluster commented 2 years ago

Oh, I'm sorry, I just thought you could get that by reading OP’s post. What I meant was output.disable_custom_widget_manager() (output should have already been imported from google.colab by the second cell, so try put it just below the import statements).

graphemecluster commented 2 years ago

@JoePilliner In which of the following cases does the error provided by the OP occur (Support for third party widgets (widgets outside of the ipywidgets package) needs to be enabled separately. Support for these widgets will be loaded from a CDN external from Colab.), despite whether the fix works? (I can’t see the error message in any of the cases, so I need someone to reproduce it for me.)

  1. Nothing added
  2. With output.enable_custom_widget_manager() being added
  3. With output.disable_custom_widget_manager() being added
JoePilliner commented 2 years ago

@JoePilliner In which of the following cases does the error provided by the OP occur (Support for third party widgets (widgets >outside of the ipywidgets package) needs to be enabled separately. Support for these widgets will be loaded from a CDN >external from Colab.), despite whether the fix works? (I can’t see the error message in any of the cases, so I need someone to reproduce it for me.)

Nothing added With output.enable_custom_widget_manager() being added With output.disable_custom_widget_manager() being added

Hi @graphemecluster, sorry to disappear on you. I've been busy with my day job and in my spare time I've been learning how to animate in case this workbook can't be fixed.

I haven't seen the error message posted by OP since the first couple of days of the demo not working. Enabling custom widgets, disabling them, or doing neither don't trigger the error message or make the missing UI elements appear.

Running !pip install pyyaml==5.4.1 after installing the other requirments doesn't fix the interface BUT if the Generate button is pressed it will generate a video using the default image/video combo, which means that the underlying program still works.

graphemecluster commented 2 years ago

@JoePilliner Thank you for taking the time to reply. Did you see any error messages in the console in the above 3 cases? In my case, I found that I got errors from (the file transpiled from) this line when custom widget manager is enabled. I wonder if we should open an issue there.