Model switch fix
This commit is contained in:
@@ -32,7 +32,7 @@ async def ensure_model_state(model_name: str, model_preset: Dict[str, Any]):
|
|||||||
preset = model_preset.get("preset", "xl")
|
preset = model_preset.get("preset", "xl")
|
||||||
await asyncio.to_thread(
|
await asyncio.to_thread(
|
||||||
requests.post,
|
requests.post,
|
||||||
f"{config.SD_URL}/api/predict/checkpoint_change",
|
f"{config.SD_URL}/api/checkpoint_change",
|
||||||
json={"data": [target_ckpt, preset]},
|
json={"data": [target_ckpt, preset]},
|
||||||
timeout=30
|
timeout=30
|
||||||
)
|
)
|
||||||
@@ -45,7 +45,7 @@ async def ensure_model_state(model_name: str, model_preset: Dict[str, Any]):
|
|||||||
preset = model_preset.get("preset", "xl")
|
preset = model_preset.get("preset", "xl")
|
||||||
await asyncio.to_thread(
|
await asyncio.to_thread(
|
||||||
requests.post,
|
requests.post,
|
||||||
f"{config.SD_URL}/api/predict/modules_change",
|
f"{config.SD_URL}/api/modules_change",
|
||||||
json={"data": [target_modules, preset]},
|
json={"data": [target_modules, preset]},
|
||||||
timeout=30
|
timeout=30
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user