henk717 / KoboldAI

KoboldAI is generative AI software optimized for fictional use, but capable of much more!
http://koboldai.com
GNU Affero General Public License v3.0
359 stars 130 forks source link

"Inhomogenous shape" error #452

Open ghost opened 1 year ago

ghost commented 1 year ago

Almost every time I try to submit a prompt or try to generate anything, I get the following errors:

ERROR      | __main__:generate:3919 - Traceback (most recent call last):
  File "aiserver.py", line 3906, in generate
    genout, already_generated = tpool.execute(model.core_generate, txt, found_entries, gen_mode=gen_mode)
  File "/mnt/spare/KoboldAI/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/tpool.py", line 132, in execute
    six.reraise(c, e, tb)
  File "/mnt/spare/KoboldAI/runtime/envs/koboldai/lib/python3.8/site-packages/six.py", line 719, in reraise
    raise value
  File "/mnt/spare/KoboldAI/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/tpool.py", line 86, in tworker
    rv = meth(*args, **kwargs)
  File "/mnt/spare/KoboldAI/modeling/inference_model.py", line 356, in core_generate
    result = self.raw_generate(
  File "/mnt/spare/KoboldAI/modeling/inference_model.py", line 629, in raw_generate
    result = self._raw_generate(
  File "/mnt/spare/KoboldAI/modeling/inference_models/horde/class.py", line 283, in _raw_generate
    out_batches=np.array(
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (3,) + inhomogeneous part.

The only time it doesn't occur is on the first prompt and only if there is no world info. If anything is in world info, or if anything is in the story history(?), then I just get this error.

henk717 commented 1 year ago

What model causes this?

henk717 commented 1 year ago

Or I see its the Horde backend, that one indeed needs some fixing still. For the time being check out https://koboldai.net which has excellent Horde compatibility.

ghost commented 1 year ago

Will take a look at that one, thanks

baasgpus commented 9 months ago

I also get this when doing more than one Gens Per Action tried on multiple browsers.

ERROR      | __main__:generate:3920 - Traceback (most recent call last):
  File "aiserver.py", line 3907, in generate
    genout, already_generated = tpool.execute(model.core_generate, txt, found_entries, gen_mode=gen_mode)
  File "/home/desktop/SATA/git/AI-United/KoboldAI/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/tpool.py", line 132, in execute
    six.reraise(c, e, tb)
  File "/home/desktop/SATA/git/AI-United/KoboldAI/runtime/envs/koboldai/lib/python3.8/site-packages/six.py", line 719, in reraise
    raise value
  File "/home/desktop/SATA/git/AI-United/KoboldAI/runtime/envs/koboldai/lib/python3.8/site-packages/eventlet/tpool.py", line 86, in tworker
    rv = meth(*args, **kwargs)
  File "/home/desktop/SATA/git/AI-United/KoboldAI/modeling/inference_model.py", line 359, in core_generate
    result = self.raw_generate(
  File "/home/desktop/SATA/git/AI-United/KoboldAI/modeling/inference_model.py", line 632, in raw_generate
    result = self._raw_generate(
  File "/home/desktop/SATA/git/AI-United/KoboldAI/modeling/inference_models/horde/class.py", line 283, in _raw_generate
    out_batches=np.array(
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.

On united KoboldAI connected to Horde with kudos: Gens Per Action is giving me a setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part. error. I tried blowing out settings and just trying two Gens Per Action it worked on the first go and failed on the second. Been playing with it for a while, tried turning off streaming and various settings. Also tried just selecting models that I thought would work with it. I saw somewhere a while back that some models wouldn't? Thing is using the main repo version of KoboldAI Gens Per Action works fine just using the All Horde option. Gonna paste this into already exsisting git issue.