You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the branch "feature/controlnet-adaption" that allows the use of controlnet in stream diffusion.
I followed the basecode in example/txt2img/multi.py and I got an error, I did try different controlnet but got the same error : RuntimeError: Tensors must have same number of dimensions: got 5 and 4
Here is the code so far :
from PIL import Image
o_image = Image.open("input.png").convert("RGB").resize((512, 512))
from streamdiffusion import StreamDiffusion
from streamdiffusion.image_utils import postprocess_image
from otherBranch.StreamDiffusion.utils.wrapper import StreamDiffusionWrapper
model_id_or_path = "digiplay/AnalogMadness-realistic-model-v7"
stream = StreamDiffusionWrapper(
model_id_or_path,
t_index_list=[0, 8, 16, 24, 32, 40, 45, 49],
lora_dict=None,
seed=42,
mode="txt2img",
cfg_type="none",
controlnet_dicts=[{"lllyasviel/control_v11p_sd15_canny": 1.0}],
HyperSD_lora_id="./Hyper-SD15-1step-lora.safetensors", # Local HyperSD
width=512,
height=512,
frame_buffer_size=1,
acceleration="xformers",
)
prompt = "Clown in space, black and white"
# Prepare the stream
stream.prepare(prompt)
# Warmup >= len(t_index_list) x frame_buffer_size
for _ in range(4):
stream(controlnet_images=[o_image])
# Run the stream infinitely
while True:
x_output = stream(controlnet_images=[o_image])
postprocess_image(x_output, output_type="pil")[0].show()
input_response = input("Press Enter to continue or type 'stop' to exit: ")
if input_response == "stop":
break
Is there something I did not get ?
Thanks in advance
The text was updated successfully, but these errors were encountered:
I used the branch "feature/controlnet-adaption" that allows the use of controlnet in stream diffusion.
I followed the basecode in
example/txt2img/multi.py
and I got an error, I did try different controlnet but got the same error :RuntimeError: Tensors must have same number of dimensions: got 5 and 4
Here is the code so far :
Is there something I did not get ?
Thanks in advance
The text was updated successfully, but these errors were encountered: