mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-09 19:41:32 +00:00
sd request update
This commit is contained in:
1 parent
7fd4550ae8
commit
531524a7fd
2 files changed
+5
-4
No files matched your search
@@ -1,5 +1,5 @@
|
||||
export enum TypeOfInference {
|
||||
UploadLora = "upload_lora",
|
||||
Checkpoint = "checkpoint",
|
||||
Standard = "inference",
|
||||
Inference = "inference",
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export default function SdInferencePanel({
|
||||
sd_model_token,
|
||||
}: SdInferencePanelProps) {
|
||||
const [isEnqueuing, setIsEnqueuing] = useState(false);
|
||||
|
||||
const [inferenceType, inferenceTypeSet] = useState(TypeOfInference.Inference);
|
||||
const [seed, seedSet] = useState("random");
|
||||
const [seedNumber, seedNumberSet] = useState("");
|
||||
const [sampler, samplerSet] = useState("DPM++ 2M Karras");
|
||||
@@ -60,6 +60,7 @@ export default function SdInferencePanel({
|
||||
setPrompt,
|
||||
setNegativePrompt,
|
||||
samplesSet,
|
||||
inferenceTypeSet,
|
||||
});
|
||||
const [isLoraModalOpen, isLoraModalOpenSet] = useState(false);
|
||||
|
||||
@@ -208,7 +209,7 @@ export default function SdInferencePanel({
|
||||
|
||||
const request = {
|
||||
uuid_idempotency_token: uuidv4(),
|
||||
type_of_inference: TypeOfInference.Standard,
|
||||
type_of_inference: inferenceType,
|
||||
maybe_sd_model_token: sd_model_token,
|
||||
maybe_lora_model_token: loraToken,
|
||||
maybe_prompt: prompt,
|
||||
@@ -229,7 +230,7 @@ export default function SdInferencePanel({
|
||||
if (EnqueueImageGenIsSuccess(response)) {
|
||||
console.log("enqueuing...");
|
||||
|
||||
if (response.inference_job_token === "generic") {
|
||||
if (response.inference_job_token) {
|
||||
enqueueInferenceJob(
|
||||
response.inference_job_token,
|
||||
FrontendInferenceJobType.ImageGeneration
|
||||
|
||||
Reference in new issue
Block a user