MCPcopy Index your code
hub / github.com/modelscope/DiffSynth-Studio / initialize_model

Function initialize_model

apps/gradio/entity_level_control.py:189–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187 main_interface = gr.Column(visible=False)
188
189 def initialize_model():
190 try:
191 load_model()
192 return {
193 loading_status: gr.update(value="Model loaded successfully!", visible=False),
194 main_interface: gr.update(visible=True),
195 }
196 except Exception as e:
197 print(f'Failed to load model with error: {e}')
198 return {
199 loading_status: gr.update(value=f"Failed to load model: {str(e)}", visible=True),
200 main_interface: gr.update(visible=True),
201 }
202
203 app.load(initialize_model, inputs=None, outputs=[loading_status, main_interface])
204

Callers

nothing calls this directly

Calls 2

load_modelFunction · 0.70
updateMethod · 0.45

Tested by

no test coverage detected