cheesechaser.datapool.civitai

This module provides a data pool implementation for Civitai, a platform for AI-generated art and models.

The CivitaiDataPool class extends the IncrementIDDataPool to specifically handle data from Civitai. It uses a predefined repository to store and retrieve data.

Classes:

CivitaiDataPool: A data pool class for managing Civitai data.

Note

The dataset deepghs/civitai_full is gated, you have to get the access of it before using this module.

CivitaiDataPool

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

A data pool class specifically designed for handling Civitai data.

This class extends the IncrementIDDataPool to provide a convenient way to access and manage data from the Civitai platform. It uses a predefined repository to store both the data and the index information.

Parameters:
  • revision (str) – The specific revision of the data to use, defaults to ‘main’.

  • hf_token (Optional[str]) – An optional Hugging Face token for authentication, defaults to None.

Usage:
>>> civitai_pool = CivitaiDataPool()
>>> civitai_pool_with_token = CivitaiDataPool(hf_token='your_token_here')
>>> specific_revision_pool = CivitaiDataPool(revision='v1.0')
Note:

The CivitaiDataPool uses a predefined repository (_CIVITAI_REPO) for both data and index storage. This ensures consistency and ease of use when working with Civitai data.

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

Initialize the CivitaiDataPool with the specified revision and optional Hugging Face token.

Parameters:
  • revision (str) – The specific revision of the data to use, defaults to ‘main’.

  • hf_token (Optional[str]) – An optional Hugging Face token for authentication, defaults to None.

This method sets up the CivitaiDataPool by initializing the parent IncrementIDDataPool with specific parameters tailored for Civitai data. It uses the same repository for both data and index storage, ensuring data consistency.