chflame163 / ComfyUI_LayerStyle

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
MIT License
1.38k stars 78 forks source link

The first time I ran LayerUtility: JoyCaption2, it worked fine. However, when I modified the options in the caption type, an error message appeared. It's amazing that I restarted and enabled Comfy UI to run it again, but when I switched caption types, an error message appeared. Is this a bug? #356

Open CYDOPS opened 1 week ago

CYDOPS commented 1 week ago

ComfyUI Error Report

Error Details

## System Information
- **ComfyUI Version:** v0.2.3
- **Arguments:** D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\main.py --auto-launch --preview-method auto --disable-cuda-malloc
- **OS:** nt
- **Python Version:** 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
- **Embedded Python:** false
- **PyTorch Version:** 2.3.1+cu121
## Devices

- **Name:** cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync
  - **Type:** cuda
  - **VRAM Total:** 12884246528
  - **VRAM Free:** 6429501422
  - **Torch VRAM Total:** 6341787648
  - **Torch VRAM Free:** 1045063662

## Logs

2024-10-16 18:54:46,995 - root - INFO - Total VRAM 12287 MB, total RAM 32537 MB 2024-10-16 18:54:46,995 - root - INFO - pytorch version: 2.3.1+cu121 2024-10-16 18:54:48,800 - root - INFO - xformers version: 0.0.27 2024-10-16 18:54:48,800 - root - INFO - Set vram state to: NORMAL_VRAM 2024-10-16 18:54:48,801 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync 2024-10-16 18:54:49,105 - root - INFO - Using xformers cross attention 2024-10-16 18:54:50,517 - root - INFO - [Prompt Server] web root: D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\web 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path checkpoints D:/sd-webui-aki-v4/models/Stable-diffusion 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path configs D:/sd-webui-aki-v4/models/Stable-diffusion 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path vae D:/sd-webui-aki-v4/models/VAE 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path loras D:/sd-webui-aki-v4/models/Lora 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path loras D:/sd-webui-aki-v4/models/LyCORIS 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path upscale_models D:/sd-webui-aki-v4/models/ESRGAN 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path upscale_models D:/sd-webui-aki-v4/models/RealESRGAN 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path upscale_models D:/sd-webui-aki-v4/models/SwinIR 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path embeddings D:/sd-webui-aki-v4/embeddings 2024-10-16 18:54:50,523 - root - INFO - Adding extra search path hypernetworks D:/sd-webui-aki-v4/models/hypernetworks 2024-10-16 18:54:50,524 - root - INFO - Adding extra search path controlnet D:/sd-webui-aki-v4/extensions/sd-webui-controlnet/models 2024-10-16 18:54:54,219 - root - INFO - Total VRAM 12287 MB, total RAM 32537 MB 2024-10-16 18:54:54,219 - root - INFO - pytorch version: 2.3.1+cu121 2024-10-16 18:54:54,220 - root - INFO - xformers version: 0.0.27 2024-10-16 18:54:54,220 - root - INFO - Set vram state to: NORMAL_VRAM 2024-10-16 18:54:54,220 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync 2024-10-16 18:54:56,130 - root - INFO - -------------- 2024-10-16 18:54:56,130 - root - INFO -  ### Mixlab Nodes: Loaded 2024-10-16 18:54:56,147 - root - INFO - ChatGPT.available True 2024-10-16 18:54:56,148 - root - INFO - editmask.available True 2024-10-16 18:54:57,610 - root - INFO - ClipInterrogator.available True 2024-10-16 18:54:57,816 - root - INFO - PromptGenerate.available True 2024-10-16 18:54:57,816 - root - INFO - ChinesePrompt.available True 2024-10-16 18:54:57,816 - root - INFO - RembgNode.available True 2024-10-16 18:54:58,382 - root - INFO - TripoSR.available 2024-10-16 18:54:58,383 - root - INFO - MiniCPMNode.available 2024-10-16 18:54:58,438 - root - INFO - Scenedetect.available 2024-10-16 18:54:58,588 - root - INFO - FishSpeech.available 2024-10-16 18:54:58,600 - root - INFO - SenseVoice.available 2024-10-16 18:54:58,639 - root - INFO - Whisper.available False 2024-10-16 18:54:58,654 - root - INFO - FalVideo.available 2024-10-16 18:54:58,655 - root - INFO -  --------------  2024-10-16 18:55:07,877 - root - INFO - Import times for custom nodes: 2024-10-16 18:55:07,877 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\websocket_image_save.py 2024-10-16 18:55:07,877 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\AIGODLIKE-ComfyUI-Translation 2024-10-16 18:55:07,877 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\tiled_ksampler 2024-10-16 18:55:07,877 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\FreeU_Advanced 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Miaoshouai-Tagger 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ControlNet-LLLite-ComfyUI 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\cg-use-everywhere 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_3dPoseEditor 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Inpaint-CropAndStitch 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_ADV_CLIP_emb 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-seamless-tiling 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Adaptive-Guidance 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\masquerade-nodes-comfyui 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-BRIA_AI-RMBG 2024-10-16 18:55:07,878 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\cg-image-picker 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\stability-ComfyUI-nodes 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyLiterals 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-WD14-Tagger 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_TiledKSampler 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\wlsh_nodes 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_experiments 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\PowerNoiseSuite 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_IPAdapter_plus 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-TiledDiffusion 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-MingNodes 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\images-grid-comfy-plugin 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\AuraSR-ComfyUI 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\comfy-image-saver 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\comfyui-various 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_essentials 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Custom-Scripts 2024-10-16 18:55:07,879 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\virtuoso-nodes 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_UltimateSDUpscale 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Florence2 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\Derfuu_ComfyUI_ModdedNodes 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Advanced-ControlNet 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Marigold 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\comfyui_bmad_nodes 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\rgthree-comfy 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\efficiency-nodes-comfyui 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\comfyui_controlnet_aux 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-KJNodes 2024-10-16 18:55:07,880 - root - INFO - 0.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-AnimateDiff-Evolved 2024-10-16 18:55:07,880 - root - INFO - 0.1 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_Comfyroll_CustomNodes 2024-10-16 18:55:07,881 - root - INFO - 0.1 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-KwaiKolorsWrapper 2024-10-16 18:55:07,881 - root - INFO - 0.1 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_MiniCPM-V-2_6-int4 2024-10-16 18:55:07,881 - root - INFO - 0.1 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Crystools 2024-10-16 18:55:07,881 - root - INFO - 0.1 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\Comfyui-ergouzi-Nodes 2024-10-16 18:55:07,881 - root - INFO - 0.1 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Inspire-Pack 2024-10-16 18:55:07,881 - root - INFO - 0.1 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\eden_comfy_pipelines 2024-10-16 18:55:07,881 - root - INFO - 0.1 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\comfyui-tensorops 2024-10-16 18:55:07,881 - root - INFO - 0.2 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_LayerStyle 2024-10-16 18:55:07,881 - root - INFO - 0.2 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Impact-Pack 2024-10-16 18:55:07,881 - root - INFO - 0.3 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-BrushNet 2024-10-16 18:55:07,881 - root - INFO - 0.3 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\comfy_mtb 2024-10-16 18:55:07,881 - root - INFO - 0.4 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Gemini 2024-10-16 18:55:07,881 - root - INFO - 0.4 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Manager 2024-10-16 18:55:07,881 - root - INFO - 0.4 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_FizzNodes 2024-10-16 18:55:07,881 - root - INFO - 0.5 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Easy-Use 2024-10-16 18:55:07,881 - root - INFO - 0.8 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-Anyline 2024-10-16 18:55:07,882 - root - INFO - 0.9 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI-SUPIR 2024-10-16 18:55:07,882 - root - INFO - 3.0 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_Custom_Nodes_AlekPet 2024-10-16 18:55:07,882 - root - INFO - 3.9 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\was-node-suite-comfyui 2024-10-16 18:55:07,882 - root - INFO - 3.9 seconds: D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\comfyui-mixlab-nodes 2024-10-16 18:55:07,882 - root - INFO - 2024-10-16 18:55:07,897 - root - INFO - Starting server

2024-10-16 18:55:07,898 - root - INFO - To see the GUI go to: http://127.0.0.1:8188 2024-10-16 18:55:25,322 - root - INFO - got prompt 2024-10-16 18:56:00,439 - root - INFO - model weight dtype torch.float16, manual cast: None 2024-10-16 18:56:00,440 - root - INFO - model_type EPS 2024-10-16 18:56:09,289 - root - INFO - Using xformers attention in VAE 2024-10-16 18:56:09,291 - root - INFO - Using xformers attention in VAE 2024-10-16 18:56:09,847 - root - INFO - Requested to load SDXLClipModel 2024-10-16 18:56:09,847 - root - INFO - Loading 1 new model 2024-10-16 18:56:09,855 - root - INFO - loaded completely 0.0 1560.802734375 True 2024-10-16 18:56:14,102 - root - INFO - Requested to load SDXLClipModel 2024-10-16 18:56:14,102 - root - INFO - Loading 1 new model 2024-10-16 18:56:14,777 - root - INFO - Using xformers attention in VAE 2024-10-16 18:56:14,778 - root - INFO - Using xformers attention in VAE 2024-10-16 18:56:15,222 - root - INFO - Requested to load SDXL 2024-10-16 18:56:15,222 - root - INFO - Loading 1 new model 2024-10-16 18:56:16,644 - root - INFO - loaded completely 0.0 4897.0483474731445 True 2024-10-16 18:56:27,545 - root - INFO - Requested to load AutoencoderKL 2024-10-16 18:56:27,545 - root - INFO - Loading 1 new model 2024-10-16 18:56:27,797 - root - INFO - loaded completely 0.0 159.55708122253418 True 2024-10-16 18:56:29,968 - root - INFO - Prompt executed in 64.64 seconds 2024-10-16 18:57:05,810 - root - INFO - got prompt 2024-10-16 18:57:25,229 - root - ERROR - !!! Exception during processing !!! local variable 'text_model' referenced before assignment 2024-10-16 18:57:25,231 - root - ERROR - Traceback (most recent call last): File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 323, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 198, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_LayerStyle\py\joycaption_alpha_2.py", line 499, in joycaption2 model = load_models(llm_model_path, dtype, vlm_lora, device) File "D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_LayerStyle\py\joycaption_alpha_2.py", line 168, in load_models return Joy2_Model(clip_processor, clip_model, tokenizer, text_model, image_adapter) UnboundLocalError: local variable 'text_model' referenced before assignment

2024-10-16 18:57:25,232 - root - INFO - Prompt executed in 19.42 seconds 2024-10-16 18:57:27,417 - root - INFO - got prompt 2024-10-16 18:57:44,321 - root - ERROR - !!! Exception during processing !!! local variable 'text_model' referenced before assignment 2024-10-16 18:57:44,321 - root - ERROR - Traceback (most recent call last): File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 323, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 198, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_LayerStyle\py\joycaption_alpha_2.py", line 499, in joycaption2 model = load_models(llm_model_path, dtype, vlm_lora, device) File "D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_LayerStyle\py\joycaption_alpha_2.py", line 168, in load_models return Joy2_Model(clip_processor, clip_model, tokenizer, text_model, image_adapter) UnboundLocalError: local variable 'text_model' referenced before assignment

2024-10-16 18:57:44,322 - root - INFO - Prompt executed in 16.90 seconds 2024-10-16 19:01:58,780 - root - INFO - got prompt 2024-10-16 19:02:17,298 - root - ERROR - !!! Exception during processing !!! local variable 'text_model' referenced before assignment 2024-10-16 19:02:17,299 - root - ERROR - Traceback (most recent call last): File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 323, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 198, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "D:\comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_LayerStyle\py\joycaption_alpha_2.py", line 499, in joycaption2 model = load_models(llm_model_path, dtype, vlm_lora, device) File "D:\Comfy UI\ConfyUI-aki\ComfyUI-aki-v1.4\custom_nodes\ComfyUI_LayerStyle\py\joycaption_alpha_2.py", line 168, in load_models return Joy2_Model(clip_processor, clip_model, tokenizer, text_model, image_adapter) UnboundLocalError: local variable 'text_model' referenced before assignment

2024-10-16 19:02:17,299 - root - INFO - Prompt executed in 18.51 seconds

## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.

{"last_node_id":28,"last_link_id":39,"nodes":[{"id":22,"type":"Eff. Loader SDXL","pos":{"0":1980,"1":690},"size":{"0":400,"1":402},"flags":{},"order":8,"mode":0,"inputs":[{"name":"lora_stack","type":"LORA_STACK","link":null,"shape":7,"label":"LoRA堆"},{"name":"cnet_stack","type":"CONTROL_NET_STACK","link":null,"shape":7,"label":"ControlNet堆"},{"name":"positive","type":"STRING","link":32,"widget":{"name":"positive"},"label":"正面条件"}],"outputs":[{"name":"SDXL_TUPLE","type":"SDXL_TUPLE","links":[31],"label":"SDXL元组"},{"name":"LATENT","type":"LATENT","links":[33],"slot_index":1,"label":"Latent"},{"name":"VAE","type":"VAE","links":[34],"slot_index":2,"label":"VAE"},{"name":"DEPENDENCIES","type":"DEPENDENCIES","links":null,"label":"依赖"}],"properties":{"Node name for S&R":"Eff. Loader SDXL"},"widgets_values":["福瑞尔1.0.safetensors",-1,"None",-2,6,2,"sdxl_vae_fp16fix.safetensors","CLIP_POSITIVE","Touching hair,Disharmonious body proportions, (bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities: 1.3), upper body lenses, missing fingers, bad hands, hand and finger mutations, poorly drawn face, hand deformities, skin blemishes, skin spots, acne, bad body, body too long, missing limbs, fused fingers, extra fingers, too many fingers, limb deformities, (obesity: 1.2), long neck, floating limbs, extra legs, bad feet, disconnected limbs, deformities, mutations, extra limbs, strabismus, extra arms, mutations, hand mutations , badly drawn hands, disfigured, arms too long, (worst quality, low quality, normal quality, low resolution, low detail, oversaturated, desaturated, overexposed, underexposed, grayscale, black and white, bad photo, bad photography, bad art: 1.4), (watermark, signature, text font, username, error, logo, word, letter, number, autograph, sign, name: 1.2), (blurry, unclear, grainy), (painting: 1.4), sick, ugly, asymmetric, mutant deformation, incomplete, poor lighting, bad shadows, rough draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitches, repeated, (inkjet, cartoon, animation, semi-realism, cgi, render, blender, digital art, comics, amateur: 1.3), (3d, 3d game, 3d game scene, 3d character: 1.1),","none","comfy",832,1216,1,true,true],"color":"#223322","bgcolor":"#335533","shape":"box"},{"id":26,"type":"PreviewImage","pos":{"0":-155.6243896484375,"1":597.4609375},"size":{"0":367.8206787109375,"1":582.377197265625},"flags":{},"order":12,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":37,"label":"图像"}],"outputs":[],"properties":{"Node name for S&R":"PreviewImage"},"widgets_values":[]},{"id":15,"type":"ShowText|pysssss","pos":{"0":-155.6243896484375,"1":421.4609375},"size":{"0":385.1457824707031,"1":145.11050415039062},"flags":{},"order":9,"mode":0,"inputs":[{"name":"text","type":"STRING","link":29,"widget":{"name":"text"},"label":"文本"}],"outputs":[{"name":"STRING","type":"STRING","links":null,"shape":6,"label":"字符串"}],"properties":{"Node name for S&R":"ShowText|pysssss"},"widgets_values":["","她穿了一件黑色的千鸟图案连衣裙,在所有合适的地方都展现了她的曲线。这条裙子很短,几乎没到膝盖,有一个微妙的甜心领口,衬托出她心形的脸。她腰间系着一条黑色皮带,突显了她的细腰和曲线。她的头发是浓郁的深棕色,像松散的波浪一样从背上垂下来,她的眼睛是深邃的、锐利的绿色,似乎看穿了你。她是一位优雅精致的女神,一位真正的巴黎女神。"]},{"id":21,"type":"KSampler SDXL (Eff.)","pos":{"0":2427,"1":688},"size":{"0":325,"1":546},"flags":{},"order":10,"mode":0,"inputs":[{"name":"sdxl_tuple","type":"SDXL_TUPLE","link":31,"label":"SDXL元组"},{"name":"latent_image","type":"LATENT","link":33,"label":"Latent"},{"name":"optional_vae","type":"VAE","link":34,"shape":7,"label":"VAE(可选)"},{"name":"script","type":"SCRIPT","link":null,"shape":7,"label":"脚本"}],"outputs":[{"name":"SDXL_TUPLE","type":"SDXL_TUPLE","links":null,"slot_index":0,"label":"SDXL元组"},{"name":"LATENT","type":"LATENT","links":[35],"slot_index":1,"label":"Latent"},{"name":"VAE","type":"VAE","links":[36],"slot_index":2,"label":"VAE"},{"name":"IMAGE","type":"IMAGE","links":null,"label":"图像"}],"properties":{"Node name for S&R":"KSampler SDXL (Eff.)"},"widgets_values":[387875992915670,null,8,1.5,"dpmpp_2s_ancestral","normal",0,-1,"auto","true"],"color":"#332233","bgcolor":"#553355","shape":"box"},{"id":25,"type":"VAEDecode","pos":{"0":2813,"1":707},"size":{"0":210,"1":46},"flags":{},"order":11,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":35,"label":"Latent"},{"name":"vae","type":"VAE","link":36,"label":"VAE"}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[37],"slot_index":0,"label":"图像"}],"properties":{"Node name for S&R":"VAEDecode"},"widgets_values":[]},{"id":3,"type":"LoadImage","pos":{"0":209,"1":599},"size":{"0":339.3855285644531,"1":598.5675659179688},"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[24],"slot_index":0,"label":"图像"},{"name":"MASK","type":"MASK","links":null,"label":"遮罩"}],"properties":{"Node name for S&R":"LoadImage"},"widgets_values":["ComfyUI00488.png","image"]},{"id":18,"type":"Note","pos":{"0":-794,"1":601},"size":{"0":214.5450439453125,"1":621.9093017578125},"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[],"properties":{},"widgets_values":["refer_character_name: 如果图像中有人物/角色,必须将其称为{name}\n\nexclude_people_info: 不要包含有关无法更改的人物/角色的信息(例如种族、性别等),但仍包含可更改的属性(例如发型)。\n\ninclude_lighting: 包括照明信息。\n\ninclude_camera_angle: 包括摄影机角度信息。\n\ninclude_watermark: 包括是否有水印信息。\n\ninclude_JPEG_artifacts: 包括是否存在 JPEG 伪影信息。\ninclude_exif: 如果是照片,包含相机的信息以及光圈、快门速度、ISO等信息。\n\nexclude_sexual: 不要包含任何与性有关的内容,保持PG。\n\nexclude_image_resolution: 不要包含图像分辨率信息。\n\ninclude_aesthetic_quality: 包含图像美学(从低到非常高)信息。\n\ninclude_composition_style: 包括有关图像构图风格的信息,例如引导线、三分法或对称性。\n\nexclude_text: 不要包含任何文字信息。\n\nspecify_depth_field: 包含景深以及背景模糊信息。\n\nspecify_lighting_sources: 如果可以判别人造或自然光源,则包含在内。\n\ndo_not_use_ambiguous_language: 不要使用任何含糊不清的言辞。\n\ninclude_nsfw: 包含NSFW或性暗示信息。\n\nonly_describe_most_important_elements: 只描述最重要的元素。\n\ncharacter_name: 如果选择了refer_character_name,则使用此处的名字。"],"color":"#432","bgcolor":"#653"},{"id":17,"type":"Note","pos":{"0":658,"1":538},"size":{"0":210,"1":516.514404296875},"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[],"properties":{},"widgets_values":["image: 图片输入。\n\nextra_options: extra_options参数输入。\n\nllm_model: 目前有 Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2 和 unsloth/Meta-Llama-3.1-8B-Instruct 两种LLM模型可选择。\n\ndevice: 模型加载设备。目前仅支持cuda。\n\ndtype: 模型加载精度,有nf4 和 bf16 两个选项。\n\nvlm_lora: 是否加载text_model。\n\ncaption_type: caption类型选项, 包括\"Descriptive\"(正式语气描述), \"Descriptive (Informal)\"(非正式语气描述), \"Training Prompt\"(SD训练描述), \"MidJourney\"(MJ风格描述), \"Booru tag list\"(标签列表), \"Booru-like tag list\"(类标签列表), \"Art Critic\"(艺术评论), \"Product Listing\"(产品列表), \"Social Media Post\"(社交媒体风格)。\n\ncaption_length: 描述长度。\n\nuser_prompt: LLM模型的用户提示词。如果这里有内容将覆盖caption_type和extra_options的所有设置。\n\nmax_new_tokens: LLM的max_new_tokens参数。\ndo_sample: LLM的do_sample参数。\n\ntop-p: LLM的top_p参数。\n\ntemperature: LLM的temperature参数。\n\ncache_model: 是否缓存模型。"],"color":"#432","bgcolor":"#653"},{"id":13,"type":"LayerUtility: JoyCaption2ExtraOptions","pos":{"0":566,"1":1093},"size":{"0":418.4234924316406,"1":476.8360900878906},"flags":{},"order":3,"mode":0,"inputs":[],"outputs":[{"name":"extra_option","type":"JoyCaption2ExtraOption","links":[25],"slot_index":0,"shape":3,"label":"extra_option"}],"properties":{"Node name for S&R":"LayerUtility: JoyCaption2ExtraOptions"},"widgets_values":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,"Huluwa"],"color":"rgba(38, 73, 116, 0.7)"},{"id":28,"type":"Simple String","pos":{"0":445,"1":252},"size":{"0":315,"1":58},"flags":{},"order":4,"mode":0,"inputs":[],"outputs":[{"name":"STRING","type":"STRING","links":[39],"label":"字符串"}],"properties":{"Node name for S&R":"Simple String"},"widgets_values":["一个男生在街上大哭,身后的女生在嘲笑他"]},{"id":19,"type":"EG_FX_BDAPI","pos":{"0":1454,"1":553},"size":{"0":400,"1":200},"flags":{"collapsed":true},"order":7,"mode":4,"inputs":[{"name":"text","type":"STRING","link":28,"widget":{"name":"text"},"label":"text"}],"outputs":[{"name":"TEXT","type":"STRING","links":[29],"slot_index":0,"label":"TEXT"}],"properties":{"Node name for S&R":"EG_FX_BDAPI"},"widgets_values":["Free Baidu Translation API application website”https://fanyi-api.baidu.com/?ext_channel=Aldtype&fr=pcHeader“,Only the first time is required to input ID and KEY,More SD tutorials available on Bilibili @ 灵仙儿和二狗子🐕","","en-zh",true]},{"id":16,"type":"LayerUtility: JoyCaption2","pos":{"0":991,"1":580},"size":{"0":407.4161682128906,"1":333.63232421875},"flags":{},"order":6,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":24,"label":"image"},{"name":"extra_options","type":"JoyCaption2ExtraOption","link":25,"shape":7,"label":"extra_options"},{"name":"user_prompt","type":"STRING","link":38,"widget":{"name":"user_prompt"},"label":"user_prompt"}],"outputs":[{"name":"text","type":"STRING","links":[28,32],"slot_index":0,"shape":6,"label":"text"}],"properties":{"Node name for S&R":"LayerUtility: JoyCaption2"},"widgets_values":["Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2","cuda","nf4","text_model","Descriptive","any","",300,0.9,0.6,false],"color":"rgba(38, 73, 116, 0.7)"},{"id":27,"type":"EG_FX_BDAPI","pos":{"0":797,"1":249},"size":{"0":319.29840087890625,"1":111},"flags":{},"order":5,"mode":4,"inputs":[{"name":"text","type":"STRING","link":39,"widget":{"name":"text"},"label":"text"}],"outputs":[{"name":"TEXT","type":"STRING","links":[38],"slot_index":0,"label":"TEXT"}],"properties":{"Node name for S&R":"EG_FX_BDAPI"},"widgets_values":["Free Baidu Translation API application website”https://fanyi-api.baidu.com/?ext_channel=Aldtype&fr=pcHeader“,Only the first time is required to input ID and KEY,More SD tutorials available on Bilibili @ 灵仙儿和二狗子🐕",""zh-en",true]}],"links":[[24,3,0,16,0,"IMAGE"],[25,13,0,16,1,"JoyCaption2ExtraOption"],[28,16,0,19,0,"STRING"],[29,19,0,15,0,"STRING"],[31,22,0,21,0,"SDXL_TUPLE"],[32,16,0,22,2,"STRING"],[33,22,1,21,1,"LATENT"],[34,22,2,21,2,"VAE"],[35,21,1,25,0,"LATENT"],[36,21,2,25,1,"VAE"],[37,25,0,26,0,"IMAGE"],[38,27,0,16,2,"STRING"],[39,28,0,27,0,"STRING"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.5445000000000022,"offset":[1445.3969829826933,167.03120755702616]}},"version":0.4}



## Additional Context
(Please add any additional context or steps to reproduce the error here)
chflame163 commented 1 week ago

I did not reproduce your error during my testing,try switching the caption type before running the node to see if the same error occurs?

CYDOPS commented 1 week ago

我在测试过程中没有重现您的错误,请尝试在运行节点之前切换标题类型,看看是否会出现相同的错误?

你估计的没错,我在切换所有的标题类型都出现了相同的错误local variable 'text_model' referenced before assignment

chflame163 commented 1 week ago

你估计的没错,我在切换所有的标题类型都出现了相同的错误local variable 'text_model' referenced before assignment

是否存在“Allocation on device”错误?

CYDOPS commented 1 week ago

你估计的没错,我在切换所有的标题类型都出现了相同的错误local variable 'text_model' referenced before assignment

是否存在“Allocation on device”错误?

你好,测试没有存在“Allocation on device”错误

chflame163 commented 1 week ago

有可能是: 1、显存爆了 2、模型文件损坏 3、transformers 版本过低,或者过高 4、protobuf 版本过高

CYDOPS commented 1 week ago

有建议的transformers 版本和protobuf 版本嘛?