cloud-cb

Results 16 comments of cloud-cb

> Can you try `sketch.colorAssets`? ```js ns.read('./test.sketch').then(sketch => { fs.writeFile('test.js', JSON.stringify(sketch.colorAssets, null, 2)) // => got an empty array too }) ``` the same result as sketch.colors

好的,谢谢你,但是iphone 5 上真的无法使用啊,亲

我碰到了和你一样的问题,直接运行 `autocut -t ./videos/xxx.mp4` 使用的是 CPU 进行处理,如何使用GPU呢?

> 我是正常的。你改一下显示字符的型号,在vs code右下角有个UTF-8,点一下,改动一下 我的右下角是 UTF-8,不能正常显示,需要怎么改?

> @yishibakaien 你把这个文件发到附件里面试试 [2022-11-07.md](https://github.com/mli/autocut/files/9952468/2022-11-07.md) 你看看这个 `.md` 文件,`.srt` 文件有同样的问题,但是 github不支持上传

![image](https://user-images.githubusercontent.com/17696228/200333697-5df24fd5-b454-4941-ba2e-9921c98c15ac.png) ![image](https://user-images.githubusercontent.com/17696228/200333750-87fdcfb5-8f40-4d2b-916f-572fd928fe7b.png) @wk-mike 这是截图

我临时解决了这个问题,对于刚刚生成的 `.md` `.srt` 文件,右下角修改 `通过编码重新打开` 选择 GB2312,然后 再次选择 `通过编码保存` 选择 UTF-8,即可。 如果你文件已经保存过编码集了,就无效了,此时需要删除现在的 `.md` `.srt` ,然后再次跑一遍`autocut -t xxx.mp4` 生成新的 `.md` `.srt` 文件,再进行上述操作 @wk-mike @automano ![image](https://user-images.githubusercontent.com/17696228/200337143-2672fe5a-c20b-4eb5-9a38-9b1ff36416ea.png) ![image](https://user-images.githubusercontent.com/17696228/200337240-dc1bcc84-2139-4a71-b40a-f12de52e821d.png) ![image](https://user-images.githubusercontent.com/17696228/200337286-dc2a4f96-83a8-473a-a9e0-960b1928a520.png)

> > 我碰到了和你一样的问题,直接运行 `autocut -t ./videos/xxx.mp4` 使用的是 CPU 进行处理,如何使用GPU呢? > > 用GPU的话,先保证你有GPU。然后安装英伟达那一套(驱动,CUDA,cuDNN)。再安装pytorch GPU版本(先看一下这个,因为还不支持最新的英伟达版本,我装的v11.7)。google一堆教程,搜一下。要注意的点就是版本要对上。还有pip的路径要加到环境变量里面。 你好,我有 GPU和、对应的驱动、还有 miniconda 环境。pytorch GPU 版本也有,版本是对的上的,我之前跑过沐神的 jupyter notebook 可以使用GPU的能力。 我这样是不是 pip 没在环境变量里 ![image](https://user-images.githubusercontent.com/17696228/200347355-fde1cba6-181d-4b11-8ccb-521c0f52cfdf.png) 但是我命令行中可以看到 pip 版本信息 ![image](https://user-images.githubusercontent.com/17696228/200347541-fe196d93-2ca6-4c41-ab52-fe77f41cd553.png)

> @yishibakaien 加pip环境变量那步主要是为了直接在命令行跑沐神的命令autocut。应该不影响GPU那里。你试一下看下输出是不是GPU的。 > > ```python > import torch > print(torch.__version__) > print(torch.cuda.is_available()) > ``` > > ![image](https://user-images.githubusercontent.com/17286982/200349003-c57bcc49-69a1-4009-851f-44378db6bd0b.png) > > 如果跟我这个一样是应该没问题的。 我跑沐神那个命令,看到GPU占用率是拉起来的,应该是用到了GPU了。 这个是通过的,但是我运行的时候显示 我正在使用CPU,然后我看了任务管理器里 CPU 基本拉满,GPU 也有使用,但是使用率不高 ![image](https://user-images.githubusercontent.com/17696228/200349575-20a466cb-a664-4c1e-ad91-a604eb62e651.png) ![image](https://user-images.githubusercontent.com/17696228/200349862-868f452f-15b9-40bc-9e65-2c2d3c7f19be.png)

> #6 可以试试这个PR不,我这边通过指定编码方式应该解决了这个问题 你好,我试了下好像没有效果,有什么地方需要特别注意的吗?