mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-27 01:19:05 +01:00
Rename diffusionkit to sdkit; Delete runtime.py (historic moment)
This commit is contained in:
parent
1595f1ed05
commit
e483071894
@ -1,6 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
from diffusionkit.types import GenerateImageRequest
|
||||
from sdkit.types import GenerateImageRequest
|
||||
|
||||
class TaskData(BaseModel):
|
||||
request_id: str = None
|
||||
|
@ -1,11 +1,10 @@
|
||||
import os
|
||||
import logging
|
||||
import picklescan.scanner
|
||||
import rich
|
||||
|
||||
from sd_internal import app, TaskData, device_manager
|
||||
from diffusionkit import model_loader
|
||||
from diffusionkit.types import Context
|
||||
from sdkit.models import model_loader
|
||||
from sdkit.types import Context
|
||||
|
||||
log = logging.getLogger()
|
||||
|
||||
|
@ -6,8 +6,8 @@ import logging
|
||||
from sd_internal import device_manager, save_utils
|
||||
from sd_internal import TaskData, Response, Image as ResponseImage, UserInitiatedStop
|
||||
|
||||
from diffusionkit import model_loader, image_generator, image_utils, filters as image_filters, data_utils
|
||||
from diffusionkit.types import Context, GenerateImageRequest, FilterImageRequest
|
||||
from sdkit import model_loader, image_generator, image_utils, filters as image_filters
|
||||
from sdkit.types import Context, GenerateImageRequest, FilterImageRequest
|
||||
|
||||
log = logging.getLogger()
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@ import time
|
||||
import base64
|
||||
import re
|
||||
|
||||
from diffusionkit import data_utils
|
||||
from diffusionkit.types import GenerateImageRequest
|
||||
from sdkit.utils import save_images, save_dicts
|
||||
from sdkit.types import GenerateImageRequest
|
||||
|
||||
from sd_internal import TaskData
|
||||
|
||||
@ -33,12 +33,12 @@ def save_to_disk(images: list, filtered_images: list, req: GenerateImageRequest,
|
||||
metadata_entries = get_metadata_entries(req, task_data)
|
||||
|
||||
if task_data.show_only_filtered_image or filtered_images == images:
|
||||
data_utils.save_images(filtered_images, save_folder_path, file_name=make_filename_callback(req), output_format=task_data.output_format, output_quality=task_data.output_quality)
|
||||
data_utils.save_metadata(metadata_entries, save_folder_path, file_name=make_filename_callback(req), output_format=task_data.metadata_output_format)
|
||||
save_images(filtered_images, save_folder_path, file_name=make_filename_callback(req), output_format=task_data.output_format, output_quality=task_data.output_quality)
|
||||
save_dicts(metadata_entries, save_folder_path, file_name=make_filename_callback(req), output_format=task_data.metadata_output_format)
|
||||
else:
|
||||
data_utils.save_images(images, save_folder_path, file_name=make_filename_callback(req), output_format=task_data.output_format, output_quality=task_data.output_quality)
|
||||
data_utils.save_images(filtered_images, save_folder_path, file_name=make_filename_callback(req, suffix='filtered'), output_format=task_data.output_format, output_quality=task_data.output_quality)
|
||||
data_utils.save_metadata(metadata_entries, save_folder_path, file_name=make_filename_callback(req, suffix='filtered'), output_format=task_data.metadata_output_format)
|
||||
save_images(images, save_folder_path, file_name=make_filename_callback(req), output_format=task_data.output_format, output_quality=task_data.output_quality)
|
||||
save_images(filtered_images, save_folder_path, file_name=make_filename_callback(req, suffix='filtered'), output_format=task_data.output_format, output_quality=task_data.output_quality)
|
||||
save_dicts(metadata_entries, save_folder_path, file_name=make_filename_callback(req, suffix='filtered'), output_format=task_data.metadata_output_format)
|
||||
|
||||
def get_metadata_entries(req: GenerateImageRequest, task_data: TaskData):
|
||||
metadata = get_printable_request(req)
|
||||
|
@ -15,7 +15,7 @@ import queue, threading, time, weakref
|
||||
from typing import Any, Hashable
|
||||
|
||||
from sd_internal import TaskData, device_manager
|
||||
from diffusionkit.types import GenerateImageRequest
|
||||
from sdkit.types import GenerateImageRequest
|
||||
|
||||
log = logging.getLogger()
|
||||
|
||||
|
@ -15,7 +15,7 @@ from pydantic import BaseModel
|
||||
|
||||
from sd_internal import app, model_manager, task_manager
|
||||
from sd_internal import TaskData
|
||||
from diffusionkit.types import GenerateImageRequest
|
||||
from sdkit.types import GenerateImageRequest
|
||||
|
||||
log = logging.getLogger()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user