mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
21 lines
580 B
Python
21 lines
580 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class UrlServiceBase(ABC):
|
|
"""Responsible for building URLs for resources."""
|
|
|
|
@abstractmethod
|
|
def get_image_url(self, image_name: str, thumbnail: bool = False) -> str:
|
|
"""Gets the URL for an image or thumbnail."""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_model_image_url(self, model_key: str) -> str:
|
|
"""Gets the URL for a model image"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_style_preset_image_url(self, style_preset_id: str) -> str:
|
|
"""Gets the URL for a style preset image"""
|
|
pass
|