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

add request_id in params and filename #285

Merged

Conversation

zhangrc
Copy link
Contributor

@zhangrc zhangrc commented Nov 6, 2023

#283
#224
麻烦看看改的对不对

@@ -31,7 +31,7 @@ def output(self, p: StableDiffusionProcessing, res: Processed, params: AnimateDi
frame_list = [image.copy() for image in res.images[i : i + params.video_length]]

seq = images.get_next_sequence_number(output_dir, "")
filename = f"{seq:05}-{res.all_seeds[(i-res.index_of_first_image)]}"
filename = f"{seq:05}-{res.all_seeds[(i-res.index_of_first_image)]}-{params.request_id}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not add request_id if request_id is ''

@@ -39,6 +39,7 @@ def __init__(
interp_x=10,
video_source=None,
video_path='',
request_id = '1',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put request_id at the bottom of the argument list. The default value should be ''

@@ -59,6 +60,7 @@ def __init__(
self.interp_x = interp_x
self.video_source = video_source
self.video_path = video_path
self.request_id = request_id

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put request_id at the bottom of the initialization

@@ -88,6 +90,7 @@ def get_dict(self, is_img2img: bool):
"overlap": self.overlap,
"interp": self.interp,
"interp_x": self.interp_x,
"request_id":self.request_id,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not add request_id if request_id is ''

value=self.params.request_id,
label="request_id",
elem_id=f"{elemid_prefix}request_id"
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People who play with WebUI do not need this element

@zhangrc
Copy link
Contributor Author

zhangrc commented Nov 8, 2023

thanks for your guidance , I fix it ,please review

@continue-revolution continue-revolution merged commit 31f67ba into continue-revolution:i2i-batch Nov 8, 2023
continue-revolution added a commit that referenced this pull request Nov 8, 2023
* add request_id in params and filename  (#285)

* animatediff_output.py filname add request_id

* Update animatediff_ui.py AnimateDiffProcess add request_id param

* allow request_id empty ,and remove from webui

* move request_id at  last  in init method

* remove request_id from webui

---------

Co-authored-by: zhangruicheng <zhangruicheng@migu.cn>

* fix device

* request id

* add test

* fix test

* fix test

* fix test

* cheaper test

* cheaper test

* readme

* run one test at one time

* readme

* use ubuntu 20.04

---------

Co-authored-by: zhangrc <zrc_java@163.com>
Co-authored-by: zhangruicheng <zhangruicheng@migu.cn>
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 this pull request may close these issues.

2 participants