Skip to content

Conversation

@OleehyO
Copy link
Collaborator

@OleehyO OleehyO commented Mar 25, 2025

  • Move generation directory to api/python for better code organization
  • Refactor image generation service to reuse Python API
  • Clean up .env.template by removing unused properties and fixing typos
  • Refactor guess_generation_mode to fetch inference tasks directly from pipeline
  • Add unload_lora_checkpoint logic
  • Add offload mode selection in API and before_generation
  • Fix lora merge logic

- Move generation directory to `api/python` for better code organization
- Refactor image generation service to reuse Python API
- Clean up .env.template by removing unused properties and fixing typos
- Refactor generation_mode to fetch inference tasks directly from pipeline
- Add unload_lora_checkpoint logic
- Add offload mode selection in API and `before_generation`
- Add docs for python API function signature
- Fix lora merge logic
@OleehyO OleehyO force-pushed the dev-lhy branch 3 times, most recently from 9a502ab to d156207 Compare March 25, 2025 15:36
…video`, add lora operations to Python API

- Modified `src/cogkit/__init__.py` to updated Python API
- Updated `src/cogkit/api/python/generation/(image,video).py` to remove lora param and integrate lora operations
- Adjusted `src/cogkit/cli/inference.py` to align with API changes
task = guess_generation_mode(model_id_or_path, task, image_file, video_file)
dtype = cast_to_torch_dtype(dtype)
pipeline = load_pipeline(model_id_or_path, transformer_path, dtype)
task = guess_generation_mode(pipeline=pipeline, image_file=image_file)
Copy link
Collaborator

@zhangch9 zhangch9 Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrect type: image_file. See the definition of the function guess_generation_mode.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. PTAL @OleehyO

Copy link
Collaborator Author

@OleehyO OleehyO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OleehyO OleehyO merged commit e267385 into main Mar 26, 2025
1 check passed
@OleehyO OleehyO deleted the dev-lhy branch March 26, 2025 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants