From 43bca637c236aef6d9749f04d9917cac9ff3ff34 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Tue, 13 Feb 2024 21:36:24 +0900 Subject: [PATCH] fix: Detailer for AD - robust patch https://github.com/ltdrdata/ComfyUI-Impact-Pack/issues/472 --- modules/impact/animatediff_nodes.py | 4 ++-- modules/impact/config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/impact/animatediff_nodes.py b/modules/impact/animatediff_nodes.py index 3e454b70..fd7c9c1e 100644 --- a/modules/impact/animatediff_nodes.py +++ b/modules/impact/animatediff_nodes.py @@ -65,7 +65,7 @@ class SEGSDetailerForAnimateDiff: else: cropped_image_frames = torch.concat((cropped_image_frames, cropped_image), dim=0) - cropped_image_frames = cropped_image_frames.numpy() + cropped_image_frames = cropped_image_frames.cpu().numpy() enhanced_image_tensor, cnet_images = core.enhance_detail_for_animatediff(cropped_image_frames, model, clip, vae, guide_size, guide_size_for, max_size, seg.bbox, seed, steps, cfg, sampler_name, scheduler, positive, negative, denoise, seg.cropped_mask, @@ -79,7 +79,7 @@ class SEGSDetailerForAnimateDiff: if enhanced_image_tensor is None: new_cropped_image = cropped_image_frames else: - new_cropped_image = enhanced_image_tensor.numpy() + new_cropped_image = enhanced_image_tensor.cpu().numpy() new_seg = SEG(new_cropped_image, seg.cropped_mask, seg.confidence, seg.crop_region, seg.bbox, seg.label, None) new_segs.append(new_seg) diff --git a/modules/impact/config.py b/modules/impact/config.py index 9154fc5e..6ae10aaa 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -2,7 +2,7 @@ import configparser import os -version_code = [4, 76] +version_code = [4, 76, 1] version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '') dependency_version = 20