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

Sample code doesn't seem to work #13

Open
vpzomtrrfrt opened this issue Sep 14, 2022 · 7 comments
Open

Sample code doesn't seem to work #13

vpzomtrrfrt opened this issue Sep 14, 2022 · 7 comments

Comments

@vpzomtrrfrt
Copy link

Using the sample code from the README returns an error:

Generating Complete {
  isOk: false,
  status: 'InvalidArgument',
  code: 3,
  message: 'Must provide image parameters.',
...
@vpzomtrrfrt
Copy link
Author

I can't get the CLI example to work either, did the API change?

@vpzomtrrfrt
Copy link
Author

seems to work if I remove the code that adds classifier parameters

Probably related to this change to the protobufs: Stability-AI/api-interfaces@d1c74bc

@vpzomtrrfrt
Copy link
Author

Possibly better workaround, pinning the version of api-interfaces:

diff --git a/package.json b/package.json
index a3cde84..3fde94c 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
     "process": "^0.11.10",
     "rimraf": "^3.0.2",
     "source-map-loader": "^4.0.0",
-    "stability-sdk": "Stability-AI/api-interfaces",
+    "stability-sdk": "Stability-AI/api-interfaces#1363356",
     "ts-loader": "^9.3.1",
     "typescript": "^4.8.2",
     "webpack": "^5.74.0",

@altryne
Copy link

altryne commented Sep 17, 2022

@jakiestfu any chance to publish this fix to NPM soon?

@Abel1011
Copy link

Possibly better workaround, pinning the version of api-interfaces:

diff --git a/package.json b/package.json
index a3cde84..3fde94c 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
     "process": "^0.11.10",
     "rimraf": "^3.0.2",
     "source-map-loader": "^4.0.0",
-    "stability-sdk": "Stability-AI/api-interfaces",
+    "stability-sdk": "Stability-AI/api-interfaces#1363356",
     "ts-loader": "^9.3.1",
     "typescript": "^4.8.2",
     "webpack": "^5.74.0",

I made the change in the package.json, but I still get the same message. Any recommendation (I'm using Next.js)

@vpzomtrrfrt
Copy link
Author

To clarify, you would need to modify the package.json for this module and then somehow include the modified version in your larger project. I had trouble getting that to work without publishing to npm, so my fork is published as https://www.npmjs.com/package/stability-client with this and a few other improvements

@drainmond
Copy link

Thank you @vpzomtrrfrt, your fork is awesome!

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

4 participants