Compare commits
2 commits
main
...
studio-dif
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c58c00b54 | ||
|
|
361854189a |
2 changed files with 14 additions and 3 deletions
|
|
@ -1042,6 +1042,10 @@ class LlamaCppBackend:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supports_tools(self) -> bool:
|
def supports_tools(self) -> bool:
|
||||||
|
# DiffusionGemma serves via the visual runner, whose live per-step canvas
|
||||||
|
# frames are dropped by the agentic tool loop; never route it through tools.
|
||||||
|
if self._is_diffusion:
|
||||||
|
return False
|
||||||
return self._supports_tools
|
return self._supports_tools
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
@ -2523,6 +2527,10 @@ class LlamaCppBackend:
|
||||||
]
|
]
|
||||||
|
|
||||||
env = child_env_without_native_path_secret()
|
env = child_env_without_native_path_secret()
|
||||||
|
# `python -m unsloth_zoo.diffusion_studio.shim` imports unsloth_zoo, which
|
||||||
|
# refuses to load unless UNSLOTH_IS_PRESENT is set (normally by `import
|
||||||
|
# unsloth`). The shim never imports unsloth, so set it here as unsloth does.
|
||||||
|
env["UNSLOTH_IS_PRESENT"] = "1"
|
||||||
env["DG_VISUAL_BIN"] = visual_bin
|
env["DG_VISUAL_BIN"] = visual_bin
|
||||||
env["DG_GPU"] = gpu
|
env["DG_GPU"] = gpu
|
||||||
# The file-override shim imports its sibling visual_engine; put its dir on PYTHONPATH.
|
# The file-override shim imports its sibling visual_engine; put its dir on PYTHONPATH.
|
||||||
|
|
|
||||||
|
|
@ -285,11 +285,14 @@ function CodeBlockActions({
|
||||||
}
|
}
|
||||||
|
|
||||||
// DiffusionGemma renders its denoising live in the bubble (see DiffusionCanvas in
|
// DiffusionGemma renders its denoising live in the bubble (see DiffusionCanvas in
|
||||||
// thread.tsx), so it no longer forces HTML into an iframe artifact; it follows the
|
// thread.tsx) and has the artifacts canvas on by default, so a full-HTML answer
|
||||||
// same artifact rules as every other model.
|
// (e.g. a playable game) renders as an interactive card without the global toggle.
|
||||||
function StreamdownBlock(props: BlockProps) {
|
function StreamdownBlock(props: BlockProps) {
|
||||||
const shouldCollapseHtmlArtifacts = useChatRuntimeStore(
|
const shouldCollapseHtmlArtifacts = useChatRuntimeStore(
|
||||||
(state) => state.artifactsEnabled || state.collapseHtmlArtifacts,
|
(state) =>
|
||||||
|
state.artifactsEnabled ||
|
||||||
|
state.collapseHtmlArtifacts ||
|
||||||
|
state.loadedIsDiffusion,
|
||||||
);
|
);
|
||||||
const messageHasRenderableRenderHtmlTool = useAuiState(({ message }) =>
|
const messageHasRenderableRenderHtmlTool = useAuiState(({ message }) =>
|
||||||
message.parts.some(isRenderableRenderHtmlToolPart),
|
message.parts.some(isRenderableRenderHtmlToolPart),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue