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

400 response on CreateGenerationRequestBody #4

Open
impactcolor opened this issue Sep 4, 2023 · 0 comments
Open

400 response on CreateGenerationRequestBody #4

impactcolor opened this issue Sep 4, 2023 · 0 comments

Comments

@impactcolor
Copy link

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?

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