Skip to content

Commit

Permalink
fix: outdir_path_grids_old
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers committed Jun 4, 2024
1 parent fcaf117 commit fcab048
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions agent_scheduler/shared_opts_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ def set_shared_opts_core(self, key: str, value):
"""
if not self.is_backup_exists(key):
old = getattr(self.shared_opts, key, None)
log.info(f"[AgentScheduler] {key} is backup: {old}")
self.backup[key] = old
print(f"[AgentScheduler] {key} is backup: {old}")
self.shared_opts.set(key, value)
log.info(f"[AgentScheduler] {key} is changed: {value}")
print(f"[AgentScheduler] {key} is changed: {value}")

def set_shared_opts(self, **kwargs):
"""
Expand All @@ -79,3 +79,4 @@ def restore_shared_opts(self):
"""
for attr, value in self.backup.items():
self.shared_opts.set(attr, value)
print(f"[AgentScheduler] {attr} is restore: {value}")
2 changes: 1 addition & 1 deletion agent_scheduler/task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def change_output_dir():
key_grids = "outdir_txt2img_grids"

outdir_path_samples_old = Path(shared_opts_backup.get_backup_value(key_samples))
outdir_path_grids_old = Path(shared_opts_backup.get_backup_value(key_samples))
outdir_path_grids_old = Path(shared_opts_backup.get_backup_value(key_grids))

outdir_path_root = outdir_path_samples_old.joinpath('..', 'agent-scheduler')

Expand Down

0 comments on commit fcab048

Please sign in to comment.