INNER CODE UNIT · Python

center_row_from_top

Shilin-LU/TF-ICON · scripts/app.py:172

    center_row_from_top = round(center_y / 512, 2)
    center_col_from_left = round(center_x / 512, 2)

    aspect_ratio = new_h / new_w
    
    if aspect_ratio > 1:  
        mask_scale = new_w * aspect_ratio / 256  
        mask_scale = new_h / 256
    else:  
        mask_scale = new_w / 256
        mask_scale = new_h / (aspect_ratio * 256) 
            
    # mask_scale = round(mask_scale, 2)
    
    # =============================================================================================

    data = [batch_size * [prompt]]
    # read background image              

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…