Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Uploading ControlNet Images via API #229

Closed
dyn-do opened this issue Oct 17, 2023 · 6 comments · Fixed by #469
Closed

[Feature]: Uploading ControlNet Images via API #229

dyn-do opened this issue Oct 17, 2023 · 6 comments · Fixed by #469

Comments

@dyn-do
Copy link

dyn-do commented Oct 17, 2023

Expected behavior

I am currently creating animations using the Web UI API in the following manner without animateDiff:
・Upload raw images of each frame's ControlNet, such as open_pose, segment, depth, etc., and generate images with img2img.
・Repeat the above step for the number of animation frames.

Is it possible to achieve this using the animateDiff API? Upon checking animatediff_ui.py, I only see options to upload data via video_source or video_path.

@continue-revolution
Copy link
Owner

continue-revolution commented Oct 17, 2023

Yes. You do not need to upload anything to AnimateDiff API. You can stick to your original workflow. You can also choose to upload a path to video via video_source or a path to dir with a series of frames via video_path - this will be broadcasted to all ControlNet units that you do not provide a path to frames via ControlNet API.

However, this feature is currently only available in txt2img. I’m planning to implement i2i batch in a week, via #224 , after finishing some personal real-life responsibilities.

@continue-revolution
Copy link
Owner

For txt2img, if you want to specify different control images for different ControlNet units, upload path to dir with a series of frames via Batch tab on ControlNet UI. I don’t know the corresponding API item in ControlNet.

@dyn-do
Copy link
Author

dyn-do commented Oct 17, 2023

Thank you for your response.
It seems that the API for the expansion of ControlNet doesn't support multiple frames, so it looks tough. 💦

@continue-revolution
Copy link
Owner

Where do you upload your frames via api?

@dyn-do
Copy link
Author

dyn-do commented Oct 19, 2023

Thank you for your response. I am posting images to the Web UI's img2img API with the ControlNet argument using the method below:
https://github.com/Mikubill/sd-webui-controlnet/wiki/API#integrating-sdapiv12img

@continue-revolution
Copy link
Owner

this is finally implemented by someone else and improved by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants