cheesechaser.datapool.konachan
This module provides a data pool implementation for Konachan images.
It defines the KonachanDataPool class, which is a specialized version of the IncrementIDDataPool for handling Konachan image data. The module uses a predefined repository for storing and accessing Konachan image data.
Note
The dataset deepghs/konachan_full is gated, you have to get the access of it before using this module.
KonachanDataPool
- class cheesechaser.datapool.konachan.KonachanDataPool(revision: str = 'main', hf_token: str | None = None)[source]
A data pool class for managing Konachan image data.
This class extends the IncrementIDDataPool to provide specific functionality for handling Konachan image data. It uses a predefined repository to store and access the image data and indices.
- Parameters:
revision (str) – The revision of the data to use, defaults to ‘main’.
hf_token (Optional[str]) – Optional Hugging Face token for authentication, defaults to None.
- Usage:
>>> konachan_pool = KonachanDataPool() >>> konachan_pool_with_token = KonachanDataPool(hf_token='your_token_here') >>> konachan_pool_specific_revision = KonachanDataPool(revision='v1.0')
- Note:
The KonachanDataPool uses a predefined repository (_KONACHAN_REPO) for both data and index storage. This ensures consistency in data access and management for Konachan images.
- __init__(revision: str = 'main', hf_token: str | None = None)[source]
Initialize the KonachanDataPool.
This constructor sets up the KonachanDataPool with the specified revision and optional Hugging Face token. It initializes the underlying IncrementIDDataPool with the predefined Konachan repository for both data and index management.
- Parameters:
revision (str) – The revision of the data to use, defaults to ‘main’.
hf_token (Optional[str]) – Optional Hugging Face token for authentication, defaults to None.
- Example:
>>> pool = KonachanDataPool(revision='v2.0', hf_token='my_secret_token')