cheesechaser.datapool.konachan

This module provides data pool implementations for Konachan images.

It defines two classes:

  1. KonachanDataPool: A specialized version of IncrementIDDataPool for handling Konachan image data.

  2. KonachanWebpDataPool: A specialized version of IncrementIDDataPool for handling Konachan WebP image data.

The module uses predefined repositories for storing and accessing Konachan image data.

Note

The datasets deepghs/konachan_full and deepghs/konachan-webp-4Mpixel are gated. You have to get access to them 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.

KonachanWebpDataPool

class cheesechaser.datapool.konachan.KonachanWebpDataPool(revision: str = 'main', hf_token: str | None = None)[source]

A data pool class for managing Konachan WebP image data.

This class extends the IncrementIDDataPool to provide specific functionality for handling Konachan WebP image data. It uses a predefined repository to store and access the WebP 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_webp_pool = KonachanWebpDataPool()
>>> konachan_webp_pool_with_token = KonachanWebpDataPool(hf_token='your_token_here')
>>> konachan_webp_pool_specific_revision = KonachanWebpDataPool(revision='v1.0')
Note:

The KonachanWebpDataPool uses a predefined repository (_KONACHAN_WEBP_REPO) for both data and index storage. This ensures consistency in data access and management for Konachan WebP images.

__init__(revision: str = 'main', hf_token: str | None = None)[source]

Initialize the KonachanWebpDataPool.

This constructor sets up the KonachanWebpDataPool with the specified revision and optional Hugging Face token. It initializes the underlying IncrementIDDataPool with the predefined Konachan WebP 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.