Skip to content

Commit d07efdd

Browse files
feat(nodes): extract LaMa model url to constant
1 parent 7b84f8c commit d07efdd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

invokeai/app/invocations/infill.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,16 @@ def infill(self, image: Image.Image):
127127
return infilled
128128

129129

130+
LAMA_MODEL_URL = "https://github.com/Sanster/models/releases/download/add_big_lama/big-lama.pt"
131+
132+
130133
@invocation("infill_lama", title="LaMa Infill", tags=["image", "inpaint"], category="inpaint", version="1.2.2")
131134
class LaMaInfillInvocation(InfillImageProcessorInvocation):
132135
"""Infills transparent areas of an image using the LaMa model"""
133136

134137
def infill(self, image: Image.Image):
135138
with self._context.models.load_remote_model(
136-
source="https://github.com/Sanster/models/releases/download/add_big_lama/big-lama.pt",
139+
source=LAMA_MODEL_URL,
137140
loader=LaMA.load_jit_model,
138141
) as model:
139142
lama = LaMA(model)

0 commit comments

Comments
 (0)