mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-19 01:27:01 +08:00
Revert "fixed repeating frames after batch using deepcopy"
This reverts commit 1086d6a0e1f5c5c9247312872402ff8e60358fe1.
This commit is contained in:
parent
1086d6a0e1
commit
099fb5184a
13
nodes.py
13
nodes.py
@ -1,5 +1,3 @@
|
|||||||
from queue import Empty
|
|
||||||
from turtle import clone
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@ -7,11 +5,9 @@ import sys
|
|||||||
import json
|
import json
|
||||||
import hashlib
|
import hashlib
|
||||||
import traceback
|
import traceback
|
||||||
import copy
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from PIL.PngImagePlugin import PngInfo
|
from PIL.PngImagePlugin import PngInfo
|
||||||
from copy import deepcopy
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
@ -78,15 +74,12 @@ class ConditioningAverage :
|
|||||||
conditioning_to_strength = (1-conditioning_from_strength)
|
conditioning_to_strength = (1-conditioning_from_strength)
|
||||||
conditioning_from_tensor = conditioning_from[0][0]
|
conditioning_from_tensor = conditioning_from[0][0]
|
||||||
conditioning_to_tensor = conditioning_to[0][0]
|
conditioning_to_tensor = conditioning_to[0][0]
|
||||||
|
output = conditioning_from
|
||||||
output = copy.deepcopy(conditioning_from)
|
if conditioning_from_tensor.shape[0] > conditioning_to_tensor.shape[1]:
|
||||||
|
conditioning_to_tensor = torch.cat((conditioning_to_tensor, torch.zeros((1, conditioning_from_tensor.shape[1] - conditioning_to_tensor.shape[1], conditioning_from_tensor.shape[1].value))), dim=1)
|
||||||
if conditioning_from_tensor.shape[1] > conditioning_to_tensor.shape[1]:
|
|
||||||
conditioning_to_tensor = torch.cat((conditioning_to_tensor, torch.zeros((1, conditioning_from_tensor.shape[1] - conditioning_to_tensor.shape[1], conditioning_from_tensor.shape[1].value))), dim=1)
|
|
||||||
elif conditioning_to_tensor.shape[1] > conditioning_from_tensor.shape[1]:
|
elif conditioning_to_tensor.shape[1] > conditioning_from_tensor.shape[1]:
|
||||||
conditioning_from_tensor = torch.cat((conditioning_from_tensor, torch.zeros((1, conditioning_to_tensor.shape[1] - conditioning_from_tensor.shape[1], conditioning_to_tensor.shape[1].value))), dim=1)
|
conditioning_from_tensor = torch.cat((conditioning_from_tensor, torch.zeros((1, conditioning_to_tensor.shape[1] - conditioning_from_tensor.shape[1], conditioning_to_tensor.shape[1].value))), dim=1)
|
||||||
output[0][0] = ((conditioning_from_tensor * conditioning_from_strength) + (conditioning_to_tensor * conditioning_to_strength))
|
output[0][0] = ((conditioning_from_tensor * conditioning_from_strength) + (conditioning_to_tensor * conditioning_to_strength))
|
||||||
|
|
||||||
return (output, )
|
return (output, )
|
||||||
|
|
||||||
class ConditioningSetArea:
|
class ConditioningSetArea:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user