Skip to content

Commit 671c0a3

Browse files
committed
small fixes
1 parent 64952a3 commit 671c0a3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

electron_app/src/StableDiffusion.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ export default {
151151
this.remaining_times = compute_time_remaining(time_remaining);
152152
clearInterval(this.generation_loop);
153153
this.generation_loop = setInterval(() => {
154+
if(this.attached_cbs == undefined){
155+
return clearInterval(this.generation_loop);
156+
}
154157
time_remaining.subtract(1, 'seconds');
155158
this.remaining_times = compute_time_remaining(time_remaining);
156159
}, 1000);
@@ -167,8 +170,8 @@ export default {
167170
} ,
168171
169172
interupt(){
170-
send_to_py("t2im __stop__")
171-
clearInterval(this.generation_loop);
173+
send_to_py("t2im __stop__")
174+
this.attached_cbs = undefined;
172175
},
173176
174177
text_to_img(prompt_params, callbacks, generated_by){

0 commit comments

Comments
 (0)