some more fixes, still trying to figure out sampler

This commit is contained in:
FizzleDorf
2023-09-18 22:42:40 -04:00
parent e9e7914a7f
commit 39ad3aa2c6
2 changed files with 8 additions and 7 deletions
+6 -5
View File
@@ -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):
+2 -2
View File
@@ -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: