Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
|
@@ -254,7 +254,7 @@ def predict_mask(segmentmodel, sam, image, TEXT_PROMPT, segmentType, confidence
|
|
| 254 |
def build_model_sd(pretrained_model, controlnet_path, face_adapter, device, prompts, antelopev2_path, width, height, style_lora):
|
| 255 |
controlnet = ControlNetModel.from_pretrained(controlnet_path, torch_dtype=torch.float16)
|
| 256 |
pipe = InstantidMultiConceptPipeline.from_pretrained(
|
| 257 |
-
pretrained_model, controlnet=controlnet, torch_dtype=torch.float16
|
| 258 |
|
| 259 |
controller = AttentionReplace(prompts, 50, cross_replace_steps={"default_": 1.},
|
| 260 |
self_replace_steps=0.4, tokenizer=pipe.tokenizer, device=device, width=width, height=height,
|
|
|
|
| 254 |
def build_model_sd(pretrained_model, controlnet_path, face_adapter, device, prompts, antelopev2_path, width, height, style_lora):
|
| 255 |
controlnet = ControlNetModel.from_pretrained(controlnet_path, torch_dtype=torch.float16)
|
| 256 |
pipe = InstantidMultiConceptPipeline.from_pretrained(
|
| 257 |
+
pretrained_model, controlnet=controlnet, torch_dtype=torch.float16).to(device)
|
| 258 |
|
| 259 |
controller = AttentionReplace(prompts, 50, cross_replace_steps={"default_": 1.},
|
| 260 |
self_replace_steps=0.4, tokenizer=pipe.tokenizer, device=device, width=width, height=height,
|