mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-02 16:05:13 -05:00
16 lines
423 B
Python
16 lines
423 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
|