mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
fixed errors
This commit is contained in:
parent
ace17c5029
commit
731c418d1c
@ -27,7 +27,7 @@ def build_image(prompt, negative_prompt, width, height, processor:APScript, clie
|
||||
if not processor.personality.app.tti:
|
||||
from lollms.services.diffusers.lollms_diffusers import LollmsDiffusers
|
||||
processor.step_start("Loading ParisNeo's fork of AUTOMATIC1111's stable diffusion service")
|
||||
processor.personality.app.tti = LollmsDiffusers(processor.personality.app, processor.personality.name, max_retries=-1,auto_sd_base_url=processor.personality.config.sd_base_url)
|
||||
processor.personality.app.tti = LollmsDiffusers(processor.personality.app, processor.personality.name)
|
||||
processor.personality.app.sd = processor.personality.app.tti
|
||||
processor.step_end("Loading ParisNeo's fork of AUTOMATIC1111's stable diffusion service")
|
||||
file, infos = processor.personality.app.tti.paint(
|
||||
@ -66,6 +66,21 @@ def build_image(prompt, negative_prompt, width, height, processor:APScript, clie
|
||||
output_path=client.discussion.discussion_folder
|
||||
)
|
||||
processor.step_end("Painting")
|
||||
elif processor.personality.config.active_tti_service=="comfyui":
|
||||
if not processor.personality.app.tti:
|
||||
from lollms.services.comfyui.lollms_comfyui import LollmsComfyUI
|
||||
processor.step_start("Loading dalle service")
|
||||
processor.personality.app.tti = LollmsComfyUI(processor.personality.app, comfyui_base_url=processor.personality)
|
||||
processor.personality.app.dalle = processor.personality.app.tti
|
||||
processor.step_end("Loading dalle service")
|
||||
processor.step_start("Painting")
|
||||
file = processor.personality.app.tti.paint(
|
||||
prompt,
|
||||
width = width,
|
||||
height = height,
|
||||
output_path=client.discussion.discussion_folder
|
||||
)
|
||||
processor.step_end("Painting")
|
||||
|
||||
file = str(file)
|
||||
escaped_url = discussion_path_to_url(file)
|
||||
|
@ -121,6 +121,8 @@ class LollmsDiffusers(LollmsTTI):
|
||||
ASCIIColors.red(" |______| ")
|
||||
|
||||
import torch
|
||||
if not PackageManager.check_package_installed("diffusers"):
|
||||
PackageManager.install_or_update("diffusers")
|
||||
from diffusers import AutoPipelineForText2Image, AutoPipelineForImage2Image#PixArtSigmaPipeline
|
||||
self.model = AutoPipelineForText2Image.from_pretrained(
|
||||
app.config.diffusers_model, torch_dtype=torch.float16, cache_dir=self.models_dir,
|
||||
|
Loading…
Reference in New Issue
Block a user