ximinng / SVGDreamer

[CVPR 2024] Official implementation for "SVGDreamer: Text Guided SVG Generation with Diffusion Model" https://arxiv.org/abs/2312.16476
https://ximinng.github.io/SVGDreamer-project/
MIT License
188 stars 14 forks source link

Trouble running through the examples #3

Closed xkahn closed 5 months ago

xkahn commented 6 months ago

I'm having some trouble trying some of the samples. Here are the steps I took:

I installed created a conda environment with python 3.8 called "svgdreamer" and installed diffvg.git

I installed the pip packages: transformers, diffusers, opencv-python, shapely, hydra-core, scikit-image, torchvision, tqdm, matplotlib

But I'm getting errors on:

ModuleNotFoundError: No module named 'clip' in SVGDreamer/ImageReward/models/AestheticScore.py and

ModuleNotFoundError: No module named 'svgdreamer.svgtools.tff' in SVGDreamer/svgdreamer/svgtools/__init__.py

It doesn't appear that 'svgdreamer.svgtools.tff' is used yet, so I was able to get further by commenting that out, but clip looks important and not related to https://pypi.org/project/clip/

ximinng commented 6 months ago

Hello xkahn,

You can follow the steps below to quickly get up and running with SVGDreamer. These steps will let you run quick inference locally.

In the top level directory run,

sh script/install.sh

or using docker images,

docker run --name svgdreamer --gpus all -it --ipc=host ximingxing/svgrender:v1 /bin/bash

best regards, ximing

578578wu commented 6 months ago

First of all thank you very much for this great job. But I still don’t have the pydiffvg library after running "sh script/install.sh", show"ERROR: Could not find a version that satisfies the requirement pydiffvg (from versions: none) ERROR: No matching distribution found for pydiffvg"

578578wu commented 6 months ago

I have solved the previous problem. Thank you, but this problem still occurs. File "/root/SVGDreamer-main/diffvg/pydiffvg/render_pytorch.py", line 28, in RenderFunction filter = pydiffvg.PixelFilter(type = diffvg.FilterType.box, AttributeError: module 'diffvg' has no attribute 'FilterType'

578578wu commented 6 months ago

我在尝试某些示例时遇到了一些问题。以下是我采取的步骤:

我安装了一个名为“svgdreamer”的 python 3.8 创建的 conda 环境并安装了 diffvg.git

我安装了 pip 软件包:transformers, diffusers, opencv-python, shapely, hydra-core, scikit-image, torchvision, tqdm,matplotlib

但我收到错误:

ModuleNotFoundError: No module named 'clip'SVGDreamer/ImageReward/models/AestheticScore.py

ModuleNotFoundError: No module named 'svgdreamer.svgtools.tff'SVGDreamer/svgdreamer/svgtools/__init__.py

它似乎'svgdreamer.svgtools.tff'还没有被使用,所以我能够通过注释掉它来进一步了解,但看起来很重要并且与https://pypi.org/project/clip/clip无关

Will you encounter the lack of pre-trained models?

ximinng commented 6 months ago

download pretrained models by setting diffuser.download=True in the /conf/config.yaml.

CodeGeek04 commented 6 months ago

I have solved the previous problem. Thank you, but this problem still occurs. File "/root/SVGDreamer-main/diffvg/pydiffvg/render_pytorch.py", line 28, in RenderFunction filter = pydiffvg.PixelFilter(type = diffvg.FilterType.box, AttributeError: module 'diffvg' has no attribute 'FilterType'

https://github.com/BachiLi/diffvg/issues/27#issue-963595738