File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 7
7
LatentsField ,
8
8
)
9
9
from invokeai .backend .bria .pipeline_bria_controlnet import prepare_latents
10
+ from invokeai .backend .util .devices import TorchDevice
10
11
from invokeai .invocation_api import (
11
12
BaseInvocation ,
12
13
Classification ,
@@ -42,11 +43,6 @@ class BriaLatentNoiseInvocation(BaseInvocation):
42
43
title = "Seed" ,
43
44
description = "The seed to use for the latent sampler" ,
44
45
)
45
- transformer : TransformerField = InputField (
46
- description = "Bria model (Transformer) to load" ,
47
- input = Input .Connection ,
48
- title = "Transformer" ,
49
- )
50
46
height : int = InputField (
51
47
default = 1024 ,
52
48
title = "Height" ,
@@ -60,9 +56,8 @@ class BriaLatentNoiseInvocation(BaseInvocation):
60
56
61
57
@torch .no_grad ()
62
58
def invoke (self , context : InvocationContext ) -> BriaLatentNoiseInvocationOutput :
63
- with context .models .load (self .transformer .transformer ) as transformer :
64
- device = transformer .device
65
- dtype = transformer .dtype
59
+ device = TorchDevice .choose_torch_device ()
60
+ dtype = TorchDevice .choose_torch_dtype ()
66
61
67
62
generator = torch .Generator (device = device ).manual_seed (self .seed )
68
63
You can’t perform that action at this time.
0 commit comments