[diffusion] model: support qwen-image-2.1 (#39983)
Co-authored-by: Mick Qian <mickqian@users.noreply.github.com> Co-authored-by: BBuf <1182563586@qq.com>
This commit is contained in:
@@ -1277,6 +1277,7 @@ export const Deployment = ({ config, benchmarks }) => {
|
||||
};
|
||||
|
||||
const [sel, setSel] = useState(() => initialSelectionFromCells());
|
||||
const [selectionHydrated, setSelectionHydrated] = useState(false);
|
||||
const INTERNAL_HASH_STATE_KEY = "__sglangDeployInternalHash";
|
||||
const DEPLOYMENT_COMPONENT_ID = "deployment-configurator";
|
||||
useEffect(() => {
|
||||
@@ -1310,12 +1311,14 @@ export const Deployment = ({ config, benchmarks }) => {
|
||||
if (el) el.scrollIntoView({ behavior: "smooth", block: "start" });
|
||||
};
|
||||
hydrate();
|
||||
setSelectionHydrated(true);
|
||||
window.addEventListener("hashchange", hydrate);
|
||||
return () => window.removeEventListener("hashchange", hydrate);
|
||||
}, []);
|
||||
// history.replaceState does NOT fire hashchange — dispatch a custom event so
|
||||
// the Playground hears chip-click selection changes.
|
||||
useEffect(() => {
|
||||
if (!selectionHydrated) return;
|
||||
const target = "#" + new URLSearchParams(sel).toString();
|
||||
if (window.location.hash !== target) {
|
||||
const historyState =
|
||||
@@ -1329,7 +1332,7 @@ export const Deployment = ({ config, benchmarks }) => {
|
||||
);
|
||||
}
|
||||
window.dispatchEvent(new CustomEvent("sglang-deploy-sel", { detail: sel }));
|
||||
}, [sel]);
|
||||
}, [sel, selectionHydrated]);
|
||||
|
||||
const [modal, setModal] = useState(null); // 'curl' | 'env' | 'bench' | null
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user