Skip to content

Commit

Permalink
remove redundant codes
Browse files Browse the repository at this point in the history
  • Loading branch information
yisol committed Apr 8, 2024
1 parent e66775c commit c14d62e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ sh inference.sh
## Acknowledgements

For the demo, GPUs are supported from [zerogpu](https://huggingface.co/zero-gpu-explorers), and auto masking generation codes are based on [OOTDiffusion](https://github.com/levihsu/OOTDiffusion).
Parts of the code were based on [IP-Adapter](https://github.com/tencent-ailab/IP-Adapter).
Parts of the code are based on [IP-Adapter](https://github.com/tencent-ailab/IP-Adapter).



Expand Down
13 changes: 1 addition & 12 deletions inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ def parse_args():
parser.add_argument("--mixed_precision",type=str,default=None,choices=["no", "fp16", "bf16"],)
parser.add_argument("--enable_xformers_memory_efficient_attention", action="store_true", help="Whether or not to use xformers.")
args = parser.parse_args()
env_local_rank = int(os.environ.get("LOCAL_RANK", -1))
if env_local_rank != -1 and env_local_rank != args.local_rank:
args.local_rank = env_local_rank


return args

Expand Down Expand Up @@ -121,15 +119,6 @@ def __init__(
annotation_str += " "
self.annotation_pair[elem["file_name"]] = annotation_str

# ##backup
# with open(os.path.join(dataroot_path, "vitonhd.json"), "r") as file2:
# data2 = json.load(file2)

# for k, v in data2.items():
# keyname = k + "_00.jpg"
# if keyname not in list(self.annotation_pair.keys()):
# self.annotation_pair[keyname] = v[0]

self.order = order
self.toTensor = transforms.ToTensor()

Expand Down

0 comments on commit c14d62e

Please sign in to comment.