falx 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- falx-0.7.0/.python-version +1 -0
- falx-0.7.0/LICENSE +21 -0
- falx-0.7.0/PKG-INFO +45 -0
- falx-0.7.0/README.md +27 -0
- falx-0.7.0/SPEC.md +272 -0
- falx-0.7.0/pyproject.toml +53 -0
- falx-0.7.0/src/falx/__init__.py +8 -0
- falx-0.7.0/src/falx/cli/__init__.py +1707 -0
- falx-0.7.0/src/falx/core/__init__.py +221 -0
- falx-0.7.0/src/falx/io/__init__.py +463 -0
- falx-0.7.0/src/falx/matrix/__init__.py +287 -0
- falx-0.7.0/src/falx/models/__init__.py +908 -0
- falx-0.7.0/src/falx/models/bria_increase_resolution.py +37 -0
- falx-0.7.0/src/falx/models/bria_video_background_removal_green_screen_despill.py +50 -0
- falx-0.7.0/src/falx/models/flux_3_common.py +59 -0
- falx-0.7.0/src/falx/models/flux_3_edit_video.py +34 -0
- falx-0.7.0/src/falx/models/flux_3_extend_video.py +26 -0
- falx-0.7.0/src/falx/models/flux_3_first_last_frame_to_video.py +26 -0
- falx-0.7.0/src/falx/models/flux_3_image_to_video.py +19 -0
- falx-0.7.0/src/falx/models/flux_3_keyframes_to_video.py +42 -0
- falx-0.7.0/src/falx/models/flux_3_text_to_video.py +15 -0
- falx-0.7.0/src/falx/models/flux_video_upscale.py +39 -0
- falx-0.7.0/src/falx/models/gemini_omni_flash_v1_1_common.py +4 -0
- falx-0.7.0/src/falx/models/gemini_omni_flash_v1_1_edit.py +22 -0
- falx-0.7.0/src/falx/models/gemini_omni_flash_v1_1_image_to_video.py +45 -0
- falx-0.7.0/src/falx/models/gemini_omni_flash_v1_1_reference_to_video.py +49 -0
- falx-0.7.0/src/falx/models/gemini_omni_flash_v1_1_text_to_video.py +34 -0
- falx-0.7.0/src/falx/models/gpt_image_2.py +82 -0
- falx-0.7.0/src/falx/models/gpt_image_2_5.py +73 -0
- falx-0.7.0/src/falx/models/gpt_image_2_5_edit.py +40 -0
- falx-0.7.0/src/falx/models/gpt_image_2_edit.py +29 -0
- falx-0.7.0/src/falx/models/grok_imagine_image_v2_0.py +69 -0
- falx-0.7.0/src/falx/models/grok_imagine_image_v2_0_edit.py +32 -0
- falx-0.7.0/src/falx/models/grok_imagine_video_v1_5_image_to_video.py +35 -0
- falx-0.7.0/src/falx/models/grok_imagine_video_v1_5_reference_to_video.py +49 -0
- falx-0.7.0/src/falx/models/grok_imagine_video_v1_5_text_to_video.py +35 -0
- falx-0.7.0/src/falx/models/happy_horse_image_to_video.py +45 -0
- falx-0.7.0/src/falx/models/happy_horse_reference_to_video.py +71 -0
- falx-0.7.0/src/falx/models/happy_horse_text_to_video.py +43 -0
- falx-0.7.0/src/falx/models/happy_horse_video_edit.py +67 -0
- falx-0.7.0/src/falx/models/ideogram_v4.py +86 -0
- falx-0.7.0/src/falx/models/kling_o3_4k_image_to_video.py +11 -0
- falx-0.7.0/src/falx/models/kling_o3_4k_reference_to_video.py +47 -0
- falx-0.7.0/src/falx/models/kling_o3_4k_text_to_video.py +11 -0
- falx-0.7.0/src/falx/models/kling_o3_4k_video_to_video_edit.py +22 -0
- falx-0.7.0/src/falx/models/kling_o3_4k_video_to_video_reference.py +26 -0
- falx-0.7.0/src/falx/models/kling_o3_common.py +172 -0
- falx-0.7.0/src/falx/models/kling_o3_pro_image_to_video.py +63 -0
- falx-0.7.0/src/falx/models/kling_o3_pro_reference_to_video.py +104 -0
- falx-0.7.0/src/falx/models/kling_o3_pro_text_to_video.py +57 -0
- falx-0.7.0/src/falx/models/kling_o3_pro_video_to_video_edit.py +65 -0
- falx-0.7.0/src/falx/models/kling_v3_4k_image_to_video.py +11 -0
- falx-0.7.0/src/falx/models/kling_v3_4k_text_to_video.py +11 -0
- falx-0.7.0/src/falx/models/kling_v3_common.py +141 -0
- falx-0.7.0/src/falx/models/kling_v3_motion_control.py +84 -0
- falx-0.7.0/src/falx/models/kling_v3_pro_image_to_video.py +87 -0
- falx-0.7.0/src/falx/models/kling_v3_pro_text_to_video.py +77 -0
- falx-0.7.0/src/falx/models/luma_ray_3_2_common.py +196 -0
- falx-0.7.0/src/falx/models/luma_ray_3_2_image_to_video.py +123 -0
- falx-0.7.0/src/falx/models/luma_ray_3_2_reframe.py +46 -0
- falx-0.7.0/src/falx/models/luma_ray_3_2_text_to_video.py +76 -0
- falx-0.7.0/src/falx/models/luma_ray_3_2_video_to_video.py +112 -0
- falx-0.7.0/src/falx/models/meshy_v7_text_to_3d.py +156 -0
- falx-0.7.0/src/falx/models/minimax_h3_max_camera_controls.py +101 -0
- falx-0.7.0/src/falx/models/minimax_h3_max_image_to_video.py +68 -0
- falx-0.7.0/src/falx/models/minimax_h3_max_reference_to_video.py +114 -0
- falx-0.7.0/src/falx/models/minimax_h3_max_text_to_video.py +57 -0
- falx-0.7.0/src/falx/models/minimax_h3_max_turbo_image_to_video.py +70 -0
- falx-0.7.0/src/falx/models/minimax_h3_max_turbo_text_to_video.py +57 -0
- falx-0.7.0/src/falx/models/minimax_music_3.py +61 -0
- falx-0.7.0/src/falx/models/muse_image.py +57 -0
- falx-0.7.0/src/falx/models/muse_image_edit.py +26 -0
- falx-0.7.0/src/falx/models/nano_banana_2.py +107 -0
- falx-0.7.0/src/falx/models/nano_banana_2_1.py +114 -0
- falx-0.7.0/src/falx/models/nano_banana_2_1_edit.py +51 -0
- falx-0.7.0/src/falx/models/nano_banana_2_edit.py +58 -0
- falx-0.7.0/src/falx/models/qwen_audio_3_tts.py +92 -0
- falx-0.7.0/src/falx/models/qwen_image_3_common.py +94 -0
- falx-0.7.0/src/falx/models/qwen_image_3_edit.py +41 -0
- falx-0.7.0/src/falx/models/qwen_image_3_text_to_image.py +9 -0
- falx-0.7.0/src/falx/models/sam_3_1_common.py +81 -0
- falx-0.7.0/src/falx/models/sam_3_1_image.py +67 -0
- falx-0.7.0/src/falx/models/sam_3_1_image_rle.py +67 -0
- falx-0.7.0/src/falx/models/sam_3_1_video.py +59 -0
- falx-0.7.0/src/falx/models/sam_3_1_video_rle.py +70 -0
- falx-0.7.0/src/falx/models/seedance25_image_to_video.py +96 -0
- falx-0.7.0/src/falx/models/seedance25_reference_to_video.py +131 -0
- falx-0.7.0/src/falx/models/seedance25_text_to_video.py +85 -0
- falx-0.7.0/src/falx/models/seedance2_fast_image_to_video.py +75 -0
- falx-0.7.0/src/falx/models/seedance2_fast_reference_to_video.py +98 -0
- falx-0.7.0/src/falx/models/seedance2_fast_text_to_video.py +59 -0
- falx-0.7.0/src/falx/models/seedance2_image_to_video.py +75 -0
- falx-0.7.0/src/falx/models/seedance2_mini_image_to_video.py +68 -0
- falx-0.7.0/src/falx/models/seedance2_mini_reference_to_video.py +91 -0
- falx-0.7.0/src/falx/models/seedance2_mini_text_to_video.py +52 -0
- falx-0.7.0/src/falx/models/seedance2_reference_to_video.py +98 -0
- falx-0.7.0/src/falx/models/seedance2_text_to_video.py +59 -0
- falx-0.7.0/src/falx/models/seedream_v45_edit.py +28 -0
- falx-0.7.0/src/falx/models/seedream_v45_text_to_image.py +82 -0
- falx-0.7.0/src/falx/models/seedream_v5_lite_edit.py +25 -0
- falx-0.7.0/src/falx/models/seedream_v5_lite_text_to_image.py +91 -0
- falx-0.7.0/src/falx/models/seedream_v5_pro_common.py +73 -0
- falx-0.7.0/src/falx/models/seedream_v5_pro_edit.py +22 -0
- falx-0.7.0/src/falx/models/seedream_v5_pro_layerize.py +56 -0
- falx-0.7.0/src/falx/models/seedream_v5_pro_text_to_image.py +15 -0
- falx-0.7.0/src/falx/models/sonilo_v1_1_video_to_sound_effects.py +67 -0
- falx-0.7.0/src/falx/models/topaz_deblur_video.py +21 -0
- falx-0.7.0/src/falx/models/topaz_interpolate_video.py +44 -0
- falx-0.7.0/src/falx/models/topaz_upscale_image_creative.py +55 -0
- falx-0.7.0/src/falx/models/topaz_upscale_image_generative.py +135 -0
- falx-0.7.0/src/falx/models/topaz_upscale_image_precision.py +93 -0
- falx-0.7.0/src/falx/models/topaz_upscale_image_transparent.py +20 -0
- falx-0.7.0/src/falx/models/veo3_1_common.py +26 -0
- falx-0.7.0/src/falx/models/veo3_1_first_last_frame_to_video.py +70 -0
- falx-0.7.0/src/falx/models/veo3_1_image_to_video.py +69 -0
- falx-0.7.0/src/falx/models/veo3_1_reference_to_video.py +54 -0
- falx-0.7.0/src/falx/models/veo3_1_text_to_video.py +62 -0
- falx-0.7.0/src/falx/models/vggt_1b.py +114 -0
- falx-0.7.0/src/falx/models/vidu_q3_common.py +17 -0
- falx-0.7.0/src/falx/models/vidu_q3_image_to_video.py +64 -0
- falx-0.7.0/src/falx/models/vidu_q3_reference_to_video.py +58 -0
- falx-0.7.0/src/falx/models/vidu_q3_reference_to_video_mix.py +9 -0
- falx-0.7.0/src/falx/models/vidu_q3_text_to_video.py +49 -0
- falx-0.7.0/src/falx/models/wan_3_0_prime_image_to_video.py +70 -0
- falx-0.7.0/src/falx/models/wan_3_0_prime_reference_to_video.py +94 -0
- falx-0.7.0/src/falx/models/wan_3_0_prime_text_to_video.py +63 -0
- falx-0.7.0/tests/__init__.py +0 -0
- falx-0.7.0/tests/cli/test_app.py +462 -0
- falx-0.7.0/tests/cli/test_matrix_submit.py +461 -0
- falx-0.7.0/tests/cli/test_matrix_validate.py +242 -0
- falx-0.7.0/tests/cli/test_run_thumbnails.py +246 -0
- falx-0.7.0/tests/cli/test_schema.py +372 -0
- falx-0.7.0/tests/cli/test_upload_command.py +58 -0
- falx-0.7.0/tests/cli/test_validate_upload_paths.py +142 -0
- falx-0.7.0/tests/conftest.py +219 -0
- falx-0.7.0/tests/core/test_core_api.py +244 -0
- falx-0.7.0/tests/e2e/__init__.py +0 -0
- falx-0.7.0/tests/e2e/conftest.py +11 -0
- falx-0.7.0/tests/e2e/fixtures/smoke_input.png +0 -0
- falx-0.7.0/tests/e2e/test_run_iter1_fake_e2e.py +85 -0
- falx-0.7.0/tests/e2e/test_run_iter_n_fake_e2e.py +90 -0
- falx-0.7.0/tests/e2e/test_run_iter_n_submit_partial_fail_e2e.py +99 -0
- falx-0.7.0/tests/e2e/test_smoke.py +87 -0
- falx-0.7.0/tests/fixtures/minimal.yaml +6 -0
- falx-0.7.0/tests/fixtures/sample_asset.png +0 -0
- falx-0.7.0/tests/fixtures/submitted.yaml +6 -0
- falx-0.7.0/tests/fixtures/with_asset.yaml +5 -0
- falx-0.7.0/tests/io/test_results.py +333 -0
- falx-0.7.0/tests/io/test_uploads.py +240 -0
- falx-0.7.0/tests/io/test_validate_job_config.py +46 -0
- falx-0.7.0/tests/io/test_yaml_io.py +117 -0
- falx-0.7.0/tests/matrix/__init__.py +0 -0
- falx-0.7.0/tests/matrix/test_matrix_module.py +630 -0
- falx-0.7.0/tests/models/__init__.py +1 -0
- falx-0.7.0/tests/models/test_3d_registry.py +95 -0
- falx-0.7.0/tests/models/test_audio_registry.py +83 -0
- falx-0.7.0/tests/models/test_base.py +20 -0
- falx-0.7.0/tests/models/test_bria_increase_resolution.py +99 -0
- falx-0.7.0/tests/models/test_bria_video_background_removal_green_screen_despill.py +116 -0
- falx-0.7.0/tests/models/test_flux_3.py +343 -0
- falx-0.7.0/tests/models/test_flux_3_edit_video.py +113 -0
- falx-0.7.0/tests/models/test_flux_video_upscale.py +88 -0
- falx-0.7.0/tests/models/test_gemini_omni_flash_v1_1.py +336 -0
- falx-0.7.0/tests/models/test_gpt_image_2.py +165 -0
- falx-0.7.0/tests/models/test_gpt_image_2_5.py +178 -0
- falx-0.7.0/tests/models/test_gpt_image_2_5_edit.py +170 -0
- falx-0.7.0/tests/models/test_gpt_image_2_edit.py +211 -0
- falx-0.7.0/tests/models/test_grok_imagine_image_v2_0.py +142 -0
- falx-0.7.0/tests/models/test_grok_imagine_image_v2_0_edit.py +131 -0
- falx-0.7.0/tests/models/test_grok_imagine_video_v1_5_image_to_video.py +121 -0
- falx-0.7.0/tests/models/test_grok_imagine_video_v1_5_reference_to_video.py +153 -0
- falx-0.7.0/tests/models/test_grok_imagine_video_v1_5_text_to_video.py +100 -0
- falx-0.7.0/tests/models/test_happy_horse_image_to_video.py +132 -0
- falx-0.7.0/tests/models/test_happy_horse_reference_to_video.py +170 -0
- falx-0.7.0/tests/models/test_happy_horse_text_to_video.py +147 -0
- falx-0.7.0/tests/models/test_happy_horse_video_edit.py +173 -0
- falx-0.7.0/tests/models/test_ideogram_registry.py +52 -0
- falx-0.7.0/tests/models/test_ideogram_v4.py +218 -0
- falx-0.7.0/tests/models/test_kling_o3_4k_video_to_video_edit.py +133 -0
- falx-0.7.0/tests/models/test_kling_o3_4k_video_to_video_reference.py +141 -0
- falx-0.7.0/tests/models/test_kling_o3_image_to_video.py +104 -0
- falx-0.7.0/tests/models/test_kling_o3_reference_to_video.py +186 -0
- falx-0.7.0/tests/models/test_kling_o3_text_to_video.py +103 -0
- falx-0.7.0/tests/models/test_kling_o3_video_to_video_edit.py +122 -0
- falx-0.7.0/tests/models/test_kling_v3_4k_image_to_video.py +80 -0
- falx-0.7.0/tests/models/test_kling_v3_4k_text_to_video.py +74 -0
- falx-0.7.0/tests/models/test_kling_v3_motion_control.py +206 -0
- falx-0.7.0/tests/models/test_kling_v3_pro_image_to_video.py +216 -0
- falx-0.7.0/tests/models/test_kling_v3_pro_text_to_video.py +105 -0
- falx-0.7.0/tests/models/test_luma_ray_3_2.py +456 -0
- falx-0.7.0/tests/models/test_matrix_axes_schema.py +196 -0
- falx-0.7.0/tests/models/test_meshy_v7_text_to_3d.py +188 -0
- falx-0.7.0/tests/models/test_minimax_h3_max_camera_controls.py +250 -0
- falx-0.7.0/tests/models/test_minimax_h3_max_image_to_video.py +182 -0
- falx-0.7.0/tests/models/test_minimax_h3_max_reference_to_video.py +324 -0
- falx-0.7.0/tests/models/test_minimax_h3_max_text_to_video.py +202 -0
- falx-0.7.0/tests/models/test_minimax_h3_max_turbo_image_to_video.py +186 -0
- falx-0.7.0/tests/models/test_minimax_h3_max_turbo_text_to_video.py +206 -0
- falx-0.7.0/tests/models/test_minimax_music_3.py +193 -0
- falx-0.7.0/tests/models/test_muse_image.py +106 -0
- falx-0.7.0/tests/models/test_muse_image_edit.py +106 -0
- falx-0.7.0/tests/models/test_nano_banana_2.py +94 -0
- falx-0.7.0/tests/models/test_nano_banana_2_1.py +164 -0
- falx-0.7.0/tests/models/test_nano_banana_2_1_edit.py +63 -0
- falx-0.7.0/tests/models/test_nano_banana_2_1_registry.py +66 -0
- falx-0.7.0/tests/models/test_nano_banana_2_edit.py +83 -0
- falx-0.7.0/tests/models/test_qwen_audio_3_tts.py +154 -0
- falx-0.7.0/tests/models/test_qwen_image_3_edit.py +115 -0
- falx-0.7.0/tests/models/test_qwen_image_3_registry.py +91 -0
- falx-0.7.0/tests/models/test_qwen_image_3_text_to_image.py +206 -0
- falx-0.7.0/tests/models/test_registry.py +758 -0
- falx-0.7.0/tests/models/test_sam_3_1.py +260 -0
- falx-0.7.0/tests/models/test_seedance25_image_to_video.py +126 -0
- falx-0.7.0/tests/models/test_seedance25_reference_to_video.py +214 -0
- falx-0.7.0/tests/models/test_seedance25_text_to_video.py +102 -0
- falx-0.7.0/tests/models/test_seedance2_fast_image_to_video.py +193 -0
- falx-0.7.0/tests/models/test_seedance2_fast_reference_to_video.py +268 -0
- falx-0.7.0/tests/models/test_seedance2_fast_text_to_video.py +168 -0
- falx-0.7.0/tests/models/test_seedance2_image_to_video.py +184 -0
- falx-0.7.0/tests/models/test_seedance2_mini_image_to_video.py +174 -0
- falx-0.7.0/tests/models/test_seedance2_mini_reference_to_video.py +249 -0
- falx-0.7.0/tests/models/test_seedance2_mini_text_to_video.py +150 -0
- falx-0.7.0/tests/models/test_seedance2_reference_to_video.py +265 -0
- falx-0.7.0/tests/models/test_seedance2_text_to_video.py +160 -0
- falx-0.7.0/tests/models/test_seedream_v45_edit.py +210 -0
- falx-0.7.0/tests/models/test_seedream_v45_text_to_image.py +154 -0
- falx-0.7.0/tests/models/test_seedream_v5_lite_edit.py +192 -0
- falx-0.7.0/tests/models/test_seedream_v5_lite_text_to_image.py +167 -0
- falx-0.7.0/tests/models/test_seedream_v5_pro_edit.py +116 -0
- falx-0.7.0/tests/models/test_seedream_v5_pro_layerize.py +108 -0
- falx-0.7.0/tests/models/test_seedream_v5_pro_registry.py +101 -0
- falx-0.7.0/tests/models/test_seedream_v5_pro_text_to_image.py +148 -0
- falx-0.7.0/tests/models/test_sonilo_v1_1_video_to_sound_effects.py +181 -0
- falx-0.7.0/tests/models/test_topaz_deblur_video.py +84 -0
- falx-0.7.0/tests/models/test_topaz_interpolate_video.py +176 -0
- falx-0.7.0/tests/models/test_topaz_upscale_image_creative.py +76 -0
- falx-0.7.0/tests/models/test_topaz_upscale_image_generative.py +108 -0
- falx-0.7.0/tests/models/test_topaz_upscale_image_precision.py +97 -0
- falx-0.7.0/tests/models/test_topaz_upscale_image_transparent.py +46 -0
- falx-0.7.0/tests/models/test_validate_job_schema.py +176 -0
- falx-0.7.0/tests/models/test_validate_parameters.py +488 -0
- falx-0.7.0/tests/models/test_veo3_1_first_last_frame_to_video.py +105 -0
- falx-0.7.0/tests/models/test_veo3_1_image_to_video.py +110 -0
- falx-0.7.0/tests/models/test_veo3_1_reference_to_video.py +119 -0
- falx-0.7.0/tests/models/test_veo3_1_text_to_video.py +115 -0
- falx-0.7.0/tests/models/test_vggt_1b.py +131 -0
- falx-0.7.0/tests/models/test_vidu_q3_image_to_video.py +121 -0
- falx-0.7.0/tests/models/test_vidu_q3_reference_to_video.py +149 -0
- falx-0.7.0/tests/models/test_vidu_q3_reference_to_video_mix.py +149 -0
- falx-0.7.0/tests/models/test_vidu_q3_text_to_video.py +135 -0
- falx-0.7.0/tests/models/test_wan_3_0_prime_image_to_video.py +200 -0
- falx-0.7.0/tests/models/test_wan_3_0_prime_reference_to_video.py +210 -0
- falx-0.7.0/tests/models/test_wan_3_0_prime_registry.py +120 -0
- falx-0.7.0/tests/models/test_wan_3_0_prime_text_to_video.py +142 -0
- falx-0.7.0/tests/yaml_utils.py +25 -0
- falx-0.7.0/uv.lock +702 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
falx-0.7.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 minamikik
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
falx-0.7.0/PKG-INFO
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: falx
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: Python library and CLI wrapper for fal.ai queue APIs
|
|
5
|
+
Author-email: minamikik <minamikik@users.noreply.github.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Requires-Dist: fal-client>=0.7
|
|
10
|
+
Requires-Dist: httpx>=0.27
|
|
11
|
+
Requires-Dist: opencv-python-headless>=4.13.0.92
|
|
12
|
+
Requires-Dist: pydantic>=2.7
|
|
13
|
+
Requires-Dist: pykakasi>=2.3.0
|
|
14
|
+
Requires-Dist: python-dotenv>=1.0
|
|
15
|
+
Requires-Dist: ruamel-yaml>=0.18
|
|
16
|
+
Requires-Dist: typer>=0.12
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
falx
|
|
20
|
+
====
|
|
21
|
+
|
|
22
|
+
Small CLI/library wrapper for fal.ai queue jobs.
|
|
23
|
+
|
|
24
|
+
## CLI workflow
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Upload local assets first, then paste the returned CDN URLs into YAML.
|
|
28
|
+
falx upload path/to/image.png path/to/reference.mov
|
|
29
|
+
|
|
30
|
+
# Submit, poll, and download in one async pipeline with max_concurrency control.
|
|
31
|
+
falx run -c job.yaml
|
|
32
|
+
|
|
33
|
+
# Resume a previously interrupted request by id (e.g. after timeout).
|
|
34
|
+
falx fetch -c job.yaml --request-id <request_id>
|
|
35
|
+
|
|
36
|
+
# Cancel a queued request.
|
|
37
|
+
falx cancel -c job.yaml --request-id <request_id>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Online commands print machine-readable stdout YAML. Job YAML is a pure input spec;
|
|
41
|
+
falx does not write request state or results back to YAML.
|
|
42
|
+
|
|
43
|
+
`falx schema <app_id>` prints a top-level `JobConfig` YAML example. Job YAML no
|
|
44
|
+
longer accepts `uploads` or `results` blocks; URL parameters must already be public
|
|
45
|
+
`http(s)` or `data:` URLs.
|
falx-0.7.0/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
falx
|
|
2
|
+
====
|
|
3
|
+
|
|
4
|
+
Small CLI/library wrapper for fal.ai queue jobs.
|
|
5
|
+
|
|
6
|
+
## CLI workflow
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
# Upload local assets first, then paste the returned CDN URLs into YAML.
|
|
10
|
+
falx upload path/to/image.png path/to/reference.mov
|
|
11
|
+
|
|
12
|
+
# Submit, poll, and download in one async pipeline with max_concurrency control.
|
|
13
|
+
falx run -c job.yaml
|
|
14
|
+
|
|
15
|
+
# Resume a previously interrupted request by id (e.g. after timeout).
|
|
16
|
+
falx fetch -c job.yaml --request-id <request_id>
|
|
17
|
+
|
|
18
|
+
# Cancel a queued request.
|
|
19
|
+
falx cancel -c job.yaml --request-id <request_id>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Online commands print machine-readable stdout YAML. Job YAML is a pure input spec;
|
|
23
|
+
falx does not write request state or results back to YAML.
|
|
24
|
+
|
|
25
|
+
`falx schema <app_id>` prints a top-level `JobConfig` YAML example. Job YAML no
|
|
26
|
+
longer accepts `uploads` or `results` blocks; URL parameters must already be public
|
|
27
|
+
`http(s)` or `data:` URLs.
|
falx-0.7.0/SPEC.md
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# SPEC: falx
|
|
2
|
+
|
|
3
|
+
> 最終更新: 2026-06-19
|
|
4
|
+
> ステータス: current contract
|
|
5
|
+
|
|
6
|
+
## 目的
|
|
7
|
+
|
|
8
|
+
fal.ai queue API を YAML 入力から扱う小さな Python library / CLI wrapper。
|
|
9
|
+
CLI は request state を保持せず、呼び出し側が stdout YAML を capture して永続化する。
|
|
10
|
+
全 submit 経路は asyncio を基盤とし、`asyncio.Semaphore(max_concurrency)` で fal.ai
|
|
11
|
+
共有アカウントの concurrent in-flight 数を制御する。
|
|
12
|
+
|
|
13
|
+
## CLI
|
|
14
|
+
|
|
15
|
+
| command | 役割 |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `falx run -c job.yaml` | submit → poll → download を 1 経路に統合実行し、stdout YAML を返す |
|
|
18
|
+
| `falx fetch -c job.yaml --request-id <id>` | request_id の status / result を取得し、完了済みならファイルを配置して stdout YAML を返す |
|
|
19
|
+
| `falx cancel -c job.yaml --request-id <id>` | request_id を cancel し、stdout YAML を返す |
|
|
20
|
+
| `falx validate -c job.yaml` | job.yaml と parameters を検証する |
|
|
21
|
+
| `falx schema <app_id>` | job.yaml 例を出力する |
|
|
22
|
+
| `falx models` | 登録済み app_id を一覧する |
|
|
23
|
+
| `falx upload <files...>` | local file を fal CDN に upload し、TSV で URL を返す |
|
|
24
|
+
|
|
25
|
+
### deprecated alias
|
|
26
|
+
|
|
27
|
+
`falx submit` と `falx submit-async` は `run` への deprecated alias である。実体は
|
|
28
|
+
`run` 経路 (= submit + poll + download 統合) に転送され、stderr に deprecation 警告を
|
|
29
|
+
出す。新規利用は `run` を使う。
|
|
30
|
+
|
|
31
|
+
## job.yaml
|
|
32
|
+
|
|
33
|
+
job.yaml は純粋入力 spec である。CLI は job.yaml に request_id / result / status を書き戻さない。
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
app_id: fal-ai/nano-banana-2
|
|
37
|
+
parameters:
|
|
38
|
+
prompt: <your prompt here>
|
|
39
|
+
output_dir: workspace/demo/exp/G-0001_demo-output/output
|
|
40
|
+
slug: demo-output
|
|
41
|
+
version: 1
|
|
42
|
+
iterations: 1
|
|
43
|
+
max_concurrency: 8
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
| field | 仕様 |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `app_id` | fal app_id |
|
|
49
|
+
| `parameters` | fal endpoint に渡す parameters |
|
|
50
|
+
| `output_dir` | 出力 root。project root 相対 path を標準とする |
|
|
51
|
+
| `slug` | 出力 file 名の slug。必須。`--slug` で上書き可 |
|
|
52
|
+
| `version` | 出力 file 名 / folder 名の `vN`。必須。`--version` で上書き可 |
|
|
53
|
+
| `iterations` | 同一入力の投入回数。省略時 1。非 matrix run のみ意味を持ち、N 件の独立 task を独立 take folder に展開する。matrix run では常に 1 として扱う。`--iterations/-n` で上書き可 |
|
|
54
|
+
| `max_concurrency` | fal.ai 側 concurrent in-flight 数の上限。省略時 8。`--max-concurrency` で上書き可。1 以上の整数 |
|
|
55
|
+
| `output_expiration_seconds` | fal object lifecycle header 用の任意 field |
|
|
56
|
+
|
|
57
|
+
`results` / `request_id` / `submitted_at` / `completed_at` / `result` / `error_type` /
|
|
58
|
+
`error` は job.yaml の field として扱わない。これらを含む YAML は validation error になる。
|
|
59
|
+
|
|
60
|
+
### matrix_axes
|
|
61
|
+
|
|
62
|
+
`matrix_axes` を指定すると、falx は `axes` の直積から cell を展開する。`mode` は
|
|
63
|
+
`cartesian` のみ対応する。各 axis は次のどちらか一方の形を取る。
|
|
64
|
+
|
|
65
|
+
一つの field を変更する場合:
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
matrix_axes:
|
|
69
|
+
mode: cartesian
|
|
70
|
+
axes:
|
|
71
|
+
- field: prompt
|
|
72
|
+
values: ["A", "B"]
|
|
73
|
+
- field: aspect_ratio
|
|
74
|
+
values: ["16:9", "1:1"]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
複数の field を同時に変更する場合:
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
matrix_axes:
|
|
81
|
+
mode: cartesian
|
|
82
|
+
axes:
|
|
83
|
+
- fields: [edit_strength, controls, auto_controls]
|
|
84
|
+
value_set:
|
|
85
|
+
- [0.7, null, null]
|
|
86
|
+
- [null, {strength: 0.8}, null]
|
|
87
|
+
- [null, null, true]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
| field | 仕様 |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `axis.field` | 単一の `parameters` field 名 |
|
|
93
|
+
| `axis.values` | `axis.field` に順番に代入する値の list |
|
|
94
|
+
| `axis.fields` | 同期して切り替える複数の `parameters` field 名。1 件でも使用可 |
|
|
95
|
+
| `axis.value_set` | `axis.fields` と同じ長さの list を並べた list。各 inner list が同期された 1 cell 単位 |
|
|
96
|
+
|
|
97
|
+
`axis.field` / `axis.values` と `axis.fields` / `axis.value_set` は排他である。
|
|
98
|
+
`axis.value_set` の inner list 長は `axis.fields` 長と一致する必要がある。`null` は
|
|
99
|
+
その field を上書きしない値として扱う。`axes` 間は直積で展開し、`fields` 内だけを同期
|
|
100
|
+
unit として扱う。
|
|
101
|
+
|
|
102
|
+
## stdout YAML
|
|
103
|
+
|
|
104
|
+
`run`, `fetch` は次の形の block style YAML を stdout に出す。
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
request_id: req-0001
|
|
108
|
+
takes:
|
|
109
|
+
- take: 1
|
|
110
|
+
request_id: req-0001
|
|
111
|
+
batches:
|
|
112
|
+
- batch: 1
|
|
113
|
+
file_path: workspace/demo/exp/G-0001_demo-output/output/v1-1/G-0001_demo-output_v1-1-1.png
|
|
114
|
+
status: completed
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`fetch` は未完了 request の場合 `status: "in_progress"` を返す。
|
|
118
|
+
`takes[].take` は対象 task が払い出した絶対 take 値を表し、CLI が同 run で投入した
|
|
119
|
+
N 件の独立 task をそれぞれ 1 entry として並べる。各 task は独立した take を消費して
|
|
120
|
+
独立 folder (`v{V}-{T}/`, `v{V}-{T+1}/`, ...) に配置されるため、並列 fetch による
|
|
121
|
+
ファイル衝突が構造的に発生しない。
|
|
122
|
+
|
|
123
|
+
`cancel` は次の形を返す。
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
request_id: req-0001
|
|
127
|
+
status: cancelled
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
matrix run (`matrix_axes` あり) では次の形を返す。
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
matrix: true
|
|
134
|
+
status: completed
|
|
135
|
+
cells:
|
|
136
|
+
- cell: 1
|
|
137
|
+
coords: {prompt: A}
|
|
138
|
+
request_id: req-0001
|
|
139
|
+
status: completed
|
|
140
|
+
takes:
|
|
141
|
+
- take: 1
|
|
142
|
+
batches:
|
|
143
|
+
- batch: 1
|
|
144
|
+
file_path: workspace/demo/exp/G-0002_matrix-demo/output/c1-v1-1/G-0002_matrix-demo_c1_v1-1-1.mp4
|
|
145
|
+
skipped_cells:
|
|
146
|
+
- cell: 2
|
|
147
|
+
take: 1
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
matrix run では cell 内の `takes` は常に 1 件で固定する (= 各 cell が単一 task)。
|
|
151
|
+
複数 iteration 投入は非 matrix run の専用機能であり、matrix と組み合わせない。
|
|
152
|
+
`skipped_cells[]` の各 entry は完走済 cell の番号 + その完走を検出した take 値を
|
|
153
|
+
表し、resume 判定で skip された (cell, take) ペアを示す。
|
|
154
|
+
|
|
155
|
+
## file naming
|
|
156
|
+
|
|
157
|
+
download 済みファイルは `output_dir` 直下の submit folder に置く。
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
非 matrix: <output_dir>/v{V}-{T}/{identity}_v{V}-{T}-{B}.{ext}
|
|
161
|
+
matrix: <output_dir>/c{C}-v{V}-{T}/{identity}_c{C}_v{V}-{T}-{B}.{ext}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
| part | 仕様 |
|
|
165
|
+
|---|---|
|
|
166
|
+
| `identity` | `output_dir` の親が `G-NNNN_<slug>` 形式ならその folder 名。そうでない汎用利用では job.yaml `slug` または `--slug` |
|
|
167
|
+
| `C` | matrix cell の 1 始まり index。ゼロ埋めなし |
|
|
168
|
+
| `V` | job.yaml `version` または `--version` |
|
|
169
|
+
| `T` | take。`output_dir` 配下の既存 take folder を scan して決める G entry scope の submit 通し番号。非 matrix は version を跨いで通算する。matrix は対象 version の `c{C}-v{V}-{T}` folder を scan し、同一 version 内で 1 から開始する。ゼロ埋めなし |
|
|
170
|
+
| `B` | submit folder 内の file index。単一出力でも `-1` を付ける。同一 take folder 内では 1 から開始する。ゼロ埋めなし |
|
|
171
|
+
|
|
172
|
+
submit folder 名は `v{V}-{T}/` または `c{C}-v{V}-{T}/` とし、file 名と同じ
|
|
173
|
+
version / take / cell の値を含める。`request_id` は stdout YAML と
|
|
174
|
+
single-result yaml に保持し、folder 名と file 名には含めない。
|
|
175
|
+
|
|
176
|
+
`run` は command 開始時に次 take を確定する。非 matrix run で `iterations: N` を投入
|
|
177
|
+
した場合は、各 task に独立した take を割り当てる (= base take から N 連番で take++)。
|
|
178
|
+
1 request_id = 1 take folder の対応が崩れず、並列 task は disk 上で構造的に分離される。
|
|
179
|
+
非 matrix take は version を跨いで通算する。
|
|
180
|
+
|
|
181
|
+
matrix run は同一 version の全 cell で同じ take を共有する。既存 matrix take group が
|
|
182
|
+
一部完走の場合は同 take 内で未完了 cell だけを再投入し、全 cell 完走済みの場合は
|
|
183
|
+
同一 version 内の次 take に進める。別 version の matrix take group は当該 version の
|
|
184
|
+
take 判定に影響しない。
|
|
185
|
+
|
|
186
|
+
single-result yaml は download 済みファイルと同じ submit folder に置く。`output_dir` の親が
|
|
187
|
+
`G-NNNN_<slug>` 形式なら file 名は `G-NNNN_<slug>.yaml`、それ以外の汎用利用では
|
|
188
|
+
`<slug>.yaml` とする。
|
|
189
|
+
|
|
190
|
+
matrix run では cell ごとの compiled child yaml を同じ submit folder に置く。
|
|
191
|
+
|
|
192
|
+
```text
|
|
193
|
+
<output_dir>/c{C}-v{V}-{T}/G-NNNN_c{C}-v{V}-{T}-job.yaml
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
`G-NNNN` は `output_dir` の親 folder `G-NNNN_<slug>` から導出する。`output_dir` の親が
|
|
197
|
+
`G-NNNN_<slug>` 形式ではない汎用利用では `<output_dir>/c{C}-v{V}-{T}/c{C}-v{V}-{T}-job.yaml`
|
|
198
|
+
を fallback とする。
|
|
199
|
+
|
|
200
|
+
## concurrency control
|
|
201
|
+
|
|
202
|
+
`run` は `asyncio.Semaphore(max_concurrency)` で fal.ai 側の concurrent in-flight 数を
|
|
203
|
+
制御する。matrix の全 cell 並列、および非 matrix `iterations > 1` の並列はいずれも同じ
|
|
204
|
+
semaphore を共有する。N 件超過の submit は内部 task queue で待機し、in-flight 数が
|
|
205
|
+
N 未満になり次第順次発火する。
|
|
206
|
+
|
|
207
|
+
1 cell の例外 / cancel / timeout が発生しても semaphore は確実に release され、他 cell
|
|
208
|
+
を deadlock させない。1 cell が completed すれば即座に download + write を実施し、
|
|
209
|
+
他 cell の completion を待たない。
|
|
210
|
+
|
|
211
|
+
## contact-sheet thumbnail
|
|
212
|
+
|
|
213
|
+
同一 take 内の batch 出力が複数の still image である場合、サマリー用に 1 枚の
|
|
214
|
+
contact-sheet thumbnail を生成し、その submit folder 直下に同居させる。
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
<output_dir>/v{V}-{T}/{identity}_v{V}-{T}_contact.jpg
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
| part | 仕様 |
|
|
221
|
+
|---|---|
|
|
222
|
+
| stem | batch file の末尾 `-{B}` を剥がした `{identity}_v{V}-{T}` |
|
|
223
|
+
| 拡張子 | `.jpg` 固定 (90% quality) |
|
|
224
|
+
|
|
225
|
+
生成条件は次の三つを満たす場合に限る。
|
|
226
|
+
|
|
227
|
+
- take folder 内 batch path が 2 件以上
|
|
228
|
+
- model parameter (`num_images` 等) が複数枚出力に設定
|
|
229
|
+
- take folder 内全 batch が still image (動画 / 音声では生成しない)
|
|
230
|
+
|
|
231
|
+
## URL fields
|
|
232
|
+
|
|
233
|
+
job.yaml `parameters` 内の key 末尾が `url` / `urls` の field を URL field として扱う。許容値:
|
|
234
|
+
|
|
235
|
+
- public URL (`http` / `https` scheme + netloc)
|
|
236
|
+
- local file path (絶対 path、または job.yaml dir 起点の relative path)
|
|
237
|
+
- `null` / 未設定
|
|
238
|
+
|
|
239
|
+
local file path の解決規則:
|
|
240
|
+
|
|
241
|
+
- 絶対 path はそのまま採用
|
|
242
|
+
- relative path は job.yaml が置かれた dir を起点に解決
|
|
243
|
+
- 解決後の path が存在しない場合は validation error
|
|
244
|
+
|
|
245
|
+
`null` / 未設定は「指定なし」として通過させ、reject しない。optional URL field を空のまま submit したいケースを受ける。
|
|
246
|
+
|
|
247
|
+
## module boundaries
|
|
248
|
+
|
|
249
|
+
| module | 責務 |
|
|
250
|
+
|---|---|
|
|
251
|
+
| `falx.core` | fal queue primitive (`submit`, `fetch_status`, `fetch_result`, `cancel`)。asyncio ベース |
|
|
252
|
+
| `falx.models` | job.yaml / model parameter validation |
|
|
253
|
+
| `falx.io` | YAML load, URL validation support, upload/download file placement, thumbnail utilities |
|
|
254
|
+
| `falx.matrix` | matrix sweep 展開、cell-level resume、compiled child yaml 出力 |
|
|
255
|
+
| `falx.cli` | Typer command orchestration、asyncio entry、stdout YAML emission |
|
|
256
|
+
|
|
257
|
+
`falx.core` の primitive はすべて async function として公開する。CLI は各 command の
|
|
258
|
+
entry で `asyncio.run()` を呼び、内部で async 経路を駆動する。
|
|
259
|
+
|
|
260
|
+
## state ownership
|
|
261
|
+
|
|
262
|
+
falx CLI は中断耐性 state を内部に保持しない。呼び出し側は stdout YAML の
|
|
263
|
+
`request_id` / `takes[]` / `batches[]` を自身の metadata store に保存し、必要に応じて
|
|
264
|
+
`falx fetch --request-id` または `falx cancel --request-id` を呼ぶ。
|
|
265
|
+
|
|
266
|
+
`run` の中断 (timeout / Ctrl-C / 例外) 後の挙動は経路ごとに異なる。
|
|
267
|
+
|
|
268
|
+
- 非 matrix run は各 task の出力を独立した take folder に置く。再 `run` は前回完走分を
|
|
269
|
+
上書きせず、submit の通し番号である take を増やして新しい folder を作る。
|
|
270
|
+
- matrix run は同一 take 内で cell 単位の resume が成立する。再 `run` は完走済み
|
|
271
|
+
cell を skip し、未完了 cell だけを同 take 内で再 submit する。全 cell 完走済みの
|
|
272
|
+
場合は次 take に進む。
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "falx"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "Python library and CLI wrapper for fal.ai queue APIs"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = { text = "MIT" }
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "minamikik", email = "minamikik@users.noreply.github.com" }
|
|
9
|
+
]
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"fal-client>=0.7",
|
|
13
|
+
"typer>=0.12",
|
|
14
|
+
"pydantic>=2.7",
|
|
15
|
+
"python-dotenv>=1.0",
|
|
16
|
+
"ruamel.yaml>=0.18",
|
|
17
|
+
"httpx>=0.27",
|
|
18
|
+
"opencv-python-headless>=4.13.0.92",
|
|
19
|
+
"pykakasi>=2.3.0",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.scripts]
|
|
23
|
+
falx = "falx.cli:app"
|
|
24
|
+
|
|
25
|
+
[dependency-groups]
|
|
26
|
+
dev = [
|
|
27
|
+
"pytest>=8.0",
|
|
28
|
+
"ruff>=0.5",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[build-system]
|
|
32
|
+
requires = ["hatchling", "hatch-vcs"]
|
|
33
|
+
build-backend = "hatchling.build"
|
|
34
|
+
|
|
35
|
+
[tool.hatch.version]
|
|
36
|
+
source = "vcs"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.wheel]
|
|
39
|
+
packages = ["src/falx"]
|
|
40
|
+
|
|
41
|
+
[tool.ruff]
|
|
42
|
+
line-length = 100
|
|
43
|
+
target-version = "py312"
|
|
44
|
+
|
|
45
|
+
[tool.ruff.lint]
|
|
46
|
+
select = ["E", "F", "I", "UP", "B", "SIM"]
|
|
47
|
+
|
|
48
|
+
[tool.pytest.ini_options]
|
|
49
|
+
testpaths = ["tests"]
|
|
50
|
+
addopts = "-m 'not e2e'"
|
|
51
|
+
markers = [
|
|
52
|
+
"e2e: end-to-end tests that hit the real fal.ai API (requires FAL_KEY, opt-in via -m e2e)",
|
|
53
|
+
]
|