Skip to content

Commit 99de56a

Browse files
committed
Fixes
1 parent 37feded commit 99de56a

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

apps/shark_studio/api/sd.py

+27
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ def produce_img_latents(
299299
text_embeddings_numpy = text_embeddings.detach().numpy()
300300
guidance_scale = torch.Tensor([guidance_scale]).to(self.dtype)
301301
self.load_submodels(["unet"])
302+
control_scale = torch.tensor(1.0, dtype=self.dtype)
302303
for i, t in tqdm(enumerate(total_timesteps)):
303304
step_start_time = time.time()
304305
timestep = torch.tensor([t]).to(self.dtype).detach().numpy()
@@ -337,6 +338,32 @@ def produce_img_latents(
337338
timestep,
338339
text_embeddings_numpy,
339340
guidance_scale,
341+
controlnet_latents[0],
342+
controlnet_latents[1],
343+
controlnet_latents[2],
344+
controlnet_latents[3],
345+
controlnet_latents[4],
346+
controlnet_latents[5],
347+
controlnet_latents[6],
348+
controlnet_latents[7],
349+
controlnet_latents[8],
350+
controlnet_latents[9],
351+
controlnet_latents[10],
352+
controlnet_latents[11],
353+
controlnet_latents[12],
354+
control_scale,
355+
control_scale,
356+
control_scale,
357+
control_scale,
358+
control_scale,
359+
control_scale,
360+
control_scale,
361+
control_scale,
362+
control_scale,
363+
control_scale,
364+
control_scale,
365+
control_scale,
366+
control_scale,
340367
],
341368
)
342369
# end_profiling(profile_device)

apps/shark_studio/web/ui/sd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def base_model_changed(base_model_id):
469469
)
470470
with gr.Accordion(
471471
label="Controlnet Options",
472-
open=False,
472+
open=True,
473473
visible=True,
474474
):
475475
preprocessed_hints = gr.State([])

0 commit comments

Comments
 (0)