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

Support for the local models? #34

Open
yukiarimo opened this issue Apr 5, 2024 · 2 comments
Open

Support for the local models? #34

yukiarimo opened this issue Apr 5, 2024 · 2 comments

Comments

@yukiarimo
Copy link

I want to use this locally with Ollama and SD (or anything else). Is it possible?

@sqrt10pi
Copy link

sqrt10pi commented Apr 7, 2024

Something like this could work for Ollama. I don't have SD running and I'm less familiar with the API so I commented out that and the epub stuff, but here's a start:

https://gist.github.com/sqrt10pi/dfca547ee263328cafb55947458a0838

The main annoying part is that ollama doesn't support max_tokens so I instead timeout the request after 5 minutes and try again (this is my try_until_successful function). I think depending on the model you're using in ollama you can use the num_predict model option but I only have dolphin-mixtral installed which doesn't have support.

Here's an example output using dolphin-mixtral: https://gist.github.com/sqrt10pi/20de2db367a78b63cd7b3719ad19937a (definitely not perfect)

@yukiarimo
Copy link
Author

ollama doesn't support max_tokens

Then, I think KoboldCPP API is a very good alternative to Ollama

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