Aedial / novelai-api

Python API for the NovelAI REST API
https://aedial.github.io/novelai-api/
MIT License
129 stars 17 forks source link

ddim sampler using /ai/generation-image API not working properly on nai-diffusion-v3. #26

Closed bedovyy closed 10 months ago

bedovyy commented 10 months ago

If sampler set to ddim for /ai/generation-image with nai-diffusion-v3, it generates noised image.

using_API

On web page, it generates properly. but in EXIF, sampler shows as "Euler a" on parameters and "ddim_v3" on Comment.

using_WEB

It seems using ddim sampler via API needs more settings or something, but I cannot get additional settings or params for ddim from code.

I checked,

I didn't check,

By the way, on web page, if SMEA+DYN is checked with other sampler then change sampler to DDIM, the generation costs 28 anlas, not 20 anlas even though DDIM cannot use SMEA or SMEA+DYN.

Aedial commented 10 months ago

It seems the website seamlessly translates ddim to ddim_v3 with v3. I recall ddim being somewhat broken for older versions, which might explain it. Pushing a fix for that tomorrow. For SMEA and DYN, there is no check in my cost calculation for whether or not a combination is possible. It's complicated to maintain and not that meaningful. For v3, SMEA and SMEA+DYN are simply multipliers on the cost. On v1 and v2, it's more complicated.

Aedial commented 10 months ago

Fixed with 0f62c89c1fde1f50fb422a2886d1ed0320f22f4f

bedovyy commented 10 months ago

I could generate same image as web. Thank you.