File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 2222from ...backend .stable_diffusion .diffusion .shared_invokeai_diffusion import \
2323 PostprocessingSettings
2424from ...backend .stable_diffusion .schedulers import SCHEDULER_MAP
25- from ...backend .util .devices import torch_dtype
25+ from ...backend .util .devices import choose_torch_device , torch_dtype
2626from ..models .image import ImageCategory , ImageField , ResourceOrigin
2727from .baseinvocation import (BaseInvocation , BaseInvocationOutput ,
2828 InvocationConfig , InvocationContext )
3838 XFormersAttnProcessor ,
3939)
4040
41- def choose_torch_device () -> str :
42- device = "cuda" if torch .cuda .is_available () else "cpu"
43- return device
44-
4541class LatentsField (BaseModel ):
4642 """A latents field used for passing latents between invocations"""
4743
You can’t perform that action at this time.
0 commit comments