Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run script via API? #3

Open
alelordelo opened this issue Feb 7, 2024 · 1 comment
Open

Run script via API? #3

alelordelo opened this issue Feb 7, 2024 · 1 comment

Comments

@alelordelo
Copy link

Thanks for sharing this script, its a huge help with image to image!

How can I call it via API?

For controlNEt for example, I call via "alwayson_scripts".

Would it be the same with your script? And what parameters should we call?

Thank a lot again!

{ "prompt": "my prompt", "negative_prompt": "my negative", "width": 624, "height": 944, "seed": 114294952475285, "steps": 12, "cfg_scale": 2, "sampler_name": "DPM++ 2M Karras", "init_images": [ "base64img..." ], "denoising_strength": 0.95, "resize_mode": 0, "override_settings": {}, "alwayson_scripts": { "controlnet": { "args": [ { "enabled": true, "image": "base64controlnetimg...", "mask": "", "module": "none", "model": "control_sd15_depth [fef5e48e]", "weight": 1, "resize_mode": "Just Resize", "lowvram": false, "processor_res": 64, "threshold_a": 64, "threshold_b": 64, "guidance": 1, "guidance_start": 0, "guidance_end": 1, "guess_mode": false } ] } } }

@guzuligo
Copy link
Owner

guzuligo commented Feb 8, 2024

I'm not familiar with the API part, but I think it works outside of alwayson as it is a selectable script.

This worked for me when I experimented in the /docs part:
{
"save_images": true,
"prompt": "portrait",
"negative_prompt": "",
"steps": 10,
"seed":1,
"script_name": "CFG Scheduling",
"script_args": [
"0:10 ; .2:10",
"0:2",
0,0,"False"]
}

script_args is the one where you provide args in an array, where:
[
CFG as string ,
ETA as string, doesn't seem to work for some reason
target denoise: Number,
loops: Number,
Loop returns one: Boolean
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants