FizzleDorf / ComfyUI_FizzNodes

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

Issues with Batch Prompt Schedule #60

Closed ptmarks closed 7 months ago

ptmarks commented 7 months ago

I'm getting an error with Batch Prompt Schedule: RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 154 but got size 77 for tensor number 12 in the list. I'm not sure if it's because there is a limit for the number of characters in the prompt or something else. I can use my prompts up to a point, but if I add another prompt schedule line I get the error above.

Probably unrelated, I'm also getting this warning: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value 'photo realistic girl high quality, detailed, high resolution, 4k' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. Do I need to change the wording?

revolutioncom123 commented 7 months ago

i am getting the same problem too and sometimes gettings:

Error occurred when executing BatchPromptSchedule:

Expression 0 1.00 1 0.97 2 0.94 3 0.91 4 0.87 5 0.84 6 0.81 7 0.78 dtype: float64 has forbidden control characters.

revolutioncom123 commented 7 months ago

i needed to roll back to cd6cadd71c0865725bcc6ba63a66ecb4460a09b8 to stop having this problem.

Emersonksc commented 7 months ago

@revolutioncom123 To clarify, when writing expressions, use single quotation marks (') instead of double backticks (`) as they have been causing issues. However, there seems to be some inconsistency as some sources, such as the wiki, previously recommended using double backticks. It is possible that the best course of action is to leave this decision to the author.

i am getting the same problem too and sometimes gettings:

Error occurred when executing BatchPromptSchedule:

Expression 0 1.00 1 0.97 2 0.94 3 0.91 4 0.87 5 0.84 6 0.81 7 0.78 dtype: float64 has forbidden control characters.

revolutioncom123 commented 7 months ago

i already check everything but this message is some type of bug. i tried to replicate everything of the wiki and tried a lot of differents ways to write the setence but still giving me the bug.I think i going to wait for the answer this bug always occour when i using batch BatchPromptSchedule with more the two time lapses and using pw_a and pw_b in value prompt schedule.

FizzleDorf commented 7 months ago

For the backticks inquiry, please refer to the latent comp example where I use an expression for the correct format. As for the tensor size issue, the current fix is to pad your shortest prompt with commas until it matches the size of the token chunks of your other prompts (every 75 tokens). I think I will just add a custom padding in code since torch.zeros hasn't been working out in the multitudes of ways I tried before. I hope this helps.

Emersonksc commented 7 months ago

@FizzleDorf, actually, this is an error when I work with animatediff, so plz upload some workflows related to batchPromptSchedule and batchPromptValue nodes, just like revolutioncom123 said, this error fixes when you reset the repo to cd6cadd

i needed to roll back to cd6cadd to stop having this problem.

FizzleDorf commented 7 months ago

can you provide the workflow you are having issues with and I can work with that. I'll make a new example once the issue is resolved.

FizzleDorf commented 7 months ago

i am getting the same problem too and sometimes gettings:

Error occurred when executing BatchPromptSchedule:

Expression 0 1.00 1 0.97 2 0.94 3 0.91 4 0.87 5 0.84 6 0.81 7 0.78 dtype: float64 has forbidden control characters.

This issue has been fixed with this commit d32d37c

I'll be looking into the datatype issue after I solve the tensor size error

FizzleDorf commented 7 months ago

The previously mentioned commit apparently fixed the padding issue! I had some people test for me so it's safe to pull. I'll close this issue and work on the dtype warning when able.