Closed DavidZah closed 1 year ago
Hello, I need to ask in what format is the locations in gligen_inference.py? The images are generating completely out of bbox so I'm wondering what it could be? Here is the code snipset THX in advance :) `def gen_location(): min_size = 0.075
x1 = round(random.uniform(0, 1 - min_size), 8) x2 = round(random.uniform(x1 + min_size, 1), 8) y1 = round(random.uniform(0, 1 - min_size), 8) y2 = round(random.uniform(y1 + min_size, 1), 8) return [x1, y1, x2, y2]
if name == "main":
parser = argparse.ArgumentParser() parser.add_argument("--folder", type=str, default="generation_samples_2", help="root folder for > parser.add_argument("--batch_size", type=int, default=1, help="") parser.add_argument("--no_plms", action='store_true', help="use DDIM instead. WARNING: I did not > parser.add_argument("--guidance_scale", type=float, default=7.5, help="") parser.add_argument("--negative_prompt", type=str, default='longbody, lowres, bad anatomy, bad h> #parser.add_argument("--negative_prompt", type=str, default=None, help="") args = parser.parse_args() phrases = load_phrases('DATA/phrases.txt') dict_list = [] dict_list = [] for phrase in phrases: random_locations = gen_location() # Generate random locations x = dict( ckpt="/home/paperspace/GLIGEN/gligen_checkpoints/diffusion_pytorch_model.bin", prompt=phrase, locations= random_locations, phrases = ["strawberry"], alpha_type=[0.3, 0.0, 0.7], save_folder_name="generation_box_text_v3" ) dict_list.append(x)
`
Ok error is in locations= random_locations, fix locations= [random_locations]
locations= random_locations,
locations= [random_locations]
Hello, I need to ask in what format is the locations in gligen_inference.py? The images are generating completely out of bbox so I'm wondering what it could be? Here is the code snipset THX in advance :) `def gen_location(): min_size = 0.075
if name == "main":
`