Commit d06af4e5 authored by AUTOMATIC's avatar AUTOMATIC
Browse files

fix and rework #11113

parent a9668768
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -522,9 +522,9 @@ class Api:
        return options
        return options


    def set_config(self, req: Dict[str, Any]):
    def set_config(self, req: Dict[str, Any]):
        checkpoint_key="sd_model_checkpoint"
        checkpoint_name = req.get("sd_model_checkpoint", None)
        if checkpoint_key in req and  str(req[checkpoint_key]) not in checkpoint_alisases:
        if checkpoint_name is not None and checkpoint_name not in checkpoint_alisases:
            raise RuntimeError(f"model {v!r} not found")
            raise RuntimeError(f"model {checkpoint_name!r} not found")


        for k, v in req.items():
        for k, v in req.items():
            shared.opts.set(k, v)
            shared.opts.set(k, v)