Skip to main content

Layerxtr extracts layer details from text, structuring them for designers to auto replicate images.

Project description

LayerXTR

PyPI version License: MIT Downloads LinkedIn

Extract and organize detailed layer information from image editing descriptions.

Overview

LayerXTR enables users to process textual descriptions of image layers and return a structured output listing each layer with its attributes. This tool helps streamline workflows for graphic designers, digital artists, and content creators by automating the extraction of layer details from textual descriptions, making it easier to replicate or modify image compositions programmatically.

Installation

pip install layerxtr

Usage

from layerxtr import layerxtr

user_input = "background: sky, foreground: trees, objects: birds"
response = layerxtr(user_input)
print(response)

Input Parameters

  • user_input: str - the user input text to process
  • llm: Optional[BaseChatModel]: the langchain llm instance to use, if not provided the default ChatLLM7 will be used.
  • api_key: Optional[str]: the api key for llm7, if not provided will use default LLM7 key

Note: This package uses the ChatLLM7 from langchain_llm7 by default. Developers can safely pass their own llm instance if they want to use another LLM, via passing it like layerxtr(user_input, llm=their_llm_instance).

Passing Your Own LLM Instance

For example, to use the openai:

from langchain_openai import ChatOpenAI
from layerxtr import layerxtr

llm = ChatOpenAI()
response = layerxtr(user_input, llm=llm)

or for example to use the anthropic:

from langchain_anthropic import ChatAnthropic
from layerxtr import layerxtr

llm = ChatAnthropic()
response = layerxtr(user_input, llm=llm)

or google:

from langchain_google_genai import ChatGoogleGenerativeAI
from layerxtr import layerxtr

llm = ChatGoogleGenerativeAI()
response = layerxtr(user_input, llm=llm)

If you need higher rate limits for LLM7, you can pass your own api_key via environment variable LLM7_API_KEY or via passing it directly like layerxtr(user_input, api_key="their_api_key"). You can get a free api key by registering at https://token.llm7.io/

Rate Limits

The default rate limits for LLM7 free tier are sufficient for most use cases of this package.

Issues

Find issues and submit new ones: https://github.com/chigwell/layerxtr/issues

Author

Eugene Evstafev hi@euegne.plus

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

layerxtr-2025.12.22082716.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

layerxtr-2025.12.22082716-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file layerxtr-2025.12.22082716.tar.gz.

File metadata

  • Download URL: layerxtr-2025.12.22082716.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for layerxtr-2025.12.22082716.tar.gz
Algorithm Hash digest
SHA256 c33d845e5f256494cbf56ef2b6565c5766d58fd593c7cab24316ebee7896a286
MD5 f7bce1f2e2d19be51eed19fba54e7ead
BLAKE2b-256 4c1ac2386e00c269f9fe3d8c547316c45ec98c2511e2661d22ba438655dbfb85

See more details on using hashes here.

File details

Details for the file layerxtr-2025.12.22082716-py3-none-any.whl.

File metadata

File hashes

Hashes for layerxtr-2025.12.22082716-py3-none-any.whl
Algorithm Hash digest
SHA256 6dba13c382ce390fcb1733208f7bc0ab4fe6e17ebcbd532489f420850f12d6c2
MD5 b707a6e7ae448bfd8a4c7748cb6f3a17
BLAKE2b-256 8b5f679cec874c067a1a456a1ef96e107984440524e90c1ff6dc82773ae3ecab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page