Leonardo-Interactive / leonardo-python-sdk

MIT License
17 stars 6 forks source link

400 response on CreateGenerationRequestBody #4

Open impactcolor opened 1 year ago

impactcolor commented 1 year ago

When running the exact example of generate image: `import leonardoaisdk from leonardoaisdk.models import operations, shared

s = leonardoaisdk.LeonardoAiSDK( security=shared.Security( bearer_auth="MY API TOKEN GENERATED FROM LEONARDO DASHBOARD", ), )

req = operations.CreateGenerationRequestBody( alchemy=False, contrast_ratio=3834.41, control_net=False, control_net_type=shared.ControlnetType.CANNY, expanded_domain=False, guidance_scale=791725, height=812169, high_contrast=False, high_resolution=False, image_prompt_weight=5288.95, image_prompts=[ 'excepturi', 'nisi', ], init_generation_image_id='recusandae', init_image_id='temporibus', init_strength=710.36, model_id='quis', negative_prompt='veritatis', nsfw=False, num_images=648172, num_inference_steps=20218, preset_style=shared.SdGenerationStyle.LEONARDO, prompt='repellendus', prompt_magic=False, prompt_magic_version='sapiente', public=False, scheduler=shared.SdGenerationSchedulers.DPM_SOLVER, sd_version=shared.SdVersions.V1_5, seed=870013, tiling=False, unzoom=False, unzoom_amount=8700.88, upscale_ratio=9786.19, weighting=4736.08, width=799159, )

res = s.generation.create_generation(req) print(res)

Print res response is CreateGenerationResponse(content_type='application/json; charset=utf-8', status_code=400, create_generation_200_application_json_object=None, raw_response=<Response [400]>)

Any idea what is wrong?