Skip to content

Commit 94787b7

Browse files
Missing def choose_torch_device (#3834)
## What type of PR is this? (check all applicable) - [ ] Refactor - [ ] Feature - [X] Bug Fix - [ ] Optimization - [ ] Documentation Update ## Have you discussed this change with the InvokeAI team? - [ ] Yes - [X] No, because: ## Description Fix for ``` File "/home/invokeuser/InvokeAI/invokeai/app/services/processor.py", line 70, in __process outputs = invocation.invoke( File "/home/invokeuser/InvokeAI/invokeai/app/invocations/latent.py", line 660, in invoke device=choose_torch_device() NameError: name 'choose_torch_device' is not defined ``` when using scale latents node ## Related Tickets & Documents <!-- For pull requests that relate or close an issue, please include them below. For example having the text: "closes #1234" would connect the current pull request to issue 1234. And when we merge the pull request, Github will automatically close the issue. --> - Related Issue # - Closes # ## QA Instructions, Screenshots, Recordings <!-- Please provide steps on how to test changes, any hardware or software specifications as well as any other pertinent information. --> ## Added/updated tests? - [ ] Yes - [ ] No : _please replace this line with details on why tests have not been included_ ## [optional] Are there any post deployment tasks we need to perform?
2 parents 632346b + d8db618 commit 94787b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

invokeai/app/invocations/latent.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from ...backend.stable_diffusion.diffusion.shared_invokeai_diffusion import \
2323
PostprocessingSettings
2424
from ...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
2626
from ..models.image import ImageCategory, ImageField, ResourceOrigin
2727
from .baseinvocation import (BaseInvocation, BaseInvocationOutput,
2828
InvocationConfig, InvocationContext)
@@ -38,7 +38,6 @@
3838
XFormersAttnProcessor,
3939
)
4040

41-
4241
class LatentsField(BaseModel):
4342
"""A latents field used for passing latents between invocations"""
4443

0 commit comments

Comments
 (0)