Skip to content

Commit b6902a1

Browse files
authored
Merge pull request AUTOMATIC1111#4 from mattyamonaca/develop
Develop
2 parents fb699e0 + a46ec6a commit b6902a1

6 files changed

+103
-12
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Bug Report
2+
description: Create a report
3+
title: "[Bug]: "
4+
labels: ["bug-report"]
5+
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Is there an existing issue for this?
10+
description: Please search to see if an issue already exists for the bug you encountered, and that it hasn't been fixed in a recent build/commit.
11+
options:
12+
- label: I have searched the existing issues and checked the recent builds/commits of both this extension and the webui
13+
required: true
14+
- type: markdown
15+
attributes:
16+
value: |
17+
*Please fill this form with as much information as possible, don't forget to fill "What OS..." and "What browsers" and *provide screenshots if possible**
18+
- type: textarea
19+
id: what-did
20+
attributes:
21+
label: What happened?
22+
description: Tell us what happened in a very clear and simple way
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: steps
27+
attributes:
28+
label: Steps to reproduce the problem
29+
description: Please provide us with precise step by step information on how to reproduce the bug
30+
value: |
31+
1. Go to ....
32+
2. Press ....
33+
3. ...
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: what-should
38+
attributes:
39+
label: What should have happened?
40+
description: Tell what you think the normal behavior should be
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: commits
45+
attributes:
46+
label: Commit where the problem happens
47+
description: Which commit of the extension are you running on? Please include the commit of both the extension and the webui (Do not write *Latest version/repo/commit*, as this means nothing and will have changed by the time we read your issue. Rather, copy the **Commit** link at the bottom of the UI, or from the cmd/terminal if you can't launch it.)
48+
value: |
49+
webui:\t\t
50+
controlnet:\t
51+
validations:
52+
required: true
53+
- type: dropdown
54+
id: browsers
55+
attributes:
56+
label: What browsers do you use to access the UI ?
57+
multiple: true
58+
options:
59+
- Mozilla Firefox
60+
- Google Chrome
61+
- Brave
62+
- Apple Safari
63+
- Microsoft Edge
64+
- type: textarea
65+
id: cmdargs
66+
attributes:
67+
label: Command Line Arguments
68+
description: Are you using any launching parameters/command line arguments (modified webui-user .bat/.sh) ? If yes, please write them below. Write "No" otherwise.
69+
render: Shell
70+
validations:
71+
required: true
72+
- type: textarea
73+
id: logs
74+
attributes:
75+
label: Console logs
76+
description: Please provide **full** cmd/terminal logs from the moment you started UI to the end of it, after your bug happened. If it's very long, provide a link to pastebin or similar service.
77+
render: Shell
78+
validations:
79+
required: true
80+
- type: textarea
81+
id: misc
82+
attributes:
83+
label: Additional information
84+
description: Please provide us with any relevant additional info or context.

.github/ISSUE_TEMPLATE/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true

models/control_sd15_depth.pthZone.Identifier

-4
This file was deleted.

models/control_sd15_openpose.pthZone.Identifier

-4
This file was deleted.

scripts/controlnet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -757,4 +757,4 @@ def on_after_component_callback(self, component, **_kwargs):
757757

758758
img2img_tab_tracker = Img2ImgTabTracker()
759759
script_callbacks.on_ui_settings(on_ui_settings)
760-
script_callbacks.on_after_component(img2img_tab_tracker.on_after_component_callback)
760+
script_callbacks.on_after_component(img2img_tab_tracker.on_after_component_callback)

scripts/movie2movie.py

+17-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def remove_background(proc):
103103
img = Image.fromarray(nimg).convert("RGB")
104104
return img
105105

106-
def save_gif(path, image_list, name):
106+
def save_gif(path, image_list, name, duration):
107107
tmp_dir = path + "/tmp/"
108108
if os.path.isdir(tmp_dir):
109109
shutil.rmtree(tmp_dir)
@@ -117,7 +117,7 @@ def save_gif(path, image_list, name):
117117
img = Image.open(path_list[i])
118118
imgs.append(img)
119119

120-
imgs[0].save(path + f"/{name}.gif", save_all=True, append_images=imgs[1:], optimize=False, duration=50, loop=0)
120+
imgs[0].save(path + f"/{name}.gif", save_all=True, append_images=imgs[1:], optimize=False, duration=duration, loop=0)
121121

122122

123123

@@ -138,6 +138,10 @@ def show(self, is_img2img):
138138
# Most UI components can return a value, such as a boolean for a checkbox.
139139
# The returned values are passed to the run method as parameters.
140140
def ui(self, is_img2img):
141+
def build_sliders(duration):
142+
return [
143+
gr.update(label="Annotator resolution", value=512, minimum=64, maximum=2048, step=1, interactive=True),
144+
]
141145
ctrls_group = ()
142146
max_models = opts.data.get("control_net_max_models_num", 1)
143147

@@ -148,6 +152,11 @@ def ui(self, is_img2img):
148152
with gr.Tab(f"ControlNet-{i}", open=False):
149153
ctrls_group += (gr.Video(format='mp4', source='upload', elem_id = f"video_{i}"), )
150154

155+
duration = gr.Slider(label=f"Duration", value=50.0, minimum=10.0, maximum=200.0, step=10, interactive=True)
156+
ctrls_group += (duration,)
157+
158+
print(ctrls_group)
159+
151160
return ctrls_group
152161

153162

@@ -158,8 +167,13 @@ def ui(self, is_img2img):
158167
# to be used in processing. The return value should be a Processed object, which is
159168
# what is returned by the process_images method.
160169
def run(self, p, *args):
170+
print(args)
161171
video_num = opts.data.get("control_net_max_models_num", 1)
162172
video_list = [get_all_frames(video) for video in args[:video_num]]
173+
duration, = args[video_num:]
174+
print(duration)
175+
print("end")
176+
163177
frame_num = get_min_frame_num(video_list)
164178
if frame_num > 0:
165179
output_image_list = []
@@ -175,7 +189,7 @@ def run(self, p, *args):
175189
img = proc.images[0]
176190
output_image_list.append(img)
177191
copy_p.close()
178-
save_gif(p.outpath_samples, output_image_list, "animation")
192+
save_gif(p.outpath_samples, output_image_list, "animation", duration)
179193
proc.images = [p.outpath_samples + "/animation.gif"]
180194

181195
else:

0 commit comments

Comments
 (0)