diff --git a/joy_caption_two_node.py b/joy_caption_two_node.py index 40a19eb..9b9db87 100644 --- a/joy_caption_two_node.py +++ b/joy_caption_two_node.py @@ -327,8 +327,7 @@ class Joy_caption_two: # Embed image # This results in Batch x Image Tokens x Features - device_type = str(joy_two_pipeline.load_device) - with torch.amp.autocast_mode.autocast(device_type, enabled=True): + with torch.amp.autocast_mode.autocast('cuda', enabled=True): vision_outputs = joy_two_pipeline.clip_model.encode_image(pixel_values) embedded_images = joy_two_pipeline.image_adapter.embedded_image(vision_outputs.hidden_states) @@ -490,8 +489,7 @@ class Joy_caption_two_advanced: # Embed image # This results in Batch x Image Tokens x Features - device_type = str(joy_two_pipeline.load_device) - with torch.amp.autocast_mode.autocast(device_type, enabled=True): + with torch.amp.autocast_mode.autocast('cuda', enabled=True): vision_outputs = joy_two_pipeline.clip_model.encode_image(pixel_values) embedded_images = joy_two_pipeline.image_adapter.embedded_image(vision_outputs.hidden_states) diff --git a/pyproject.toml b/pyproject.toml index fbd3766..d5a2163 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [project] name = "comfyui_slk_joy_caption_two" description = "NODES:Joy Caption Two, Joy Caption Two Advanced, Joy Caption Two Load, Joy Caption Extra Options" -version = "0.0.2" +version = "0.0.3" license = {file = "LICENSE"} -dependencies = ["huggingface_hub==0.23.4", "transformers>=4.44.0", "numpy", "sentencepiece", "pillow>=10.1.0", "bitsandbytes>=0.44.1", "peft>=0.12.0"] +dependencies = ["huggingface_hub==0.23.4", "transformers>=4.44.0", "numpy", "sentencepiece", "pillow>=10.1.0", "bitsandbytes>=0.44.1", "peft==0.12.0"] [project.urls] Repository = "https://github.com/EvilBT/ComfyUI_SLK_joy_caption_two" diff --git a/readme.md b/readme.md index 5acfc92..3b60567 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,7 @@ [English](./readme_us.md) | 中文 ## Recent changes +* [2024-10-15] v0.0.3: 修复'cuda:0'部分出错的问题,直接设置为 'cuda' * [2024-10-14] v0.0.2: 添加注册到Comfy Manager, 可以通过它来安装该节点。修复错误的模型选择引导,原框架是基于 `unsloth/Meta-Llama-3.1-8B-Instruct` 而不是 `Meta-Llama-3.1-8B` * [2024-10-12] v0.0.1: 基本完成[JoyCaptionAlpha Two](https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two)到ComfyUI的实现 diff --git a/readme_us.md b/readme_us.md index 927a12f..d4de3d8 100644 --- a/readme_us.md +++ b/readme_us.md @@ -1,6 +1,7 @@ # JoyCaptionAlpha Two for ComfyUI English | [中文](./readme.md) ## Recent changes +* [2024-10-15] v0.0.3: Fixed an issue where specifying 'cuda:0' would partially fail, now defaults to 'cuda' * [2024-10-14] v0.0.2: Added registration to Comfy Manager, allowing for installation of this node through it. Fixed the incorrect model selection guidance; the original framework was based on unsloth/Meta-Llama-3.1-8B-Instruct instead of Meta-Llama-3.1-8B. * [2024-10-12] v0.0.1: Basic implementation of [JoyCaptionAlpha Two](https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two) on ComfyUI is completed.