Update
client.models.presets.update(stringpresetID, PresetUpdateParams { modelId, isDefault, originalAssets, projectId } params, RequestOptionsoptions?): PresetUpdateResponse { preset }
PUT/models/{modelId}/presets/{presetId}
Update
import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});
const preset = await client.models.presets.update('presetId', {
modelId: 'modelId',
isDefault: true,
});
console.log(preset.preset);{
"preset": {
"id": "id",
"authorId": "authorId",
"createdAt": "createdAt",
"isDefault": true,
"modelId": "modelId",
"ownerId": "ownerId",
"parameters": {
"prompt": "prompt",
"type": "controlnet",
"aspectRatio": "16:9",
"baseModelId": "baseModelId",
"concepts": [
{
"modelId": "modelId",
"scale": -2,
"modelEpoch": "modelEpoch"
}
],
"controlEnd": 0.1,
"controlImage": "controlImage",
"controlImageId": "controlImageId",
"controlStart": 0,
"disableMerging": true,
"disableModalityDetection": true,
"guidance": 0,
"height": 64,
"hideResults": true,
"image": "image",
"imageId": "imageId",
"intermediateImages": true,
"ipAdapterImage": "ipAdapterImage",
"ipAdapterImageId": "ipAdapterImageId",
"ipAdapterImageIds": [
"string"
],
"ipAdapterImages": [
"string"
],
"ipAdapterScale": 0,
"ipAdapterScales": [
0
],
"ipAdapterType": "character",
"mask": "mask",
"maskId": "maskId",
"modality": "modality",
"modelEpoch": "modelEpoch",
"negativePrompt": "negativePrompt",
"negativePromptStrength": 0,
"numInferenceSteps": 1,
"numSamples": 1,
"referenceAdain": true,
"referenceAttn": true,
"scheduler": "DDIMScheduler",
"seed": "seed",
"strength": 0.01,
"styleFidelity": 0,
"width": 64
},
"updatedAt": "updatedAt"
}
}Returns Examples
{
"preset": {
"id": "id",
"authorId": "authorId",
"createdAt": "createdAt",
"isDefault": true,
"modelId": "modelId",
"ownerId": "ownerId",
"parameters": {
"prompt": "prompt",
"type": "controlnet",
"aspectRatio": "16:9",
"baseModelId": "baseModelId",
"concepts": [
{
"modelId": "modelId",
"scale": -2,
"modelEpoch": "modelEpoch"
}
],
"controlEnd": 0.1,
"controlImage": "controlImage",
"controlImageId": "controlImageId",
"controlStart": 0,
"disableMerging": true,
"disableModalityDetection": true,
"guidance": 0,
"height": 64,
"hideResults": true,
"image": "image",
"imageId": "imageId",
"intermediateImages": true,
"ipAdapterImage": "ipAdapterImage",
"ipAdapterImageId": "ipAdapterImageId",
"ipAdapterImageIds": [
"string"
],
"ipAdapterImages": [
"string"
],
"ipAdapterScale": 0,
"ipAdapterScales": [
0
],
"ipAdapterType": "character",
"mask": "mask",
"maskId": "maskId",
"modality": "modality",
"modelEpoch": "modelEpoch",
"negativePrompt": "negativePrompt",
"negativePromptStrength": 0,
"numInferenceSteps": 1,
"numSamples": 1,
"referenceAdain": true,
"referenceAttn": true,
"scheduler": "DDIMScheduler",
"seed": "seed",
"strength": 0.01,
"styleFidelity": 0,
"width": 64
},
"updatedAt": "updatedAt"
}
}