Skip to content

Conversation

@aszokalski
Copy link

@aszokalski aszokalski commented Dec 4, 2025

Added lucent.util.set_default_device(backend_name) function to allow working with a mps backend.

NOTE: pytorch doesn't support all the required functions in the mps backend. You have to set an env variable PYTORCH_ENABLE_MPS_FALLBACK=1 to allow cpu fallback

Usage example:

from lucent.modelzoo import inceptionv1
import lucent.util as ut

device = ut.set_default_device("mps") # or cuda or cpu
model = inceptionv1(pretrained=True)
model.to(device).eval()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant