Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors during generation #16

Open
HeartOfThePiano opened this issue Mar 10, 2025 · 1 comment
Open

Errors during generation #16

HeartOfThePiano opened this issue Mar 10, 2025 · 1 comment

Comments

@HeartOfThePiano
Copy link

I'm hitting problems every time I run the demo- I've tried many combinations- it starts to generate, but then I get problems such as this:

Exception in thread Thread-6 (run_inference):
Traceback (most recent call last):
File "C:\Users\Bob.conda\envs\notagen\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\Bob.conda\envs\notagen\lib\threading.py", line 953, in run
self._target(*self.args, **self.kwargs)
File "C:\Users\Bob\Documents\Notagen\gradio\demo.py", line 98, in run_inference
result_container.append(inference_patch(period, composer, instrumentation))
File "C:\Users\Bob\Documents\Notagen\gradio\inference.py", line 165, in inference_patch
predicted_patch = model.generate(input_patches.unsqueeze(0),
File "C:\Users\Bob\Documents\Notagen\gradio\utils.py", line 397, in generate
token = temperature_sampling(prob, temperature=temperature) # int
File "C:\Users\Bob.conda\envs\notagen\lib\site-packages\samplings_init
.py", line 360, in temperature_sampling
return random_sampling(probs, seed=seed)
File "C:\Users\Bob.conda\envs\notagen\lib\site-packages\samplings_init
.py", line 113, in random_sampling
return np.random.choice(range(len(probs)), p=probs)
File "numpy\random\mtrand.pyx", line 994, in numpy.random.mtrand.RandomState.choice
ValueError: probabilities do not sum to 1

I really want to get this working, please help!

@ElectricAlexis
Copy link
Owner

Hi, sorry for the late reply. I Which model are you using and what are the sampling parameters? I guess they are under gradio/config.py. And the NotaGen-X weights is needed to be under that folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants