Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -127,16 +127,16 @@ face_app = FaceAnalysis(name="buffalo_l", root=str(CACHE_ROOT), providers=provid
|
|
| 127 |
face_app.prepare(ctx_id=(0 if torch.cuda.is_available() else -1), det_size=(640, 640))
|
| 128 |
|
| 129 |
# ControlNet + SD パイプライン
|
| 130 |
-
controlnet = ControlNetModel.from_pretrained(
|
| 131 |
-
"InstantX/InstantID", subfolder="ControlNetModel", torch_dtype=dtype
|
| 132 |
-
)
|
| 133 |
pipe = StableDiffusionPipeline.from_single_file(
|
| 134 |
BASE_CKPT, torch_dtype=dtype, safety_checker=None, use_safetensors=True, clip_skip=2
|
| 135 |
)
|
| 136 |
pipe.vae = AutoencoderKL.from_pretrained(
|
| 137 |
"stabilityai/sd-vae-ft-mse", torch_dtype=dtype
|
| 138 |
).to(device)
|
| 139 |
-
pipe.controlnet = controlnet
|
| 140 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
| 141 |
pipe.scheduler.config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++"
|
| 142 |
)
|
|
@@ -217,8 +217,8 @@ def generate(
|
|
| 217 |
prompt=prompt,
|
| 218 |
negative_prompt=neg,
|
| 219 |
ip_adapter_image=img_in,
|
| 220 |
-
image=img_in,
|
| 221 |
-
controlnet_conditioning_scale=0.9,
|
| 222 |
num_inference_steps=int(steps) + 5,
|
| 223 |
guidance_scale=cfg,
|
| 224 |
width=int(w),
|
|
@@ -268,4 +268,4 @@ with gr.Blocks() as demo:
|
|
| 268 |
)
|
| 269 |
|
| 270 |
print("launching …")
|
| 271 |
-
demo.queue().launch(show_error=True)
|
|
|
|
| 127 |
face_app.prepare(ctx_id=(0 if torch.cuda.is_available() else -1), det_size=(640, 640))
|
| 128 |
|
| 129 |
# ControlNet + SD パイプライン
|
| 130 |
+
#controlnet = ControlNetModel.from_pretrained(
|
| 131 |
+
# "InstantX/InstantID", subfolder="ControlNetModel", torch_dtype=dtype
|
| 132 |
+
#)
|
| 133 |
pipe = StableDiffusionPipeline.from_single_file(
|
| 134 |
BASE_CKPT, torch_dtype=dtype, safety_checker=None, use_safetensors=True, clip_skip=2
|
| 135 |
)
|
| 136 |
pipe.vae = AutoencoderKL.from_pretrained(
|
| 137 |
"stabilityai/sd-vae-ft-mse", torch_dtype=dtype
|
| 138 |
).to(device)
|
| 139 |
+
#pipe.controlnet = controlnet
|
| 140 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
| 141 |
pipe.scheduler.config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++"
|
| 142 |
)
|
|
|
|
| 217 |
prompt=prompt,
|
| 218 |
negative_prompt=neg,
|
| 219 |
ip_adapter_image=img_in,
|
| 220 |
+
#image=img_in,
|
| 221 |
+
#controlnet_conditioning_scale=0.9,
|
| 222 |
num_inference_steps=int(steps) + 5,
|
| 223 |
guidance_scale=cfg,
|
| 224 |
width=int(w),
|
|
|
|
| 268 |
)
|
| 269 |
|
| 270 |
print("launching …")
|
| 271 |
+
demo.queue().launch(show_error=True)
|