开发者社区 > 云原生 > Serverless > 正文

函数计算FC图生图 api调用报这个错是为什么呢?

函数计算FC图生图 api调用报这个错是为什么呢?API调用这个局部绘制的功能,报错b373c25e21bf1b281381f644aef995bd.png
30ae6867399cd330b094c3902d522dd9.png
b373c25e21bf1b281381f644aef995bd.png

展开
收起
三分钟热度的鱼 2023-12-13 19:05:21 160 0
1 条回答
写回答
取消 提交回答
  • 先换一个别的图试下吧,我试了下是可以用的。import requests
    import base64

    endpoint=""
    username=""
    password=""

    resp = requests.post(
    "%s/sdapi/v1/img2img" % endpoint,
    headers={
    **({"Authorization": "Basic %s" % (base64.b64encode(("%s:%s" % (username, password)).encode("utf-8")).decode("utf-8"))} if username != "" and password != "" else {})
    },
    json={
    "prompt": "cat",
    "step": 10,
    "height": 1024,
    "width": 1024,
    "init_images": [
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAYAAAB/HSuDAAAAAXNSR0IArs4c6QAAIABJREFUeF6EvWt2JD1yLJgkq1qj/W9Lt/VrzmndBeixBxU5B25PR+TX01J3kcmMCMDhbm7+AOLjP//ff/v5+Px5vT4+X6/X9+vj5/U6/3P+mf/8vF4/Pz+vj4/zc31+vvb6OR/N386/85+P8//ny/rVd+Lf8KVzDZ5Vv89D8N+Pr1+vr6/fr4/fv1+fX78zBo/r5/V9fv7+nmfPU3S/M5cZEJ6jZ3DE87fz+ff5ypnT3ABz02jnM03o9fP65CTnrh+878/H6+PzI3Pn3yQ3PBeDm8s1lNfH6/OIe77/iT/OlynnXGa5a2Qjbz+gJ6378Vbf54qsWy2nBzKP5d2+f7SI58Kf18/3SBdPqvXXImIc5/7nf0twWvpzja73nWoUPx+vn4/zHT0X8ta9MLbc+OeML2qlgV13jq55+d49uz/juq55nPWVJlC3sEQ9AI0H44d9RH/GDmg70r9IRAss+fG+up73ooJwDWRbNXUpFYeW2Wuc60aWZvSHc6hx25bXorYtcOzSHf5JunR/s1VjtG3EdWyOYySuPJbJmlkytVDXAnJZeqGo10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fr3RZYM62VtdGlrRTuJMfOlM5ScZj0r2JB9SOaaqwigiRVdDu0Ht2hDBVceAJCjKtvDGKG/5oYe+F4H4/Abp9IJEgHk2JcvejM/J1o475qKZ9C662xako/xDbRnqzruYMK85CVdSHYOOHISAH8QdJxgY9lN9IvSivbVGsIWyjkacMmFx862XCIiab5mT50q4J7vioiXgpm0f3zSnmhfg3MhVGNrclTSN2LdcihtS4u9luxKR+nFkOwQGy4PfK/nwhUmSLBEO4goIVeAR0g69+e6yV1rHPA/WsJyivp8REtLlj7bhJ+Y1RgYeV7EovIZHncDWdtCBau4d/tLYgOGOMnSOwcFPaBOneDYOHQ9+Y0fDgOnAmnehadNaBdjpy7t9exn4i/vIEK2MQFJ+QN9WWuGdWGhgHP7/PpC8HkS73N/JKvlLeBDMh//PqKrz2eoNe+LPsCFbhxuPMUcKvgwb0isCz+qFeF3+VhcXonvGx8oSuBW6XljSq/XFC+k/QzO5Us8t0vxAsU0FxFDPdzKieBxLS/s6vAX4+Dx458fkzxtHIA9VwKlOcu9Jlo/fmezoad+LS0vbjABXa0fxl5VGCxf6IKX4uIPNHglIhYnKfz+OEWoy/b8Xc5fQxK+qui054C7ZGn1+3KgkPnFyTxf4oWj2pKFbrzsMu4lll+P68v9hQdWWIWc69F3o781MfmyOydi3gIp0HtfYLal47XlWm0todWbh77Rg8aCeaBRbRd1aKPzPPOvts2s3BLPOxCcr2ZsSszwY8ykMbt4u/V4KwoHUrBm4xG/v
    我的api参数,你可以试试。此回答整理自钉群“【答疑群】函数计算 AIGC 场景技术交流”

    2023-12-13 19:24:07
    赞同 展开评论 打赏

快速交付实现商业价值。

相关产品

  • 函数计算
  • 热门讨论

    热门文章

    相关电子书

    更多
    Spring Boot2.0实战Redis分布式缓存 立即下载
    CUDA MATH API 立即下载
    API PLAYBOOK 立即下载