Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Python脚本在Linux环境下报错 #595

Closed
1 of 3 tasks
Anonymous-AI1 opened this issue Oct 25, 2024 · 10 comments
Closed
1 of 3 tasks

[Bug] Python脚本在Linux环境下报错 #595

Anonymous-AI1 opened this issue Oct 25, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@Anonymous-AI1
Copy link

Please carefully review each item in the checklist below | 请认真检查以下清单中的每一项 | 以下のチェックリストの各項目を注意深く確認してください

  • Searched and didn't find a similar issue | 已经搜索过,没有发现类似issue | 類似の問題が見つかりませんでした
  • Searched documentation and didn't find relevant content | 已经搜索过文档,没有发现相关内容 | ドキュメントを検索して関連する内容が見つかりませんでした
  • Tried with the latest version and the issue still exists | 已经尝试使用过最新版,问题依旧存在 | 最新バージョンを試しましたが問題は解消されませんでした

Software Version | 软件版本 | ソフトウェアバージョン

Final2x-core 2.1.0

Operating System | 操作系统 | オペレーティングシステム

Ubuntu x64

System Version | 系统版本 | システムバージョン

Ubuntu 20.04.6 LTS

Describe the bug | 描述错误 | BUGの説明

详见复现步骤 + 错误日志

To reproduce | 复现步骤 | 再現方法

首先按照要求安装了依赖库(Python 3.10.15)

pip install Final2x-core
Final2x-core -c
sudo apt install -y libomp5 xdg-utils

随后运行如下Python脚本

import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0, 1, 2, 3'

from typing import List
import Final2x_core as Fin

def upscale(picPATH: List[str]) -> None:
    config = Fin.SRCONFIG()
    config.inputpath = picPATH
    config.outputpath = 'outputs'
    config.model = 'RealCUGAN-pro'
    config.modelscale = 2
    config.modelnoise = -1
    Fin.SR_queue()

a = [
"aa.jpg",
]
upscale(a)

出现下述报错(见报错日志)

Error log | 报错日志 | ログ

find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
find_blob_index_by_name in0 failed
Try
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try
....
find_blob_index_by_name gap0 failed
Try
find_blob_index_by_name gap1 failed
Try
find_blob_index_by_name gap2 failed
Try
find_blob_index_by_name gap3 failed
Try

Additional context | 附加内容 | 追加コンテキスト

似乎是在用 pip 更新 Final2x_core 库版本后发生的

@Anonymous-AI1 Anonymous-AI1 added the bug Something isn't working label Oct 25, 2024
@Tohrusky
Copy link
Owner

Tohrusky commented Oct 25, 2024

我也忘了 你要搞图片超分的话可以用用最近写的库 torch比ncnn快的

https://github.com/TensoRaws/ccrestoration

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I also forgot that if you want to super score images, you can use the recently written library.

@Tohrusky
Copy link
Owner

要不试试看用上游的库 https://github.com/Final2x/realcugan-ncnn-py

@Anonymous-AI1
Copy link
Author

我也忘了 你要搞图片超分的话可以用用最近写的库 torch比ncnn快的

https://github.com/TensoRaws/ccrestoration

okk,那我按照这个试试吧,主要是之前还能用来着,突然就不 work 了

看了下 demo,如果用 ccrestoration,是无需再配置 scale, noise 了嘛

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I also forgot that if you want to super score images, you can use the recently written library torch, which is faster than ncnn.

https://github.com/TensoRaws/ccrestoration

okk, then I will give it a try according to this. The main reason is that it was still working before, but suddenly it stopped working.

After watching the demo, if you use ccrestoration, there is no need to configure scale and noise.

@Tohrusky
Copy link
Owner

看了下 demo,如果用 ccrestoration,是无需再配置 scale, noise 了嘛

缩放,队列,RGBA图片处理啥的得自己写了,lib只提供最基本的接口
这些noise啥的一般来说是对应不同的weight,也有特殊的可能是个param

https://github.com/TensoRaws/ccrestoration/blob/main/example/sisr.py

这里有注册配置,修改默认配置的demo

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


After watching the demo, if you use ccrestoration, there is no need to configure scale and noise.

You have to write scaling, queueing, RGBA image processing, etc. by yourself. The lib only provides the most basic interface.
Generally speaking, these noises correspond to different weights, and in some cases, they may be a param.

https://github.com/TensoRaws/ccrestoration/blob/main/example/sisr.py

Here are registration configurations and demos for modifying the default configurations.

@Anonymous-AI1
Copy link
Author

感谢

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


grateful

@Tohrusky
Copy link
Owner

https://github.com/Final2x/Final2x-core/blob/main/src/Final2x_core/__main__.py#L56

新版本的模型不再用上游库里面的 改成在线下载了
可能是这个原因 得手动调用下哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants