File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,11 +32,15 @@ def _get_model(model_id: str) -> str:
3232 )
3333 args = parser .parse_args ()
3434 compute = Computing ()
35- generate = Generate (compute )
3635 model_id = _get_model (args .model )
3736
3837 print (f"Model : { model_id } " )
3938
39+ generate = Generate (
40+ compute ,
41+ model_id ,
42+ )
43+
4044 dm_web_ui = diffusionmagic_web_ui (
4145 generate ,
4246 model_id ,
Original file line number Diff line number Diff line change 2222
2323
2424class Generate :
25- def __init__ (self , compute : Computing ):
25+ def __init__ (
26+ self ,
27+ compute : Computing ,
28+ model_id : str ,
29+ ):
2630 self .pipe_initialized = False
2731 self .inpaint_pipe_initialized = False
2832 self .depth_pipe_initialized = False
@@ -35,7 +39,7 @@ def __init__(self, compute: Computing):
3539 self .controlnet = ControlnetContext (compute )
3640 self .stable_diffusion_xl = StableDiffusionXl (compute )
3741 self .app_settings = AppSettings ().get_settings ()
38- self .model_id = self . app_settings . model_settings . model_id
42+ self .model_id = model_id
3943 self .low_vram_mode = self .app_settings .low_memory_mode
4044 self .wuerstchen = Wuerstchen (compute )
4145
You can’t perform that action at this time.
0 commit comments