7272
7373 <div v-if =" generated_images.length == 1" >
7474 <center >
75- <ImageItem :app_state =" app_state" :path =" generated_images[0]" :style_obj =" { 'width': 'calc(100vh - 380px )' , 'margin-top': '60px' }" ></ImageItem >
75+ <ImageItem :app_state =" app_state" :path =" generated_images[0]" :style_obj =" { 'width': 'calc(100vh - 390px )' , 'margin-top': '60px' }" ></ImageItem >
7676 </center >
7777 </div >
7878
@@ -152,6 +152,7 @@ export default {
152152 modifiers : require (" ../modifiers.json" ),
153153 is_negative_prompt_avail : false ,
154154 negative_prompt : " " ,
155+ selected_model : ' Default'
155156 };
156157
157158 },
@@ -179,8 +180,12 @@ export default {
179180 scale : this .guidence_scale ,
180181 ddim_steps : this .dif_steps ,
181182 num_imgs : this .num_imgs ,
182- batch_size : this .batch_size ,
183+ batch_size : this .batch_size
184+ }
183185
186+ if (this .selected_model && this .selected_model != " Default" && this .app_state .app_data .custom_models [this .selected_model ] ){
187+ params .model_id = - 1 ;
188+ params .custom_model_path = this .app_state .app_data .custom_models [this .selected_model ].path ;
184189 }
185190
186191 if (this .is_negative_prompt_avail )
@@ -201,23 +206,23 @@ export default {
201206 on_img (img_path ){
202207 that .generated_images .push (img_path);
203208
204- if (! (that .app_state .history [history_key])){
209+ if (! (that .app_state .app_data . history [history_key])){
205210 let p = {
206211 " prompt" : that .prompt , " seed" : seed, " img_w" : that .img_w , " img_h" : that .img_h , " key" : history_key , " imgs" : [],
207- " guidence_scale" : that .guidence_scale , " dif_steps" : that .dif_steps
212+ " guidence_scale" : that .guidence_scale , " dif_steps" : that .dif_steps
208213 }
209214 if (that .stable_diffusion .model_version )
210215 p[' model_version' ] = that .stable_diffusion .model_version ;
211216 if (that .is_negative_prompt_avail )
212217 p[' negative_prompt' ] = that .negative_prompt ;
213- Vue .set (that .app_state .history , history_key , p);
218+ Vue .set (that .app_state .app_data . history , history_key , p);
214219 }
215220
216221
217222
218- that .app_state .history [history_key].imgs .push (img_path)
223+ that .app_state .app_data . history [history_key].imgs .push (img_path)
219224
220- console .log (that .app_state .history )
225+ console .log (that .app_state .app_data . history )
221226
222227 },
223228 on_progress (p ){
0 commit comments