From 39ad3aa2c6a7e4345c828d1af8976d2a5010430d Mon Sep 17 00:00:00 2001 From: FizzleDorf <1fizzledorf@gmail.com> Date: Mon, 18 Sep 2023 22:42:40 -0400 Subject: [PATCH] some more fixes, still trying to figure out sampler --- ScheduleFuncs.py | 11 ++++++----- ScheduledNodes.py | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ScheduleFuncs.py b/ScheduleFuncs.py index 89992d3..a5ab1a7 100644 --- a/ScheduleFuncs.py +++ b/ScheduleFuncs.py @@ -362,11 +362,12 @@ def interpolate_prompt_series(animation_prompts, max_frames, current_frame, pre_ def BatchPoolAnimConditioning(cur_prompt_series, nxt_promt_series, weight_series, clip): c = [] for i in range(len(cur_prompt_series)): - tokens = clip.tokenize(str(cur_prompt_series[i])) - cond_to, pooled_to = clip.encode_from_tokens(tokens, return_pooled=True) - tokens = clip.tokenize(str(nxt_promt_series[i])) - cond_from, pooled_from = clip.encode_from_tokens(tokens, return_pooled=True) - c.append(addWeighted([[cond_to, {"pooled_output": pooled_to}]], [[cond_from, {"pooled_output": pooled_from}]], weight_series[i])) + tokens = clip.tokenize(str(cur_prompt_series[i])) + cond_to, pooled_to = clip.encode_from_tokens(tokens, return_pooled=True) + tokens = clip.tokenize(str(nxt_promt_series[i])) + cond_from, pooled_from = clip.encode_from_tokens(tokens, return_pooled=True) + c.append(addWeighted([[cond_to, {"pooled_output": pooled_to}]], [[cond_from, {"pooled_output": pooled_from}]], weight_series[i])) + print(c) return c def SDXLencode(clip, width, height, crop_w, crop_h, target_width, target_height, text_g, text_l): diff --git a/ScheduledNodes.py b/ScheduledNodes.py index 09796ce..cfc2aa6 100644 --- a/ScheduledNodes.py +++ b/ScheduledNodes.py @@ -1,6 +1,6 @@ #These nodes were made using code from the Deforum extension for A1111 webui #You can find the project here: https://github.com/deforum-art/sd-webui-deforum - +import comfy import numexpr import torch import numpy as np @@ -41,7 +41,7 @@ defaultValue="""0:(0), #This node parses the user's formatted prompt, #sequences the current prompt,next prompt, and -#conditioning strength, evalates expressions in +#conditioning strength, evaluates expressions in #the prompts, and then returns either current, #next or averaged conditioning. class PromptSchedule: