pass initial device to chain
This commit is contained in:
parent
fb7a0996a8
commit
51b10de265
|
@ -108,7 +108,6 @@ class ChainPipeline:
|
|||
len(sources),
|
||||
)
|
||||
else:
|
||||
sources = [None]
|
||||
logger.info("running pipeline without source images")
|
||||
|
||||
stage_sources = sources
|
||||
|
|
|
@ -519,7 +519,7 @@ def blend_loras(
|
|||
t_weights = interp_to_match(weights, onnx_weights).transpose()
|
||||
|
||||
blended = onnx_weights + t_weights
|
||||
logger.debug(
|
||||
logger.trace(
|
||||
"blended weight shape: %s, %s", blended.shape, onnx_weights.dtype
|
||||
)
|
||||
|
||||
|
|
|
@ -60,5 +60,7 @@ type: object
|
|||
additionalProperties: False
|
||||
required: [stages]
|
||||
properties:
|
||||
platform:
|
||||
type: string
|
||||
stages:
|
||||
$ref: "#/$defs/request_chain"
|
||||
|
|
|
@ -431,9 +431,12 @@ export function makeClient(root: string, token: Maybe<string> = undefined, f = f
|
|||
}
|
||||
};
|
||||
},
|
||||
async chain(chain: ChainPipeline): Promise<ImageResponse> {
|
||||
async chain(model: ModelParams, chain: ChainPipeline): Promise<ImageResponse> {
|
||||
const url = makeApiUrl(root, 'chain');
|
||||
const body = JSON.stringify(chain);
|
||||
const body = JSON.stringify({
|
||||
...chain,
|
||||
platform: model.platform,
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-return-await
|
||||
return await parseRequest(url, {
|
||||
|
|
|
@ -39,7 +39,7 @@ export const LOCAL_CLIENT = {
|
|||
async outpaint(model, params, upscale) {
|
||||
throw new NoServerError();
|
||||
},
|
||||
async chain(chain) {
|
||||
async chain(model, chain) {
|
||||
throw new NoServerError();
|
||||
},
|
||||
async noises() {
|
||||
|
|
|
@ -387,7 +387,7 @@ export interface ApiClient {
|
|||
*/
|
||||
blend(model: ModelParams, params: BlendParams, upscale?: UpscaleParams): Promise<ImageResponseWithRetry>;
|
||||
|
||||
chain(chain: ChainPipeline): Promise<ImageResponse>;
|
||||
chain(model: ModelParams, chain: ChainPipeline): Promise<ImageResponse>;
|
||||
|
||||
/**
|
||||
* Check whether job has finished and its output is ready.
|
||||
|
|
|
@ -30,7 +30,7 @@ export function Txt2Img() {
|
|||
|
||||
if (grid.enabled) {
|
||||
const chain = buildPipelineForTxt2ImgGrid(grid, model, params2, upscale, highres);
|
||||
const image = await client.chain(chain);
|
||||
const image = await client.chain(model, chain);
|
||||
pushHistory(image);
|
||||
} else {
|
||||
const { image, retry } = await client.txt2img(model, params2, upscale, highres);
|
||||
|
|
Loading…
Reference in New Issue