Comfy-Org / ComfyUI_frontend

Official front-end implementation of ComfyUI
https://www.comfy.org/
GNU General Public License v3.0
582 stars 102 forks source link

[Bug]: On ComfyUI Revision: 2546 [bfc214f4] the spell checker not function #524

Closed ShmuelRonen closed 2 months ago

ShmuelRonen commented 2 months ago

Frontend Version

Revision: 2546 [bfc214f4]

Expected Behavior

In text node like String Literal when I made spell mistake a red line come under the wrong spelling word.

Actual Behavior

On ComfyUI Revision: 2546 text node like String Literal when I made spell mistake a red line dose not come under the wrong spelling word.

Steps to Reproduce

i try to fix but nothing happaned

Debug Logs


E:\ComfyUI_4ALL>call conda activate comfyui

(comfyui) E:\ComfyUI_4ALL>python ComfyUI\main.py --windows-standalone-build --front-end-version Comfy-Org/ComfyUI_frontend@latest
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-08-17 18:32:09.588980
** Platform: Windows
** Python version: 3.11.8 | packaged by Anaconda, Inc. | (main, Feb 26 2024, 21:34:05) [MSC v.1916 64 bit (AMD64)]
** Python executable: C:\Users\derec\anaconda3\envs\comfyui\python.exe
** ComfyUI Path: E:\ComfyUI_4ALL\ComfyUI
** Log path: E:\ComfyUI_4ALL\comfyui.log

Prestartup times for custom nodes:
   0.0 seconds: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\rgthree-comfy
   0.0 seconds: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-Marigold
   0.0 seconds: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-Easy-Use
   5.4 seconds: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 24576 MB, total RAM 64703 MB
pytorch version: 2.3.0+cu121
xformers version: 0.0.26.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
Using xformers cross attention
[Prompt Server] web root: E:\ComfyUI_4ALL\ComfyUI\web
PATH BASENAME <function basename at 0x000001ABA498CD60>
REGISTRY DIR E:\ComfyUI_4ALL\output\anynode
ChromaDB Path: E:\ComfyUI_4ALL\output\anynode\chroma_db_default, exists: True
Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
Note: NumExpr detected 12 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
NumExpr defaulting to 8 threads.
C:\Users\derec\AppData\Roaming\Python\Python311\site-packages\colour\utilities\verbose.py:265: ColourWarning: "vaab/colour" was detected in "sys.path", please define a "COLOUR_SCIENCE__COLOUR__IMPORT_VAAB_COLOUR=True" environment variable to import its objects into "colour" namespace!
  warn(*args, **kwargs)  # noqa: B028

installed topaz.js to E:\ComfyUI_4ALL\ComfyUI\web\extensions\topaz
[AnimateDiff] - WARNING - xformers is enabled but it has a bug that can cause issue while using with AnimateDiff.
Adding E:\ComfyUI_4ALL\ComfyUI\custom_nodes to sys.path
E:\ComfyUI_4ALL\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\dwpose.py:26: UserWarning: DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly
  warnings.warn("DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly")

Efficiency Nodes: Attempting to add Control Net options to the 'HiRes-Fix Script' Node (comfyui_controlnet_aux add-on)...Success!
Loaded efficiency nodes from E:\ComfyUI_4ALL\ComfyUI\custom_nodes\efficiency-nodes-comfyui
Loaded ControlNetPreprocessors nodes from E:\ComfyUI_4ALL\ComfyUI\custom_nodes\comfyui_controlnet_aux
No module named 'control.control_sparsectrl'
Loaded AnimateDiff from E:\ComfyUI_4ALL\ComfyUI\custom_nodes\comfyui-animatediff\animatediff/sliding_schedule.py
Loaded IPAdapter nodes from E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus
metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
Loaded VideoHelperSuite from E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite
2024-08-17 18:32:22.631131: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
From C:\Users\derec\anaconda3\envs\comfyui\Lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.

[Crystools INFO] Crystools version: 1.13.1
[Crystools INFO] CPU: Unknown - Arch: Unknown - OS: Windows 10
[Crystools INFO] GPU/s:
[Crystools INFO] 0) NVIDIA GeForce RTX 3090
[Crystools INFO] NVIDIA Driver: 555.85
Comfy-Easy-Use v1.2.2: Loaded
!!!Hallo path was added to C:\Users\derec\anaconda3\envs\comfyui\Lib\site-packages/Hallo.pth
 if meet No module named 'hallo' error,please restart comfyui
Hallo use cache models,make sure your 'pretrained_models' complete
Open error: is JACK server running?
E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-Hallo\pretrained_models
C:\Users\derec\anaconda3\envs\comfyui\Lib\site-packages\diffusers\models\dual_transformer_2d.py:20: FutureWarning: `DualTransformer2DModel` is deprecated and will be removed in version 0.29. Importing `DualTransformer2DModel` from `diffusers.models.dual_transformer_2d` is deprecated and this will be removed in a future version. Please use `from diffusers.models.transformers.dual_transformer_2d import DualTransformer2DModel`, instead.
  deprecate("DualTransformer2DModel", "0.29", deprecation_message)

C:\Users\derec\anaconda3\envs\comfyui\Lib\site-packages\diffusers\models\transformer_2d.py:20: FutureWarning: `Transformer2DModelOutput` is deprecated and will be removed in version 0.29. Importing `Transformer2DModelOutput` from `diffusers.models.transformer_2d` is deprecated and this will be removed in a future version. Please use `from diffusers.models.transformers.transformer_2d import Transformer2DModelOutput`, instead.
  deprecate("Transformer2DModelOutput", "0.29", deprecation_message)

C:\Users\derec\anaconda3\envs\comfyui\Lib\site-packages\diffusers\models\transformer_2d.py:25: FutureWarning: `Transformer2DModel` is deprecated and will be removed in version 0.29. Importing `Transformer2DModel` from `diffusers.models.transformer_2d` is deprecated and this will be removed in a future version. Please use `from diffusers.models.transformers.transformer_2d import Transformer2DModel`, instead.
  deprecate("Transformer2DModel", "0.29", deprecation_message)

Unable to import guidedFilter, make sure you have only opencv-contrib-python or run the import_error_install.bat script
### Loading: ComfyUI-Impact-Pack (V5.18.13)
### Loading: ComfyUI-Impact-Pack (Subpack: V0.4)
[Impact Pack] Wildcards loading done.
### Loading: ComfyUI-Inspire-Pack (V0.82)
Total VRAM 24576 MB, total RAM 64703 MB
pytorch version: 2.3.0+cu121
xformers version: 0.0.26.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-LuminaWrapper\lumina_models\components.py:10: UserWarning: Cannot import apex RMSNorm, trying flash_attn RMSNorm
  warnings.warn("Cannot import apex RMSNorm, trying flash_attn RMSNorm")

E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-LuminaWrapper\lumina_models\components.py:17: UserWarning: Cannot import flash_attn RMSNorm, falling back to PyTorch RMSNorm
  warnings.warn("Cannot import flash_attn RMSNorm, falling back to PyTorch RMSNorm")

Flash Attention is available
### Loading: ComfyUI-Manager (V2.49)
### ComfyUI Revision: 2546 [bfc214f4] | Released on '2024-08-15'
--------------
 ### Mixlab Nodes: Loaded
ChatGPT.available True
edit_mask.available True
LaMaInpainting.available False
## clip_interrogator_model not found: E:\ComfyUI_4ALL\ComfyUI\models\clip_interrogator\Salesforce/blip-image-captioning-base, pls download from https://huggingface.co/Salesforce/blip-image-captioning-base
ClipInterrogator.available True
## text_generator_model not found: E:\ComfyUI_4ALL\ComfyUI\models\prompt_generator\text2image-prompt-generator, pls download from https://huggingface.co/succinctly/text2image-prompt-generator/tree/main
## zh_en_model not found: E:\ComfyUI_4ALL\ComfyUI\models\prompt_generator\opus-mt-zh-en, pls download from https://huggingface.co/Helsinki-NLP/opus-mt-zh-en/tree/main
PromptGenerate.available True
ChinesePrompt.available True
RembgNode_.available True
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
TripoSR.available
 --------------
OpenGL_accelerate module loaded
Using accelerated ArrayDatatype
C:\Users\derec\anaconda3\envs\comfyui\Lib\site-packages\pyglet\libs\win32\__init__.py:326: UserWarning: Could not set COM MTA mode. Unexpected behavior may occur.
  warnings.warn("Could not set COM MTA mode. Unexpected behavior may occur.")

Imported human4d_nodes nodes
Imported mgpt_nodes nodes
Imported smpl_nodes nodes
Imported spectre_nodes nodes
packaging is already installed.
cpuinfo is already installed.
git is already installed.
moviepy is already installed.
cv2 is already installed.
skbuild is already installed.
typing is already installed.
diskcache is already installed.
llama_cpp is already installed.

ComfyUI-N-Sidebar is loading...
No 'sb_wf_path' in settings.json. Using default path.
Failed to auto update `Quality of Life Suit`
QualityOfLifeSuit_Omar92_DIR: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI-QualityOfLifeSuit_Omar92
[ReActor] - STATUS - Running v0.5.1-a6 in ComfyUI
Torch version: 2.3.0+cu121
'd, 'll, 'm, 're, 's, 've, a, afterwards, also, although, am, amongst, amount, an, anyhow, anyway, are, as, be, became, been, beforehand, being, besides, bottom, ca, call, did, due, else, elsewhere, empty, enough, ever, everyone, everything, everywhere, except, first, former, formerly, front, had, has, have, hence, her, hers, herself, him, himself, how, however, i, indeed, itself, keep, last, latter, latterly, least, made, make, me, meanwhile, mine, moreover, move, my, myself, n't, name, namely, nevertheless, next, nobody, noone, nothing, now, nowhere, n‘t, n’t, other, others, otherwise, our, ours, ourselves, own, per, perhaps, quite, rather, re, regarding, same, say, see, serious, show, side, somehow, someone, something, sometime, sometimes, somewhere, still, than, the, their, them, themselves, then, thence, there, thereafter, thereby, therefore, therein, thereupon, they, throughout, thru, too, us, very, we, well, whatever, when, whence, whenever, whereafter, whereas, whereby, wherein, whereupon, wherever, whether, which, whither, whoever, whole, why, you, your, yours, yourself, yourselves, ‘d, ‘ll, ‘m, ‘re, ‘s, ‘ve, ’d, ’ll, ’m, ’re, ’s, ’ve
Imported node: DT_Flatten_Colors
Imported node: DT_FontText
Imported node: DT_GenerateNoise
Imported node: DT_Glitch_This
Imported node: DT_Hue_Rotation
Imported node: DT_Load_Picture_Index
Imported node: DT_PILGram
Imported node: DT_Pixel_Sort
Imported node: DT_Play_Sound_At_Execution
Imported node: DT_PromptGen
Imported node: DT_Solid_Color
Imported node: DT_Swap_Color_Mode
Imported node: DT_Flatten_Colors
Imported node: DT_FontText
Imported node: DT_GenerateNoise
Imported node: DT_Glitch_This
Imported node: DT_Hue_Rotation
Imported node: DT_Load_Picture_Index
Imported node: DT_PILGram
Imported node: DT_Pixel_Sort
Imported node: DT_Play_Sound_At_Execution
Imported node: DT_PromptGen
Imported node: DT_Solid_Color
Imported node: DT_Swap_Color_Mode
(pysssss:WD14Tagger) [DEBUG] Available ORT providers: AzureExecutionProvider, CPUExecutionProvider
(pysssss:WD14Tagger) [DEBUG] Using ORT providers: CUDAExecutionProvider, CPUExecutionProvider
Workspace manager - Openning file hash dict
🦄🦄Loading: Workspace Manager (V2.1.0)
[08/17/24 18:32:53] WARNING  Your inference package version 0.9.13 is out of date! Please upgrade to      __init__.py:35
                             version 0.16.2 of inference for the latest features and bug fixes by running
                             `pip install --upgrade inference`.
------------------------------------------
Comfyroll Studio v1.76 :  175 Nodes Loaded
------------------------------------------
** For changes, please see patch notes at https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/blob/main/Patch_Notes.md
** For help, please see the wiki at https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki
------------------------------------------
### [START] ComfyUI AlekPet Nodes ###
Node -> ArgosTranslateNode [Loading]
Node -> DeepTranslatorNode [Loading]
Node -> ExtrasNode [Loading]
Node -> GoogleTranslateNode [Loading]
Node -> PainterNode [Loading]
Node -> PoseNode [Loading]
Node -> TranslateNode [Loading]
### [END] ComfyUI AlekPet Nodes ###
FizzleDorf Custom Nodes: Loaded
hus' utility nodes: loaded
--------------
*ComfyUI_Jags_VectorMagic- nodes_loaded*
--------------
# 😺dzNodes: LayerStyle -> Cannot import name 'guidedFilter' from 'cv2.ximgproc'
A few nodes cannot works properly, while most nodes are not affected. Please REINSTALL package 'opencv-contrib-python'.
For detail refer to https://github.com/chflame163/ComfyUI_LayerStyle/issues/5
# 😺dzNodes: LayerStyle -> Warning: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_LayerStyle\resource_dir.ini not found, default directory to be used.
# 😺dzNodes: LayerStyle -> Find 1 LUTs in E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_LayerStyle\lut
# 😺dzNodes: LayerStyle -> Find 1 Fonts in E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_LayerStyle\font
# MSSpeech: Load voice setting -> E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_MSSpeech_TTS\voicelist.ini
# MSSpeech: 20 voice load successfully.
[tinyterraNodes] Loaded
All packages from requirements.txt are installed and up to date.
llama-cpp installed
All packages from requirements.txt are installed and up to date.
AutoGPTQ installed
Base directory: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_wav2lip
Checkpoints path: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_wav2lip\Wav2Lip\checkpoints
Model path: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_wav2lip\Wav2Lip\checkpoints\wav2lip_gan.pth
Wav2Lip path added to sys.path: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_wav2lip\wav2lip
Directory created or exists: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_wav2lip\facedetection
Current directory: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_wav2lip
Wav2Lip path: E:\ComfyUI_4ALL\ComfyUI\custom_nodes\ComfyUI_wav2lip\wav2lip
Using cuda for inference.
[ComfyUI_zfkun] check start
[ComfyUI_zfkun] "Pillow" is not installed. Trying to install.
Requirement already satisfied: Pillow in c:\users\derec\anaconda3\envs\comfyui\lib\site-packages (10.3.0)
[ComfyUI_zfkun] "Pillow" is installed
[ComfyUI_zfkun] all dependency installed
[ComfyUI_zfkun] check end
[ComfyUI_zfkun] boot start
[ComfyUI_zfkun] node install: preview_text.js
[ComfyUI_zfkun] node install: preview_text_multiline.js
[ComfyUI_zfkun] node install: share_screen.js
[ComfyUI_zfkun] boot end
[comfy_mtb] | INFO -> loaded 78 nodes successfuly
Traceback (most recent call last):

Browser Logs

image

What browsers do you use to access the UI ?

Brave

Other

No response

green-anger commented 2 months ago

Doesn't work on Chrome either. Checked in the inspector and got this: image Manually changing spellcheck to "true" fixes this. But it must be done for each separate input field.

@huchenlei Check your CSS, it's as if it was disabled for all textarea elements, it's the same for built-in and custom nodes.

huchenlei commented 2 months ago

I think the issue is here: https://github.com/Comfy-Org/ComfyUI_frontend/blob/6c557eaa583d969c901f9681cc811251b9768906/src/scripts/widgets.ts#L320

However the code is directly inherited from the legacy repo. I am not sure whether before the new frontend, there was a custom node that enables spell check that got broken

green-anger commented 2 months ago

I don't know the code and have no idea where opts come from, but why does anyone want to disable spellchecking, any valid use case for that? If not, maybe set it to true or reverse it - true by default and an option to disable it?

christian-byrne commented 2 months ago

I think the issue is here:

https://github.com/Comfy-Org/ComfyUI_frontend/blob/6c557eaa583d969c901f9681cc811251b9768906/src/scripts/widgets.ts#L320

However the code is directly inherited from the legacy repo. I am not sure whether before the new frontend, there was a custom node that enables spell check that got broken

Git blame says #267. Should widget spellcheck be a setting? In order to make spellcheck's red underlining reactive I had to do this:

watchEffect(() => {
  const spellcheckEnabled = useSettingStore().get('Comfy.TextareaWidget.Spellcheck')
  const textareas = document.querySelectorAll('textarea.comfy-multiline-input')
  textareas.forEach((textarea: HTMLTextAreaElement) => {
    textarea.spellcheck = spellcheckEnabled
    // Force recheck to ensure visual update
    textarea.focus()
    textarea.blur()
  })
})