Open tristanschulze opened 1 year ago
Did you end up solving this? did you just have to pass all of the arguments?
TypeError: Script.run() missing 11 required positional arguments: 'save_depthmap', 'treshold', 'match_size', 'net_width', 'net_height', 'invert_depth', 'model_type', 'override_mask_blur', 'override_fill', 'clean_cut', and 'save_alpha_crop'
@crypticsymmetry - Unfortunately no. Actually I passed all those parameters in an updated version. But with no sucess eigher :/ - Don't know what I am missing.
i got it working for 'Ultimate SD upscale', this is what the script_args looks like if it helps.
const imageData = await response.json();
const imageBase64 = imageData.images[0];
script_name: script,
script_args: [
imageBase64, 608, 608, 8, 32, 64, 0.35, 16,
3, 'True', 1, "False", 4,
0, "From img2img2 settings", 1512, 1512, 2
],
my error:
TypeError: Script.run() missing 18 required positional arguments: '_', 'tile_width', 'tile_height', 'mask_blur', 'padding', 'seams_fix_width', 'seams_fix_denoise', 'seams_fix_padding', 'upscaler_index', 'save_upscaled_image', 'redraw_mode', 'save_seams_fix_image', 'seams_fix_mask_blur', 'seams_fix_type', 'target_size_type', 'custom_width', 'custom_height', and 'custom_scale'
I just fix the bug by update the newest code of api.py If you passed "alwayson_scripts",sd may produced TypeError: Script.run() missing xx required positional arguments. hopes this commit can help you Changed behavior that puts the args from alwayson_script request in t…
my ultimate upscaler suddenly unable to use.
TypeError: Script.run() missing 18 required positional arguments: '_', 'tile_width', 'tile_height', 'mask_blur', 'padding', 'seams_fix_width', 'seams_fix_denoise', 'seams_fix_padding', 'upscaler_index', 'save_upscaled_image', 'redraw_mode', 'save_seams_fix_image', 'seams_fix_mask_blur', 'seams_fix_type', 'target_size_type', 'custom_width', 'custom_height', and 'custom_scale'
anyone have the same issue?
Did you end up solving this? did you just have to pass all of the arguments?
TypeError: Script.run() missing 11 required positional arguments: 'save_depthmap', 'treshold', 'match_size', 'net_width', 'net_height', 'invert_depth', 'model_type', 'override_mask_blur', 'override_fill', 'clean_cut', and 'save_alpha_crop'
Good news I figured this one out :) Turns out the model_type is not a string. It's a integer index for this array found in "\extensions\depthmap2mask\scripts\depthmap_for_depth2img.py":
models = ["dpt_beit_large_512",
"dpt_beit_large_384",
"dpt_beit_base_384",
"dpt_swin2_large_384",
"dpt_swin2_base_384",
"dpt_swin2_tiny_256",
"dpt_swin_large_384",
"dpt_next_vit_large_384",
"dpt_levit_224",
"dpt_large_384",
"dpt_hybrid_384",
"midas_v21_384",
"midas_v21_small_256",
# "openvino_midas_v21_small_256"
]
I'm using PHP here, not python, but this now working for me:
"script_name" => "Depth aware img2img mask",
"script_args" => [
# 'save_depthmap', 'treshold', 'match_size', 'net_width', 'net_height', 'invert_depth', 'model_type', 'override_mask_blur', 'override_fill', 'clean_cut', and 'save_alpha_crop'
true,0.5,true,200,200,false,11,false,false,false,false
],
Hope it helps you
Is there an existing issue for this?
What happened?
Hey guys, I am pretty stuck with this :( > I am building a custom plugin for Automatic1111 API to Unity/C# using mainly the img2img section. By default, everything works fine - now, if I try to call an extension script via API - for example "script_name": "Depth aware img2img mask" - to get a quick depthmap - I constanty recieve an 500 Error ( "Invalid encoded image" ) - If I comment the "script_name" element out of the JSON, everything works fine. What did I miss?
Is there any documentation or help? - I hope you guy could give me a kickstart for this! I would really apreciate!!!
Steps to reproduce the problem
What should have happened?
The API should return the prompted image + a depthmap
Commit where the problem happens
python: 3.10.9 • torch: 1.12.1+cu113 • xformers: N/A • gradio: 3.16.2 • commit: ea9bd9fc • checkpoint: fe4efff1e1
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
List of extensions
Depth aware img2img mask
Console logs
Additional information
No response