deepinfra / deepinfra-node

Official TypeScript wrapper for DeepInfra Inference API
https://deepinfra.com/
MIT License
8 stars 0 forks source link

Cog models + SDXL #15

Closed ichernev closed 5 months ago

ichernev commented 5 months ago

DeepInfra supports 2 types of custom models:

COG-based ones, have a specific interface -- i.e each model, even each revision, can have it's own interface. Also the input/output json follows a particular schema (so there is a model specific bit, but also common bits outside). Encode this in CogBaseModel, and the common bits in CogRequest, CogResponse, so people can even query their own custom COGs by specifying the model-specific bits.

LLM custom models have the same interface as other text-generation models.

Also implement SDXL as a CogBaseModel. I think the cog models should live in their own directory (not in text-to-image as it's now), but that is a minor correction.

I'm a bit new to typescript, so I might have messed something up.

I'll fix the TextToImage type in another patch, the current one assumes all SDXL params are available to all TextToImage models, but that is not the case.

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.2% Duplication on New Code

See analysis details on SonarCloud

ichernev commented 5 months ago

Fixes #14