Skip to content

Commit

Permalink
refactor: improve code formatting (livepeer#99)
Browse files Browse the repository at this point in the history
This commit applies some small code and documentation formatting
improvements.
  • Loading branch information
rickstaa authored and eliteprox committed Jun 10, 2024
1 parent e869327 commit 65631f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions runner/app/pipelines/image_to_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def __init__(self, model_id: str):
repo_id=model_id, repo_type="model"
)
folder_path = os.path.join(get_model_dir(), folder_name)
# Load the fp16 variant if fp16 'safetensors' files are present in the cache.
# NOTE: Exception for SDXL-Lightning model: despite having fp16 'safetensors'
# files, they are not named according to the standard convention.
has_fp16_variant = (
any(
".fp16.safetensors" in fname
Expand Down
6 changes: 3 additions & 3 deletions runner/app/pipelines/text_to_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def __init__(self, model_id: str):
repo_id=model_id, repo_type="model"
)
folder_path = os.path.join(get_model_dir(), folder_name)
# Load fp16 variant if fp16 safetensors files are found in cache
# Special case SDXL-Lightning because the safetensors files are fp16 but are not
# named properly right now
# Load the fp16 variant if fp16 'safetensors' files are present in the cache.
# NOTE: Exception for SDXL-Lightning model: despite having fp16 'safetensors'
# files, they are not named according to the standard convention.
has_fp16_variant = (
any(
".fp16.safetensors" in fname
Expand Down
2 changes: 1 addition & 1 deletion runner/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To debug the AI runner when it operates within a container orchestrated by exter
cd .. && git apply ./runner/dev/patches/debug.patch && cd runner
```

5. **Attach and Debug**: Follow the [guidance on attaching to a running container](https://code.visualstudio.com/docs/python/debugging#_command-line-debugging) for details. To attach to the AI runner, use the following configuration:
5. **Attach and Debug**: Debugging the AI runner involves attaching to an active container. Ensure that VSCode is open in the `runner` directory. Follow these [instructions to attach to a running container](https://code.visualstudio.com/docs/python/debugging#_command-line-debugging) with the appropriate configuration:

```json
{
Expand Down

0 comments on commit 65631f7

Please sign in to comment.