"{
""prompt"": """",
""negative_prompt"": """",
""styles"": [
""string""
],
""seed"": -1,
""subseed"": -1,
""subseed_strength"": 0,
""seed_resize_from_h"": -1,
""seed_resize_from_w"": -1,
""sampler_name"": ""string"",
""scheduler"": ""string"",
""batch_size"": 1,
""n_iter"": 1,
""steps"": 50,
""cfg_scale"": 7,
""width"": 512,
""height"": 512,
""restore_faces"": true,
""tiling"": true,
""do_not_save_samples"": false,
""do_not_save_grid"": false,
""eta"": 0,
""denoising_strength"": 0.75,
""s_min_uncond"": 0,
""s_churn"": 0,
""s_tmax"": 0,
""s_tmin"": 0,
""s_noise"": 0,
""override_settings"": {},
""override_settings_restore_afterwards"": true,
""refiner_checkpoint"": ""string"",
""refiner_switch_at"": 0,
""disable_extra_networks"": false,
""firstpass_image"": ""string"",
""comments"": {},
""init_images"": [
""string""
],
""resize_mode"": 0,
""image_cfg_scale"": 0,
""mask"": ""string"",
""mask_blur_x"": 4,
""mask_blur_y"": 4,
""mask_blur"": 0,
""mask_round"": true,
""inpainting_fill"": 0,
""inpaint_full_res"": true,
""inpaint_full_res_padding"": 0,
""inpainting_mask_invert"": 0,
""initial_noise_multiplier"": 0,
""latent_mask"": ""string"",
""force_task_id"": ""string"",
""sampler_index"": ""Euler"",
""include_init_images"": false,
""script_name"": ""string"",
""script_args"": [],
""send_images"": true,
""save_images"": false,
""alwayson_scripts"": {},
""infotext"": ""string""
}
ModelScope想用接口调用 图生图的 inpainting功能 stable diffusion webui inpaniting 这些参数怎么填? 这个是在本地部署的stable diffusion webui 填 data['firstpass_image'] = source_pic
data['mask'] = mask_pic
data['prompt'] = prompt 返回的是 {""error"":""HTTPException"",""detail"":""Invalid encoded image"",""body"":"""",""errors"":""""}"
您看下这个创空间的通过api使用,本地部署inpainting的例子还没有,参考以下链接
https://modelscope.cn/studios/AI-ModelScope/stable-diffusion-3-medium
此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352