FizzleDorf / ComfyUI_FizzNodes

Custom Nodes for Comfyui
MIT License
370 stars 56 forks source link

This issue still exists: https://github.com/FizzleDorf/ComfyUI_FizzNodes/issues/63 #69

Closed scxsyu closed 6 months ago

scxsyu commented 6 months ago

I have reviewed the latest code, and there are still errors in BatchFuncs.py. Running the simple example will result in an error. Please make the necessary corrections. Thank you!

scxsyu commented 6 months ago

When using "Prompt Schedule", the code in BatchFuncs.py should be as follows:

cur_prompt_series[i] = prepare_batch_prompt(cur_prompt_series[i], max_frames, i, prompt_weight_1, prompt_weight_2, prompt_weight_3, prompt_weight_4) nxt_prompt_series[i] = prepare_batch_prompt(nxt_prompt_series[i], max_frames, i, prompt_weight_1, prompt_weight_2, prompt_weight_3, prompt_weight_4)

When using "Batch Prompt Schedule", the code should be handled differently:

cur_prompt_series[i] = prepare_batch_prompt(cur_prompt_series[i], max_frames, i, prompt_weight_1[i], prompt_weight_2[i], prompt_weight_3[i], prompt_weight_4[i]) nxt_prompt_series[i] = prepare_batch_prompt(nxt_prompt_series[i], max_frames, i, prompt_weight_1[i], prompt_weight_2[i], prompt_weight_3[i], prompt_weight_4[i])

FizzleDorf commented 6 months ago

I've added a fix in 4d34c17. The issue wasn't the prompt weights but the size of the tensors was only checked in addWeighted(). I added a check outside the interpolation loop to set max_size to the largest tensor in the schedule. I'll be doing some cleanup so it isn't as redundant in time. For now, it works.