Skip to content

Controlnet not working ┗( ▔, ▔ )┛ #148

Open
@Louis24

Description


api = webuiapi.WebUIApi()
api = webuiapi.WebUIApi(host="127.0.0.1", port=7860)

r = api.txt2img(
    prompt="photo of a beautiful girl with blonde hair", height=512,    enable_hr=True,
        hr_scale=2,
        seed=-1,)
img = r.image

r.image.save("img1.png")


# txt2img with ControlNet (used 1.0 but also supports 1.1)
unit1 = webuiapi.ControlNetUnit(
    input_image=img, module="canny", model="control_v11p_sd15_canny [d14c016b]"
)

# r = api.txt2img(prompt="photo of a beautiful girl", controlnet_units=[unit1])
r = api.txt2img(prompt="cake", controlnet_units=[unit1])
r.image.save("img2.png")

this one worked, but when the img comes from local disk It wont work

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions