-
Notifications
You must be signed in to change notification settings - Fork 219
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
txt2img can not be called multiple times. #238
Comments
I found the crash caused by free_params_immediately=true when calling new_sd_ctx. So I assume we should check this param when user call the txt2img multiple times. Or point out the problem in the api document. |
;p you can try this commits branch: I think it already fixed early, which currently is working on svd-xt heavy output check & waiting accept. |
Thanks for your patch. Because I have some trouble to compile the cuda dll. It is too slow to test with cpu only dll. I will hold on until maintainer accept your merge. No rush for the patch. |
If you wish to generate images multiple times, simply set "free_params_immediately" to false. |
txt2img can not be called multiple times. when calling txt2img the second time it will crash at following line
cond_stage_model->compute(n_threads, input_ids, input_ids2, max_token_idx, false, &chunk_hidden_states, work_ctx);
I suspect there is some resource not freed after the first time txt2img call.
If I call free_sd_ctx and new_sd_ctx again then I can call the txt2img again. But it is obviously not reasonble because new_sd_ctx is very slow and time-consuming that need to load the model again.
The text was updated successfully, but these errors were encountered: