我是新来的,非常感谢您的帮助。我目前遇到了一个问题,与stablediffusion API。这是我的代码。
const request_body = {
key: process.env.REACT_APP_STABLE_DIFFUSION_API,
prompt: "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner))",
negative_prompt: null,
width: "512",
height: "512",
samples: 1,
num_inference_steps: "20",
seed: null,
guidance_scale: 7.5,
safety_checker: "yes",
multi_lingual: "no",
panorama: "no",
self_attention: "no",
upscale: "no",
embeddings_model: null,
webhook: null,
track_id: null,
};
const generateImage = async () => {
const generateResponse = await axios.post(
"https://stablediffusionapi.com/api/v5/text2video",
request_body
);
console.log(generateResponse.data);
};
字符串
这不仅仅是API键的问题。结果是错误。状态显示错误,错误消息需要秒值。
2条答案
按热度按时间44u64gxh1#
字符串
嘿@theavocoder,你使用了错误的API。你使用的是text 2 video。尝试使用上面的API。
esbemjvw2#
在request_body中增加seconds参数,用于指定渲染时长相关参数。
字符串
添加异常处理程序以获得详细的错误洞察:
型