kvfrans / clipdraw Goto Github PK
View Code? Open in Web Editor NEWcode for CLIPDraw
code for CLIPDraw
CUDA Runtime Error: the provided PTX was compiled with an unsupported toolchain. The prompt appears at diffvg/scene.cpp:35,How to solve it?
/content/diffvg/apps
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-11-725e93211bbf> in <module>()
17 text_features_neg2 = model.encode_text(text_input_neg2)
18
---> 19 import pydiffvg
20 import torch
21 import skimage
ModuleNotFoundError: No module named 'pydiffvg'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
Optimal number of iterations for Pixel Optimization code available at the end of clipdraw.ipynb
great work, can you please add a license file?
Hi @kvfrans,
I'm trying to make the generated results reproducible.
I added the following lines at the beginning of the Curve Optimizer
section of your clipdraw.ipynb
colab notebook.
random.seed(rand_seed)
torch.random.manual_seed(rand_seed)
np.random.seed(rand_seed)
However, it seems the code still generates very different images (the initial shapes look similar but then diverge) even given the same rand_seed
Do you have a clue? Thanks
when running this in google colab, it no longer works, giving an error when running the final program along the lines of
RuntimeError: radix_sort: failed on 1st step: cudaErrorInvalidDeviceFunction: invalid device function
I was able to solve this by changing Pre Installation to un-comment the !pip install torch==1.7.1...
line, then editing the cmakelists.txt file (located at /content/diffvg/) to add
string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_70,code=sm_70")
after line 87, inside if(DIFFVG_CUDA)
to force it to use the correct compute capability version for the gpu colab was using. the correct version can be found in the future here by finding the gpu listed by "inputs and notebook utilities"'s output, and replacing the 70
above (e.g. my colab instance had a tesla v100, which supports compute 7.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.