跳到主要内容

私模

创建和更新

在吐司上传自己的模型,任何人都可以创建私有模型,创建时会生成一个accessKey。模型所在项目更新为私有时,也会创建accessKey

查看

可以在吐司模型详情页复制自己创建的私有模型的accessKey

使用

在需要添加私模的参数中添加accessKey以通过验证

基本生图任务

对于私有modelloraembedding需要添加accessKey

请求示例:

{
"request_id": "{{requestId}}",
"stages": [
{
"type": "INPUT_INITIALIZE",
"inputInitialize": { "seed": "-1", "count": 1 }
},
{
"type": "DIFFUSION",
"diffusion": {
"width": 960,
"height": 720,
"prompts": [{ "text": "a boy" }],
"negativePrompts": [{ "text": "nsfw" }],
"sdModel": "660447313082219790",
"sdVae": "vae-ft-mse-840000-ema-pruned.ckpt",
"sampler": "DDIM",
"steps": 30,
"cfgScale": 9,
"clipSkip": 2,
"denoisingStrength": 0.5,
"v1Clip": true,
"modelAccessKey": "modelAccessKey",
"lora": {
"items": [
{
"loraModel": "660447313082219790",
"weight": 1,
"loraAccessKey": "loraAccessKey"
}
]
},
"embedding": {
"items": [
{
"model": "660447313082234679",
"weight": 1,
"embeddingAccessKey": "embeddingAccessKey"
}
]
}
}
}
]
}

工作流生图

对于需要加载私有模型的节点需要添加accessKey。目前有以下节点需要添加:CheckpointLoaderSimple, ImageOnlyCheckpointLoader, CheckpointLoaderSimpleWithNoiseSelect, LoraLoader, XY Input: Checkpoint, Efficient Loader, CR Load LoRA, LoraLoaderModelOnly, ttN pipeLoader, LoraLoader|pysssss, CheckpointLoader|pysssss

请求示例:

{
"request_id": "{{requestId}}",
"params": {
"21": {
"classType": "KSampler",
"inputs": {
"cfg": 8,
"denoise": 0.6,
"latent_image": ["35", 0],
"model": ["31", 0],
"negative": ["28", 0],
"positive": ["27", 0],
"sampler_name": "dpmpp_sde_gpu",
"scheduler": "karras",
"seed": 911746105591226,
"steps": 25
},
"properties": { "Node name for S&R": "KSampler" }
},
"26": {
"classType": "CheckpointLoaderSimple",
"inputs": {
"_base_model": "SD 1",
"ckpt_name": "601380436024757697",
"tams_ckpt_name": "慧晏秋v7 - 1.0",
"access_key": "xxyyzz999888"
},
"properties": { "Node name for S&R": "CheckpointLoaderSimple" }
},
"27": {
"classType": "CLIPTextEncode",
"inputs": { "clip": ["31", 1], "text": "1 girl" },
"properties": { "Node name for S&R": "CLIPTextEncode" }
},
"28": {
"classType": "CLIPTextEncode",
"inputs": { "clip": ["31", 1], "text": "low quality" },
"properties": { "Node name for S&R": "CLIPTextEncode" }
},
"29": {
"classType": "VAEDecode",
"inputs": { "samples": ["21", 0], "vae": ["26", 2] },
"properties": { "Node name for S&R": "VAEDecode" }
},
"30": {
"classType": "SaveImage",
"inputs": { "filename_prefix": "TensorArt", "images": ["29", 0] },
"properties": {}
},
"31": {
"classType": "LoraLoader",
"inputs": {
"_base_model": "SD 1",
"clip": ["26", 1],
"lora_name": "660447313082219790",
"model": ["26", 0],
"strength_clip": 1,
"strength_model": 1,
"tams_lora_name": "【调节波霸大小】波霸大球大小调节器 - v2.0",
"access_key": "xxyyzz999999"
},
"properties": { "Node name for S&R": "LoraLoader" }
},
"35": {
"classType": "EmptyLatentImage",
"inputs": { "batch_size": 1, "height": 512, "width": 512 },
"properties": { "Node name for S&R": "EmptyLatentImage" }
}
}
}