fixed comfyui
This commit is contained in:
@@ -96,7 +96,10 @@ class ComfyUi implements ApiPluginInterface
|
||||
$this->logInfo('Uploading image to ComfyUI.', ['image_path' => $imagePath]);
|
||||
$response = Http::attach(
|
||||
'image', file_get_contents($imagePath), basename($imagePath)
|
||||
)->post($this->apiProvider->api_url . '/upload/image');
|
||||
)->timeout(120)->post(rtrim($this->apiProvider->api_url, '/') . '/upload/image', [
|
||||
'type' => 'input',
|
||||
'overwrite' => 'false',
|
||||
]);
|
||||
|
||||
if ($response->failed()) {
|
||||
$this->logError('ComfyUI image upload failed.', ['response' => $response->body()]);
|
||||
@@ -123,7 +126,7 @@ class ComfyUi implements ApiPluginInterface
|
||||
private function queuePrompt(array $promptData): array
|
||||
{
|
||||
$this->logInfo('Queueing prompt in ComfyUI.');
|
||||
$response = Http::post($this->apiProvider->api_url . '/prompt', ['prompt' => $promptData]);
|
||||
$response = Http::timeout(120)->post(rtrim($this->apiProvider->api_url, '/') . '/prompt', ['prompt' => $promptData]);
|
||||
|
||||
if ($response->failed()) {
|
||||
$this->logError('Failed to queue prompt in ComfyUI.', ['response' => $response->body()]);
|
||||
@@ -137,7 +140,7 @@ class ComfyUi implements ApiPluginInterface
|
||||
{
|
||||
$this->logInfo('Waiting for ComfyUI result.', ['prompt_id' => $promptId]);
|
||||
while (true) {
|
||||
$response = Http::get($this->apiProvider->api_url . '/history/' . $promptId);
|
||||
$response = Http::timeout(120)->get($this->apiProvider->api_url . '/history/' . $promptId);
|
||||
$data = $response->json();
|
||||
|
||||
if (!empty($data[$promptId]['outputs'])) {
|
||||
|
||||
@@ -126,7 +126,7 @@ const showStyleSelectorView = ref(false);
|
||||
}
|
||||
|
||||
.context-menu li:hover {
|
||||
background: var(--color-text); /* Adjust hover background for dark mode */
|
||||
color: var(--color-background); /* Adjust hover text color for dark mode */
|
||||
@apply hover:bg-gray-100 dark:hover:bg-gray-700;
|
||||
@apply dark:hover:text-gray-400;
|
||||
}
|
||||
</style>
|
||||
@@ -62,9 +62,10 @@ onMounted(() => {
|
||||
|
||||
<style scoped>
|
||||
.style-selector {
|
||||
background: white;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
|
||||
@apply bg-white dark:bg-gray-800 !important;
|
||||
@apply border border-gray-300 dark:border-gray-700;
|
||||
@apply shadow-lg dark:shadow-none;
|
||||
@apply text-gray-900 dark:text-white !important;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -85,6 +86,7 @@ onMounted(() => {
|
||||
|
||||
.style-selector-header h3 {
|
||||
margin: 0;
|
||||
@apply dark:text-white;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@@ -134,12 +136,12 @@ onMounted(() => {
|
||||
|
||||
.style-details h4 {
|
||||
margin: 0;
|
||||
color: #007bff;
|
||||
@apply text-blue-600 dark:text-white;
|
||||
}
|
||||
|
||||
.style-details p {
|
||||
margin: 5px 0 0;
|
||||
font-size: 0.9em;
|
||||
color: #666;
|
||||
@apply text-gray-600 dark:text-gray-400;
|
||||
}
|
||||
</style>
|
||||
@@ -14,4 +14,5 @@ return [
|
||||
'navigation.previous' => 'Zurück',
|
||||
'navigation.next' => 'Weiter',
|
||||
'navigation.page_of' => 'Seite :currentPage von :totalPages',
|
||||
'loading_spinner.processing_image' => 'Bild wird verarbeitet...',
|
||||
];
|
||||
|
||||
@@ -14,4 +14,5 @@ return [
|
||||
'navigation.previous' => 'Previous',
|
||||
'navigation.next' => 'Next',
|
||||
'navigation.page_of' => 'Page :currentPage of :totalPages',
|
||||
'loading_spinner.processing_image' => 'Processing image...',
|
||||
];
|
||||
|
||||
@@ -31,12 +31,3 @@ Route::middleware('auth')->group(function () {
|
||||
|
||||
require __DIR__.'/auth.php';
|
||||
|
||||
Route::get('/test-translations-en', function () {
|
||||
app()->setLocale('en');
|
||||
return response()->json(trans('api'));
|
||||
});
|
||||
|
||||
Route::get('/test-translations-de', function () {
|
||||
app()->setLocale('de');
|
||||
return response()->json(trans('api'));
|
||||
});
|
||||
@@ -3,6 +3,7 @@ import forms from '@tailwindcss/forms';
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
darkMode: 'class',
|
||||
content: [
|
||||
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
|
||||
'./storage/framework/views/*.php',
|
||||
|
||||
Reference in New Issue
Block a user