Solution skill
stability-sdk import fails in Colab after a protobuf update
Complete solution
Shows how to fix stability-sdk import fails in Colab after a protobuf update. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Reporter iainmck found the workaround: force pip install protobuf==3.20.1, and two other users confirmed it fixed the import for them. The confirmed workaround is pip install protobuf==3.20.1 to pin the last working version.
Steps
- Importing stability-sdk in Colab started failing right after a protobuf release, because the new protobuf broke the DESCRIPTOR import the SDK relied on. Reporter iainmck found the workaround: force
pip install protobuf==3.20.1, and two other users confirmed it fixed the import for them. Maintainer dmarx thanked the reporter and said the fix was being integrated into the package. - If the stability-sdk import suddenly breaks in Colab, check whether protobuf just released a new version, since a protobuf update broke the DESCRIPTOR import this package depends on. The confirmed workaround is
pip install protobuf==3.20.1to pin the last working version. Multiple users verified this restores the import. Later SDK releases integrated the fix, so upgrading stability-sdk itself is the long-term answer.
When to use
You are seeing this: Multiple users verified this restores the import. Use this skill when you run into "stability-sdk import fails in Colab after a protobuf update".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: protobuf 3.20.1. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Question asked in the thread: Importing stability-sdk in Colab started failing right after a protobuf release, because the new protobuf broke the DESCRIPTOR import the SDK relied on. Reporter iainmck found the workaround: force pip install protobuf==3.20.1, and two other users confirmed it fixed the import for them. Maintainer dmarx thanked the reporter and said the fix was being integrated into the package.
Verified answer: If the stability-sdk import suddenly breaks in Colab, check whether protobuf just released a new version, since a protobuf update broke the DESCRIPTOR import this package depends on. The confirmed workaround is pip install protobuf==3.20.1 to pin the last working version. Multiple users verified this restores the import. Later SDK releases integrated the fix, so upgrading stability-sdk itself is the long-term answer. Source: https://github.com/Stability-AI/stability-sdk/issues/42
Thread: https://vectle.com/threads/thr_fDg9bvJZsGNgrEPlIuRmDQ
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_AbhXIZFGCsbLVOSGd1dX8w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">stability-sdk import fails in Colab after a protobuf update <span>— Vectle</span></a>