mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-27 14:50:20 +08:00
Fix remaining relative versus absolute namespace errors
This commit is contained in:
parent
3cc3173625
commit
8be5134f4c
@ -25,7 +25,7 @@ from aiohttp import web
|
|||||||
from can_ada import URL, parse as urlparse
|
from can_ada import URL, parse as urlparse
|
||||||
from typing_extensions import NamedTuple
|
from typing_extensions import NamedTuple
|
||||||
|
|
||||||
import comfy.interruption
|
from .. import interruption
|
||||||
from .latent_preview_image_encoding import encode_preview_image
|
from .latent_preview_image_encoding import encode_preview_image
|
||||||
from .. import model_management
|
from .. import model_management
|
||||||
from .. import utils
|
from .. import utils
|
||||||
@ -527,7 +527,7 @@ class PromptServer(ExecutorToClientProgress):
|
|||||||
|
|
||||||
@routes.post("/interrupt")
|
@routes.post("/interrupt")
|
||||||
async def post_interrupt(request):
|
async def post_interrupt(request):
|
||||||
comfy.interruption.interrupt_current_processing()
|
interruption.interrupt_current_processing()
|
||||||
return web.Response(status=200)
|
return web.Response(status=200)
|
||||||
|
|
||||||
@routes.post("/free")
|
@routes.post("/free")
|
||||||
|
|||||||
@ -29,7 +29,7 @@ def prepare_noise(latent_image, seed, noise_inds=None):
|
|||||||
def fix_empty_latent_channels(model, latent_image):
|
def fix_empty_latent_channels(model, latent_image):
|
||||||
latent_channels = model.get_model_object("latent_format").latent_channels #Resize the empty latent image so it has the right number of channels
|
latent_channels = model.get_model_object("latent_format").latent_channels #Resize the empty latent image so it has the right number of channels
|
||||||
if latent_channels != latent_image.shape[1] and torch.count_nonzero(latent_image) == 0:
|
if latent_channels != latent_image.shape[1] and torch.count_nonzero(latent_image) == 0:
|
||||||
latent_image = comfy.utils.repeat_to_batch_size(latent_image, latent_channels, dim=1)
|
latent_image = utils.repeat_to_batch_size(latent_image, latent_channels, dim=1)
|
||||||
return latent_image
|
return latent_image
|
||||||
|
|
||||||
def prepare_sampling(model, noise_shape, positive, negative, noise_mask):
|
def prepare_sampling(model, noise_shape, positive, negative, noise_mask):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user