Merge pull request #23 from hodanov/feature/refactoring
Modify a little.
This commit is contained in:
commit
ffbcb8aae0
@ -1,11 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from setup import stub
|
from setup import stub
|
||||||
from txt2img import StableDiffusion
|
from txt2img import StableDiffusion, new_stable_diffusion
|
||||||
|
|
||||||
|
|
||||||
def new_stable_diffusion() -> StableDiffusion:
|
|
||||||
return StableDiffusion()
|
|
||||||
|
|
||||||
|
|
||||||
@stub.function(gpu="A10G")
|
@stub.function(gpu="A10G")
|
||||||
|
|||||||
@ -14,6 +14,10 @@ from setup import (BASE_CACHE_PATH, BASE_CACHE_PATH_CONTROLNET,
|
|||||||
stub)
|
stub)
|
||||||
|
|
||||||
|
|
||||||
|
def new_stable_diffusion() -> StableDiffusionInterface:
|
||||||
|
return StableDiffusion()
|
||||||
|
|
||||||
|
|
||||||
class StableDiffusionInterface(metaclass=abc.ABCMeta):
|
class StableDiffusionInterface(metaclass=abc.ABCMeta):
|
||||||
"""
|
"""
|
||||||
A StableDiffusionInterface is an interface that will be used for StableDiffusion class creation.
|
A StableDiffusionInterface is an interface that will be used for StableDiffusion class creation.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user