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

Function model_path_to_default_params

apps/gradio/DiffSynth_Studio.py:159–166  ·  view source on GitHub ↗
(model_type, model_path, prompt, negative_prompt, cfg_scale, embedded_guidance, num_inference_steps, height, width)

Source from the content-addressed store, hash-verified

157 triggers=model_path.change
158 )
159 def model_path_to_default_params(model_type, model_path, prompt, negative_prompt, cfg_scale, embedded_guidance, num_inference_steps, height, width):
160 load_model(model_type, model_path)
161 cfg_scale = config["model_config"][model_type]["default_parameters"].get("cfg_scale", cfg_scale)
162 embedded_guidance = config["model_config"][model_type]["default_parameters"].get("embedded_guidance", embedded_guidance)
163 num_inference_steps = config["model_config"][model_type]["default_parameters"].get("num_inference_steps", num_inference_steps)
164 height = config["model_config"][model_type]["default_parameters"].get("height", height)
165 width = config["model_config"][model_type]["default_parameters"].get("width", width)
166 return prompt, negative_prompt, cfg_scale, embedded_guidance, num_inference_steps, height, width
167
168
169 with gr.Column(scale=618, min_width=100):

Callers

nothing calls this directly

Calls 1

load_modelFunction · 0.70

Tested by

no test coverage detected