Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -98,7 +98,7 @@ def generate_image(prompt, control_image, control_mode, num_steps=50, guidance=4
|
|
98 |
x = get_noise(1, height, width, device=torch_device, dtype=torch.bfloat16, seed=seed)
|
99 |
inp_cond = prepare(t5=t5, clip=clip, img=x, prompt=prompt)
|
100 |
|
101 |
-
x = denoise_controlnet(model, **inp_cond, controlnet=controlnet, timesteps=timesteps, guidance=guidance, controlnet_cond=controlnet_cond, control_mode=control_mode)
|
102 |
|
103 |
x = unpack(x.float(), height, width)
|
104 |
x = ae.decode(x)
|
@@ -138,4 +138,4 @@ interface = gr.Interface(
|
|
138 |
)
|
139 |
|
140 |
if __name__ == "__main__":
|
141 |
-
interface.launch()
|
|
|
98 |
x = get_noise(1, height, width, device=torch_device, dtype=torch.bfloat16, seed=seed)
|
99 |
inp_cond = prepare(t5=t5, clip=clip, img=x, prompt=prompt)
|
100 |
|
101 |
+
x = denoise_controlnet(model, **inp_cond, controlnet=controlnet, timesteps=timesteps, guidance=guidance, controlnet_cond=controlnet_cond, control_mode=control_modes.index(control_mode))
|
102 |
|
103 |
x = unpack(x.float(), height, width)
|
104 |
x = ae.decode(x)
|
|
|
138 |
)
|
139 |
|
140 |
if __name__ == "__main__":
|
141 |
+
interface.launch(share=True)
|