amotile / stable-diffusion-studio

An animation focused workflow frontend for Stable Diffusion
MIT License
477 stars 31 forks source link

prompt_blending.py raises an index out of bound exception #28

Open autumnmotor opened 1 year ago

autumnmotor commented 1 year ago

Sometimes prompt_blending.py raises an index out of bound exception, I think this part should be fixed

       if c == REAL_MARK and stack[-1] == '{':
           p[i] = MARK

I think "stack[-1]" sometimes tries to access an invalid index and raises an exception.

   if len(stack) > 0:
       if c == REAL_MARK and stack[-1] == '{':
           p[i] = MARK