Skip to content

Commit 7270142

Browse files
authored
Remove old diffusers distribution (#713)
* fix: remove old diffusers image build steps from release workflow * fix: implement installation for diffusers backend in model runner
1 parent 11b33af commit 7270142

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,6 @@ jobs:
261261
echo "docker/model-runner:latest-sglang-cuda" >> "$GITHUB_OUTPUT"
262262
fi
263263
echo 'EOF' >> "$GITHUB_OUTPUT"
264-
echo "diffusers<<EOF" >> "$GITHUB_OUTPUT"
265-
echo "docker/model-runner:$RELEASE_TAG-diffusers" >> "$GITHUB_OUTPUT"
266-
if [ "$PUSH_LATEST" == "true" ]; then
267-
echo "docker/model-runner:latest-diffusers" >> "$GITHUB_OUTPUT"
268-
fi
269-
echo 'EOF' >> "$GITHUB_OUTPUT"
270264
echo "rocm<<EOF" >> "$GITHUB_OUTPUT"
271265
echo "docker/model-runner:$RELEASE_TAG-rocm" >> "$GITHUB_OUTPUT"
272266
if [ "$PUSH_LATEST" == "true" ]; then
@@ -366,20 +360,6 @@ jobs:
366360
provenance: mode=max
367361
tags: ${{ steps.tags.outputs.sglang-cuda }}
368362

369-
- name: Build Diffusers image
370-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
371-
with:
372-
file: Dockerfile
373-
target: final-diffusers
374-
platforms: linux/amd64, linux/arm64
375-
build-args: |
376-
"LLAMA_SERVER_VERSION=${{ env.LLAMA_SERVER_VERSION }}"
377-
"VERSION=${{ env.RELEASE_TAG }}"
378-
push: true
379-
sbom: true
380-
provenance: mode=max
381-
tags: ${{ steps.tags.outputs.diffusers }}
382-
383363
- name: Build ROCm image
384364
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
385365
with:

cmd/cli/commands/install-runner.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,28 @@ func runInstallOrStart(cmd *cobra.Command, opts runnerOptions, debug bool) error
253253
return nil
254254
}
255255

256+
// The diffusers backend uses deferred installation: it pulls a Docker
257+
// image, extracts a self-contained Python environment, and installs it
258+
// to a well-known local folder. Trigger installation via the running
259+
// model runner's API, the same way vllm-metal is handled above.
260+
if opts.backend == diffusers.Name && platform.SupportsDiffusers() {
261+
// For standalone contexts (Moby/Cloud), ensure a base runner is
262+
// available first so we have an API endpoint to call.
263+
engineKind := modelRunner.EngineKind()
264+
if engineKind == types.ModelRunnerEngineKindMoby || engineKind == types.ModelRunnerEngineKindCloud {
265+
if _, err := ensureStandaloneRunnerAvailable(cmd.Context(), asPrinter(cmd), debug); err != nil {
266+
return fmt.Errorf("unable to initialize standalone model runner: %w", err)
267+
}
268+
}
269+
270+
cmd.Println("Installing diffusers backend...")
271+
if err := desktopClient.InstallBackend(diffusers.Name); err != nil {
272+
return fmt.Errorf("failed to install diffusers backend: %w", err)
273+
}
274+
cmd.Println("diffusers backend installed successfully")
275+
return nil
276+
}
277+
256278
var vllmOnWSL bool
257279
// Ensure that we're running in a supported model runner context.
258280
engineKind := modelRunner.EngineKind()

0 commit comments

Comments
 (0)