#FIXBUG 修复部分cuda:0不能运行的bug

This commit is contained in:
Sherlock
2024-10-15 02:39:11 +08:00
parent df825cf142
commit 99233c0bdd
4 changed files with 6 additions and 6 deletions
+2 -4
View File
@@ -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)
+2 -2
View File
@@ -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"
+1
View File
@@ -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的实现
+1
View File
@@ -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.