generateImage

Runs generate to completion and returns the image. onProgress (optional) receives every DiffusionEvent.Progress on the calling coroutine.

Throws

for the failure a DiffusionEvent.Error would report.

if the engine is closed.