Fixed the Unexpected floating ScalarType issue that occurred when used with wanvideowrapper #6
This commit is contained in:
@@ -255,8 +255,9 @@ Interactive visual editor for creating point and bounding box prompts on images/
|
||||
|
||||
## Model Downloads
|
||||
|
||||
Download SAM3 model weights from the official repository:
|
||||
Download SAM3 model weights from the repository:
|
||||
- [SAM3 Models](https://huggingface.co/facebook/sam3)
|
||||
- [SAM3 FP16 Model](https://huggingface.co/yolain/sam3-safetensors/blob/main/sam3-fp16.safetensors)
|
||||
|
||||
Place the downloaded models in: `ComfyUI/models/sam3/`
|
||||
|
||||
@@ -291,6 +292,14 @@ Contributions are welcome! Please feel free to submit issues or pull requests.
|
||||
|
||||
## Changelog
|
||||
|
||||
### v1.0.4
|
||||
|
||||
- Fixed the `Unexpected floating ScalarType` error that occurred when used with wanvideowrapper.
|
||||
|
||||
### v1.0.3
|
||||
|
||||
- Changed `sam3GetObjectMask` node's `obj_id` to object index ID for easier correspondence with index IDs in visualization
|
||||
|
||||
### v1.0.2
|
||||
|
||||
- Added `easy framesEditor` node for interactive image/video frame annotation
|
||||
|
||||
+10
-1
@@ -255,8 +255,9 @@
|
||||
|
||||
## 模型下载
|
||||
|
||||
从官方仓库下载 SAM3 模型权重:
|
||||
从仓库下载 SAM3 模型权重:
|
||||
- [SAM3 模型](https://huggingface.co/facebook/sam3)
|
||||
- [SAM3 FP16 模型](https://huggingface.co/yolain/sam3-safetensors/blob/main/sam3-fp16.safetensors)
|
||||
|
||||
将下载的模型放置在:`ComfyUI/models/sam3/`
|
||||
|
||||
@@ -291,6 +292,14 @@
|
||||
|
||||
## 更新日志
|
||||
|
||||
### v1.0.4
|
||||
|
||||
- 修复和 `wanvideowrapper` 节点同时使用时存在 `Unexpected floating ScalarType` 报错的情况
|
||||
|
||||
### v1.0.3
|
||||
|
||||
- 将 `sam3GetObjectMask` 节点的 `obj_id` 重新定义为对象索引ID,方便与可视化中的对象索引ID对应
|
||||
|
||||
### v1.0.2
|
||||
|
||||
- 增加 `easy framesEditor` 节点以进行交互式图像/视频帧标注
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-easy-sam3"
|
||||
description = "A ComfyUI custom node package for segment anything 3"
|
||||
version = "1.0.3"
|
||||
version = "1.0.4"
|
||||
license = {file = "LICENSE"}
|
||||
dependencies = ["timm>=1.0.17", "ftfy==6.1.1", "regex", "iopath>=0.1.10", "einops>=0.6.0", "decord>=0.6.0", "pycocotools>=2.0.10", "numpy>=1.26", "tqdm", "typing_extensions"]
|
||||
|
||||
|
||||
@@ -71,8 +71,7 @@ class TransformerDecoderLayer(nn.Module):
|
||||
return tensor if pos is None else tensor + pos
|
||||
|
||||
def forward_ffn(self, tgt):
|
||||
with torch.amp.autocast(device_type="cuda", enabled=False):
|
||||
tgt2 = self.linear2(self.dropout3(self.activation(self.linear1(tgt))))
|
||||
tgt2 = self.linear2(self.dropout3(self.activation(self.linear1(tgt))))
|
||||
tgt = tgt + self.dropout4(tgt2)
|
||||
tgt = self.norm3(tgt)
|
||||
return tgt
|
||||
|
||||
@@ -46,8 +46,7 @@ class Sam3TrackerPredictor(Sam3TrackerBase):
|
||||
self.max_point_num_in_prompt_enc = max_point_num_in_prompt_enc
|
||||
self.non_overlap_masks_for_output = non_overlap_masks_for_output
|
||||
|
||||
self.bf16_context = torch.autocast(device_type="cuda", dtype=torch.bfloat16)
|
||||
self.bf16_context.__enter__() # keep using for the entire model process
|
||||
self.bf16_context = None
|
||||
|
||||
self.iter_use_prev_mask_pred = True
|
||||
self.add_all_frames_to_correct_as_cond = True
|
||||
|
||||
Reference in New Issue
Block a user