Giter VIP home page Giter VIP logo

sd-webui-bilingual-localization's People

Contributors

bluelovers avatar journey-ad avatar l4ph avatar rokurolize avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sd-webui-bilingual-localization's Issues

FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'localizations'

automatic: Install from URL出现如下错误,请教如何处理·,谢谢!

dirname: localizations
2023-07-06-19:28:10 image_browser.py: Module load: E:\AI\automatic\extensions\sd-webui-bilingual-localization\scripts\bilingual_localization_helper.py: FileNotFoundError
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ E:\AI\automatic\modules\script_loading.py:13 in load_module │
│ │
│ 12 │ try: │
│ ❱ 13 │ │ module_spec.loader.exec_module(module) │
│ 14 │ except Exception as e: │
│ in exec_module:883 │
│ │
│ ... 1 frames hidden ... │
│ │
│ E:\AI\automatic\extensions\sd-webui-bilingual-localization\scripts\bilingual_localization_helper.py:33 in │
│ │
│ 32 │
│ ❱ 33 list_localizations(localizations_dir) │
│ 34 │
│ │
│ E:\AI\automatic\extensions\sd-webui-bilingual-localization\scripts\bilingual_localization_helper.py:18 in │
│ list_localizations │
│ │
│ 17 │ │
│ ❱ 18 │ for file in os.listdir(dirname): │
│ 19 │ │ fn, ext = os.path.splitext(file) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'localizations'

[Bug] 下拉菜单显示 __biligual__will_be_raplaced__

通过下拉菜单选择Checkpoints, VAE, Sampling method 和 Upscaler后,下拉菜单显示**biligual__will_be_raplaced**。

如果通过Extra Networks选择Checkpoint则不会出现该问题。

228779375-694295a3-47c7-4a4b-9a26-1bd72262dfd4

228781513-5ff3700b-996f-476b-8e95-d34ef4f6e472

228779354-2e648f2a-178b-4511-98ed-d6154f31935d

通常来说,所选择Checkpoints, VAE, Sampling method 和 Upscaler的名称应该显示在下拉菜单框中(当下拉菜单收起时)。

webui版本:
22bcc7bAUTOMATIC1111/stable-diffusion-webui@22bcc7be428c94e9408f589966c2040187245d81)
可能在更早的一两个版本就出现了,但是前两天webui的更新频率特别高,所以不能确定是从具体哪个版本开始的。

操作环境:
Win11 22H2 22621.1413
Chrome Microsoft Edge

webui-user.bat指令:

@echo off

git pull

set CUDA_VISIBLE_DEVICES=0

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--xformers --no-half-vae

call webui.bat

控制台日志:

Loading VAE weights specified in settings: D:\Program Files (xStu)\A.I.Drawing\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying xformers cross attention optimization.
VAE weights loaded.
Loading weights [1d1e459f9f] from D:\Program Files (xStu)\A.I.Drawing\stable-diffusion-webui\models\Stable-diffusion\anything-v4.5.safetensors
Loading VAE weights specified in settings: cached vae-ft-mse-840000-ema-pruned.safetensors
Applying xformers cross attention optimization.
Weights loaded in 6.1s (load weights from disk: 0.6s, apply weights to model: 4.8s, load VAE: 0.1s, move model to device: 0.5s).

Total progress: 0it [00:00, ?it/s]

拓展列表:

228781900-9b8ecece-5992-4b54-b513-b6c1e3ce5250

我是一个一个排查过来的,所以基本可以确定是sd-webui-bilingual-localization出现了问题,而且下拉菜单出错时显示的也是:biligual__will_be_raplaced

错误的显示

image
如果我在下方输入英文选择想要的模型,它就会出现这种翻译显示错误

双语翻译插件在SD新版本无法正常使用

1、首先是与openpose-editor插件有冲突,安装openpose-editor插件后双语翻译插件就失效。
2、即使关闭openpose-editor插件后双语插件可以运行,也会出现其它的bug,比如在Additional Networks里无法选择lora模型,ControlNet里也无法选择预处理模型。
暂时就发现这些问题,因为基本无法使用,所以暂时关闭了双语插件,希望作者能改进一下这些BUG,非常喜欢这个双语插件,希望能尽快再用上,谢谢

有问题可以直接找我,贴吧上挂人是什么意思?

楼主还把我拉黑了,导致回复都不行。是不是有点太没有礼貌了😥

从来没和发帖的这位吵过,为什么要做出这种行为?当看到非常过激的回应的时候,我在第一时间道歉的。
有任何问题,可以直接联系我。为什么要用这种行为来侮辱人?

/* 浏览器125% 字样重叠 自定义调整 */

const customCSS = `
.bilingual__trans_wrapper {
display: inline-flex;
flex-direction: column;
align-items: center;
font-size: 9px; /* 浏览器125% 字样重叠 自定义调整 /
line-height: 0.9; /
浏览器125% 字样重叠 自定义调整 */
}

.bilingual__trans_wrapper em {
  font-style: normal;
}

fieldset span.text-gray-500:has(.bilingual__trans_wrapper),
.gr-block.gr-box span.text-gray-500:has(.bilingual__trans_wrapper),
label.block span:has(.bilingual__trans_wrapper) {
  top: -1.2em; /* 浏览器125% 字样重叠 自定义调整 */
  line-height:0.9; /* 浏览器125% 字样重叠 自定义调整 */
}

#txtimg_hr_finalres .bilingual__trans_wrapper em,
#tab_ti .output-html .bilingual__trans_wrapper em,
#dynamic-prompting .output-html .bilingual__trans_wrapper em,
#txt2img_script_container .output-html .bilingual__trans_wrapper em,
#available_extensions .extension-tag .bilingual__trans_wrapper em {
  display: none;
}

#settings .bilingual__trans_wrapper:not(#settings .tabitem .bilingual__trans_wrapper),
label>span>.bilingual__trans_wrapper,
.w-full>span>.bilingual__trans_wrapper,
.output-html .bilingual__trans_wrapper:not(th .bilingual__trans_wrapper),
.output-markdown .bilingual__trans_wrapper,
.posex_setting_cont .bilingual__trans_wrapper:not(.posex_bg .bilingual__trans_wrapper) /* Posex extension */
{
  font-size: 9px; /* 浏览器125% 字样重叠 自定义调整 */
  align-items: flex-start;
}

#extensions label .bilingual__trans_wrapper,
#available_extensions td .bilingual__trans_wrapper {
  font-size: inherit;
  line-height: inherit;
}

textarea::placeholder {
  line-height: 0.9; /* 浏览器125% 字样重叠 自定义调整 */
  padding: 3px 0; /* 浏览器125% 字样重叠 自定义调整 */
}

label>span {
  line-height: 0.9; /* 浏览器125% 字样重叠 自定义调整 */
}

div[data-testid="image"]>div>div.touch-none>div {
  background-color: rgba(255, 255, 255, .6);
  color: #222;
}

/* Posex extension */
.posex_bg {
  white-space: nowrap;
}
`

Mac版AUTOMATIC1111 SD 双语貌似不起作用

第三方语言安装的是 https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN, SD的User interface里设置None,BL里设置的zh_CN, enable 后,重启,双语没有作用。

单使用UI里的localization可以变成中文。

第三方换成https://github.com/hanamizuki-ai/stable-diffusion-webui-localization-zh_Hans,双语还是没有作用。

以为操作系统语言是英语的问题,切换成Mac中文后,双语还是没有作用。

有同样问题的童鞋吗?

设置双语时不起作用,已找到解决方法(只治标不治本)

在按照步骤,将User interface->Localization设置为None,Bilingual Localization->Localization file设置为zh_CN后,重启,双语设置依然无效。

在extensions/sd-webui-bilingual-localization/javascript/bilingual_localization.js文件中的112行(也就是if (!enabled || file === "None" || dirs === "None") return 该语句的下面一行)修改dirs如下:

dirs = '{"zh_CN": "extensions\\stable-diffusion-webui-localization-zh_CN\\localizations\\zh_CN.json"}'

其中”zh_CH“是下载的翻译的json字符串文件名,"extensions\\stable-diffusion-webui-localization-zh_CN\\localizations\\zh_CN.json"为该文件所在位置

由于我是直接在扩展中直接下载的,所以该json文件所在目录为extensions中,如果是在${根目录}/localizations,则修改为对应的目录即可(每尝试过)

修改完之后重启,双语有效了

使用雙語翻譯之後,文字類沒辦法顯示title提示,圖形的可以

使用雙語翻譯之後,文字類沒辦法顯示title提示,圖形的可以
請問可能是什麼問題
我看您的範例也能讓文字顯示title提示

可能是中文翻譯檔的問題嗎?
我是使用這一版本的翻譯
您有推薦的版本嗎
https://github.com/benlisquare/stable-diffusion-webui-localization-zh_TW?tab=readme-ov-file#%E7%BF%BB%E8%AD%AF%E5%85%A7%E5%AE%B9%E5%9F%BA%E5%BA%95%E5%8F%83%E8%80%83

和原来的汉化插件重复了

一旦开启这个插件:stable-diffusion-webui-localization-zh_CN就会出现重复翻译的问题
1.很多菜单本来是中文了,还会翻译成中文, 导致显示2行一样的菜单或者中文意思差不多的菜单.
2.已经在用户界面Localization那里设置成None了.
现在我是取消启动stable-diffusion-webui-localization-zh_CN这个插件,有些菜单可以汉化了,但是没有双语翻译的功能了, 功能里的提示也还是英文的,没有翻译过来,那这插件就没有意义了.... 还是说我不会用????

找不到简体中文语言包(zh_CN)

在【settings】里显示有下载,☑️并且重启,到了【User interface】界面,【Localization (requires restart)】找不到【zh_CN】,刷新很多次都没有用,同样的【Bilingual Localization】界面已经☑️【Enable Bilingual Localization】,也刷新不出来内容,全都是none。
请问我该如何解决这个问题?

一个建议

能否把没有对应汉化的选项的字体同样调成双语对照一样的大小?这样即使汉化更新不及时,也不会看着不协调。

over-translate in [sd-webui-prompt-highlight]

Sorry, your plugin tends to over-translate the syntax highlighting feature of the sd-webui-prompt-highlight extension. Could you please help add the sd-webui-prompt-highlight extension to the exclusion list for translation?

不好意思,你的插件在翻译文字时会把 sd-webui-prompt-highlight語法高亮功能給過度翻譯 (语法高亮用于提示词,不应当被翻译)。因此,能否请您把sd-webui-prompt-highlight的元素加入到翻譯的排除清單ignore_selector呢?

just turn

  const ignore_selector = [
    '.bilingual__trans_wrapper', // self
    '.resultsFlexContainer', // tag-autocomplete

into

  const ignore_selector = [
    '.bilingual__trans_wrapper', // self
	'.ace_line',
	'.ace_prompttoken',
    '.resultsFlexContainer', // tag-autocomplete

in javascript/bilingual_localization.js
thank you.

发现一个可能是bug的问题

7ce335825b302842dc84ccc47fd30e57_720
17ef27d5a86101cad73d6567b29677fb_720
我在用户界面里直接选择本地化文件,然后我在json文件里,加入新的词条,重载后成功显示了翻译
但是我启动双语对照,用户界面里选了none,在双语插件的设置里选择了本地化文件,却不能显示新加的翻译字段
image
image

image
我用的是journey-ad的那个翻译文件
文件放在了根目录下localization里 和双语插件目录下Localization里 都试过了

与Stable-Diffusion-Webui-Civitai-Helper插件有冲突

安装Stable-Diffusion-Webui-Civitai-Helper插件,同时开启双语插件后,在显示模型介面的Checkpoints和lora方框图显示页,无法显示Stable-Diffusion-Webui-Civitai-Helper插件的四个快捷小图标,有人在Stable-Diffusion-Webui-Civitai-Helper作者页面反映了这个问题,作者说是双语翻译插件修改了js或内嵌html脚本(本人小白,不太懂这是什么意思),见Stable-Diffusion-Webui-Civitai-Helper相关问题页的这个提问——“[BUG] Missing Icons #77”,两个插件都是非常好的插件,希望能够互相兼容,烦请作者能解决一下,谢谢

不支援翻譯 部分 下拉選單

image

https://github.com/Bing-su/adetailer/blob/22602536535f850dae19fb4886e0dc8febf88f09/adetailer/ui.py#L129

  // !After Detailer -------------
  "face_yolov8n.pt": "face_yolov8n (2D / 寫實 臉)",
  "face_yolov8n_v2.pt": "face_yolov8n (2D / 寫實 臉)",
  "face_yolov8s.pt": "face_yolov8s (2D / 寫實 臉)",
  "hand_yolov8n.pt": "hand_yolov8n (2D / 寫實 手)",
  "hand_yolov8s.pt": "hand_yolov8s (2D / 寫實 手)",
  "person_yolov8n-seg.pt": "person_yolov8n-seg (2D / 寫實 全身)",
  "person_yolov8s-seg.pt": "person_yolov8s-seg (2D / 寫實 全身)",
  "mediapipe_face_full": "mediapipe_face_full (寫實 臉)",
  "mediapipe_face_short": "mediapipe_face_short (寫實 臉)",
  "mediapipe_face_mesh": "mediapipe_face_mesh (寫實 臉)",
  "deepfashion2_yolov8s-seg.pt": "deepfashion2_yolov8s-seg (寫實 服裝)"

不支援翻譯 部分 下拉選單

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.