Skip to content

API for Soft Inpaiting ? #15138

Answered by missionfloyd
psykokwak-com asked this question in Q&A
Discussion options

You must be logged in to vote

See /sdapi/v1/script-info for script parameters.

import requests
import base64

url = "http://127.0.0.1:7860"

with open("input.png", "rb") as f, open("mask.png", "rb") as m:
    img = base64.b64encode(f.read()).decode('utf-8')
    mask = base64.b64encode(m.read()).decode('utf-8')

payload = {
    "prompt": "hot air balloon",
    "init_images": [img],
    "mask": mask,
    "alwayson_scripts": {
        "soft inpainting": {
            "args": [
                {
                    "Soft inpainting": True,
                    "Schedule bias": 1,
                    "Preservation strength": 0.5,
                    "Transition contrast boost": 4,
                    "Mask influence": 0,
  …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by psykokwak-com
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants