Spaces:
Runtime error
Runtime error
envs
Browse files- app.py +2 -6
- pipelines/pipeline_imagecoductor.py +1 -1
app.py
CHANGED
|
@@ -281,7 +281,7 @@ class ImageConductor:
|
|
| 281 |
|
| 282 |
self.blur_kernel = blur_kernel
|
| 283 |
|
| 284 |
-
@spaces.GPU(enable_queue=True, duration=
|
| 285 |
@torch.no_grad()
|
| 286 |
def run(self, first_frame_path, tracking_points, prompt, drag_mode, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, personalized, examples_type):
|
| 287 |
if examples_type != "":
|
|
@@ -304,10 +304,6 @@ class ImageConductor:
|
|
| 304 |
id = base.split('_')[-1]
|
| 305 |
|
| 306 |
|
| 307 |
-
with open(f'{output_dir}/points-{id}.json', 'w') as f:
|
| 308 |
-
json.dump(input_all_points, f)
|
| 309 |
-
|
| 310 |
-
|
| 311 |
visualized_drag, _ = visualize_drag(first_frame_path, resized_all_points, drag_mode, self.width, self.height, self.model_length)
|
| 312 |
|
| 313 |
## image condition
|
|
@@ -408,7 +404,7 @@ def add_tracking_points(tracking_points, first_frame_path, drag_mode, evt: gr.Se
|
|
| 408 |
elif drag_mode=='camera':
|
| 409 |
color = (0, 0, 255, 255)
|
| 410 |
|
| 411 |
-
|
| 412 |
print(f"You selected {evt.value} at {evt.index} from {evt.target}")
|
| 413 |
tracking_points.constructor_args['value'][-1].append(evt.index)
|
| 414 |
print(tracking_points.constructor_args)
|
|
|
|
| 281 |
|
| 282 |
self.blur_kernel = blur_kernel
|
| 283 |
|
| 284 |
+
@spaces.GPU(enable_queue=True, duration=400)
|
| 285 |
@torch.no_grad()
|
| 286 |
def run(self, first_frame_path, tracking_points, prompt, drag_mode, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, personalized, examples_type):
|
| 287 |
if examples_type != "":
|
|
|
|
| 304 |
id = base.split('_')[-1]
|
| 305 |
|
| 306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
visualized_drag, _ = visualize_drag(first_frame_path, resized_all_points, drag_mode, self.width, self.height, self.model_length)
|
| 308 |
|
| 309 |
## image condition
|
|
|
|
| 404 |
elif drag_mode=='camera':
|
| 405 |
color = (0, 0, 255, 255)
|
| 406 |
|
| 407 |
+
import ipdb; ipdb.set_trace()
|
| 408 |
print(f"You selected {evt.value} at {evt.index} from {evt.target}")
|
| 409 |
tracking_points.constructor_args['value'][-1].append(evt.index)
|
| 410 |
print(tracking_points.constructor_args)
|
pipelines/pipeline_imagecoductor.py
CHANGED
|
@@ -318,7 +318,7 @@ class ImageConductorPipeline(DiffusionPipeline):
|
|
| 318 |
latents = latents * self.scheduler.init_noise_sigma
|
| 319 |
return latents
|
| 320 |
|
| 321 |
-
@spaces.GPU(enable_queue=True, duration=
|
| 322 |
@torch.no_grad()
|
| 323 |
def __call__(
|
| 324 |
self,
|
|
|
|
| 318 |
latents = latents * self.scheduler.init_noise_sigma
|
| 319 |
return latents
|
| 320 |
|
| 321 |
+
@spaces.GPU(enable_queue=True, duration=400)
|
| 322 |
@torch.no_grad()
|
| 323 |
def __call__(
|
| 324 |
self,
|