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

^^^^ NameError: name 'null' is not defined #23

Open
ClothingAI opened this issue Oct 12, 2024 · 0 comments
Open

^^^^ NameError: name 'null' is not defined #23

ClothingAI opened this issue Oct 12, 2024 · 0 comments

Comments

@ClothingAI
Copy link

Hi I tried to run this Payload that I just copied using this extension:

{"alwayson_scripts": {"API payload": {"args": []}, "ControlNet": {"args": [{"batch_image_dir": "", "batch_input_gallery": null, "batch_mask_dir": "", "batch_mask_gallery": null, "control_mode": "Balanced", "enabled": false, "generated_image": null, "guidance_end": 1.0, "guidance_start": 0.0, "hr_option": "Both", "image": null, "image_fg": null, "input_mode": "simple", "mask_image": null, "mask_image_fg": null, "model": "None", "module": "None", "pixel_perfect": false, "processor_res": -1, "resize_mode": "Crop and Resize", "save_detected_map": true, "threshold_a": -1, "threshold_b": -1, "use_preview_as_input": false, "weight": 1}, {"batch_image_dir": "", "batch_input_gallery": null, "batch_mask_dir": "", "batch_mask_gallery": null, "control_mode": "Balanced", "enabled": false, "generated_image": null, "guidance_end": 1.0, "guidance_start": 0.0, "hr_option": "Both", "image": null, "image_fg": null, "input_mode": "simple", "mask_image": null, "mask_image_fg": null, "model": "None", "module": "None", "pixel_perfect": false, "processor_res": -1, "resize_mode": "Crop and Resize", "save_detected_map": true, "threshold_a": -1, "threshold_b": -1, "use_preview_as_input": false, "weight": 1}, {"batch_image_dir": "", "batch_input_gallery": null, "batch_mask_dir": "", "batch_mask_gallery": null, "control_mode": "Balanced", "enabled": false, "generated_image": null, "guidance_end": 1.0, "guidance_start": 0.0, "hr_option": "Both", "image": null, "image_fg": null, "input_mode": "simple", "mask_image": null, "mask_image_fg": null, "model": "None", "module": "None", "pixel_perfect": false, "processor_res": -1, "resize_mode": "Crop and Resize", "save_detected_map": true, "threshold_a": -1, "threshold_b": -1, "use_preview_as_input": false, "weight": 1}]}, "Dynamic Prompts v2.17.1": {"args": [true, false, 1, false, false, false, 1.1, 1.5, 100, 0.7, false, false, true, false, false, 0, "Gustavosta/MagicPrompt-Stable-Diffusion", ""]}, "DynamicThresholding (CFG-Fix) Integrated": {"args": [false, 7, 1, "Constant", 0, "Constant", 0, 1, "enable", "MEAN", "AD", 1]}, "Extra options": {"args": []}, "FreeU Integrated (SD 1.x, SD 2.x, SDXL)": {"args": [false, 1.01, 1.02, 0.99, 0.95, 0, 1]}, "Kohya HRFix Integrated": {"args": [false, 3, 2, 0, 0.35, true, "bicubic", "bicubic"]}, "LatentModifier Integrated": {"args": [false, 0, "anisotropic", 0, "reinhard", 100, 0, "subtract", 0, 0, "gaussian", "add", 0, 100, 127, 0, "hard_clamp", 5, 0, "None", "None"]}, "MultiDiffusion Integrated": {"args": [false, "MultiDiffusion", 768, 768, 64, 4]}, "Never OOM Integrated": {"args": [false, false]}, "PerturbedAttentionGuidance Integrated": {"args": [false, 3]}, "Refiner": {"args": [false]}, "Sampler": {"args": [40, "Euler", "Simple"]}, "Seed": {"args": [3402, false, -1, 0, 0, 0]}, "SelfAttentionGuidance Integrated (SD 1.x, SD 2.x, SDXL)": {"args": [false, 0.5, 2, 1]}, "StyleAlign Integrated": {"args": [false, 1]}}, "batch_size": 1, "cfg_scale": 1, "comments": {}, "denoising_strength": 0.7, "disable_extra_networks": false, "distilled_cfg_scale": 3.5, "do_not_save_grid": false, "do_not_save_samples": false, "enable_hr": false, "height": 768, "hr_cfg": 1, "hr_distilled_cfg": 3.5, "hr_negative_prompt": "", "hr_prompt": "", "hr_resize_x": 0, "hr_resize_y": 0, "hr_scale": 2, "hr_second_pass_steps": 0, "hr_upscaler": "Latent", "n_iter": 1, "negative_prompt": "", "override_settings": {}, "override_settings_restore_afterwards": true, "prompt": "Some positive prompt. lora:WalterWhite_TOK_Flux_v1:1", "restore_faces": false, "s_churn": 0, "s_min_uncond": 0, "s_noise": 1, "s_tmax": null, "s_tmin": 0, "sampler_name": "Euler", "scheduler": "Simple", "script_args": [], "script_name": null, "seed": 3402, "seed_enable_extras": true, "seed_resize_from_h": -1, "seed_resize_from_w": -1, "steps": 40, "styles": [], "subseed": 1343781333, "subseed_strength": 0, "tiling": false, "width": 1024}

I asked AI, and it said it is probably because some values were "null" instead of "None" which Python prefers.
It also pointed out that true and false should be True False (don't know if that matters for the api request since it is.. web requests.. is it javascript? I have NO IDEA"

It suggested me this correction instead:

payload = {
"alwayson_scripts": {
"API payload": {"args": []},
"ControlNet": {
"args": [
{
"batch_image_dir": "",
"batch_input_gallery": None,
"batch_mask_dir": "",
"batch_mask_gallery": None,
"control_mode": "Balanced",
"enabled": False,
"generated_image": None,
"guidance_end": 1.0,
"guidance_start": 0.0,
"hr_option": "Both",
"image": None,
"image_fg": None,
"input_mode": "simple",
"mask_image": None,
"mask_image_fg": None,
"model": "None",
"module": "None",
"pixel_perfect": False,
"processor_res": -1,
"resize_mode": "Crop and Resize",
"save_detected_map": True,
"threshold_a": -1,
"threshold_b": -1,
"use_preview_as_input": False,
"weight": 1
},
{
"batch_image_dir": "",
"batch_input_gallery": None,
"batch_mask_dir": "",
"batch_mask_gallery": None,
"control_mode": "Balanced",
"enabled": False,
"generated_image": None,
"guidance_end": 1.0,
"guidance_start": 0.0,
"hr_option": "Both",
"image": None,
"image_fg": None,
"input_mode": "simple",
"mask_image": None,
"mask_image_fg": None,
"model": "None",
"module": "None",
"pixel_perfect": False,
"processor_res": -1,
"resize_mode": "Crop and Resize",
"save_detected_map": True,
"threshold_a": -1,
"threshold_b": -1,
"use_preview_as_input": False,
"weight": 1
},
{
"batch_image_dir": "",
"batch_input_gallery": None,
"batch_mask_dir": "",
"batch_mask_gallery": None,
"control_mode": "Balanced",
"enabled": False,
"generated_image": None,
"guidance_end": 1.0,
"guidance_start": 0.0,
"hr_option": "Both",
"image": None,
"image_fg": None,
"input_mode": "simple",
"mask_image": None,
"mask_image_fg": None,
"model": "None",
"module": "None",
"pixel_perfect": False,
"processor_res": -1,
"resize_mode": "Crop and Resize",
"save_detected_map": True,
"threshold_a": -1,
"threshold_b": -1,
"use_preview_as_input": False,
"weight": 1
}
]
},
"Dynamic Prompts v2.17.1": {
"args": [
True, False, 1, False, False, False, 1.1, 1.5, 100, 0.7,
False, False, True, False, False, 0,
"Gustavosta/MagicPrompt-Stable-Diffusion", ""
]
},
"DynamicThresholding (CFG-Fix) Integrated": {
"args": [False, 7, 1, "Constant", 0, "Constant", 0, 1, "enable", "MEAN", "AD", 1]
},
"Extra options": {"args": []},
"FreeU Integrated (SD 1.x, SD 2.x, SDXL)": {
"args": [False, 1.01, 1.02, 0.99, 0.95, 0, 1]
},
"Kohya HRFix Integrated": {
"args": [False, 3, 2, 0, 0.35, True, "bicubic", "bicubic"]
},
"LatentModifier Integrated": {
"args": [
False, 0, "anisotropic", 0, "reinhard", 100, 0, "subtract",
0, 0, "gaussian", "add", 0, 100, 127, 0, "hard_clamp", 5, 0,
"None", "None"
]
},
"MultiDiffusion Integrated": {
"args": [False, "MultiDiffusion", 768, 768, 64, 4]
},
"Never OOM Integrated": {"args": [False, False]},
"PerturbedAttentionGuidance Integrated": {"args": [False, 3]},
"Refiner": {"args": [False]},
"Sampler": {"args": [40, "Euler", "Simple"]},
"Seed": {"args": [3402, False, -1, 0, 0, 0]},
"SelfAttentionGuidance Integrated (SD 1.x, SD 2.x, SDXL)": {
"args": [False, 0.5, 2, 1]
},
"StyleAlign Integrated": {"args": [False, 1]}
},
"batch_size": 1,
"cfg_scale": 1,
"comments": {},
"denoising_strength": 0.7,
"disable_extra_networks": False,
"distilled_cfg_scale": 3.5,
"do_not_save_grid": False,
"do_not_save_samples": False,
"enable_hr": False,
"height": 768,
"hr_cfg": 1,
"hr_distilled_cfg": 3.5,
"hr_negative_prompt": "",
"hr_prompt": "",
"hr_resize_x": 0,
"hr_resize_y": 0,
"hr_scale": 2,
"hr_second_pass_steps": 0,
"hr_upscaler": "Latent",
"n_iter": 1,
"negative_prompt": "",
"override_settings": {},
"override_settings_restore_afterwards": True,
"prompt": (
"Some prompt"
"lora:WalterWhite_TOK_Flux_v1:1"
),
"restore_faces": False,
"s_churn": 0,
"s_min_uncond": 0,
"s_noise": 1,
"s_tmax": None,
"s_tmin": 0,
"sampler_name": "Euler",
"scheduler": "Simple",
"script_args": [],
"script_name": None,
"seed": 3402,
"seed_enable_extras": True,
"seed_resize_from_h": -1,
"seed_resize_from_w": -1,
"steps": 40,
"styles": [],
"subseed": 113875680,
"subseed_strength": 0,
"tiling": False,
"width": 1024
}

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

1 participant