Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator subprocess #96

Merged
merged 20 commits into from
Sep 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

from .help_section import register_section_props

from .async_loop import *
from .prompt_engineering import *
from .operators.open_latest_version import check_for_updates
from .absolute_path import absolute_path
from .classes import CLASSES, PREFERENCE_CLASSES
from .tools import TOOLS
from .operators.install_dependencies import are_dependencies_installed, set_dependencies_installed
from .operators.dream_texture import kill_generator
from .property_groups.dream_prompt import DreamPrompt
from .ui import panel

Expand All @@ -48,14 +48,6 @@
)

def register():
async_loop.setup_asyncio_executor()
bpy.utils.register_class(AsyncLoopModalOperator)

sys.path.append(absolute_path("stable_diffusion/"))
sys.path.append(absolute_path("stable_diffusion/src/clip"))
sys.path.append(absolute_path("stable_diffusion/src/k-diffusion"))
sys.path.append(absolute_path("stable_diffusion/src/taming-transformers"))

set_dependencies_installed(False)
bpy.types.Scene.dream_textures_requirements_path = EnumProperty(name="Platform", items=requirements_path_items, description="Specifies which set of dependencies to install", default='stable_diffusion/requirements-mac-MPS-CPU.txt' if sys.platform == 'darwin' else 'requirements-win-torch-1-11-0.txt')

Expand All @@ -79,6 +71,7 @@ def register():
bpy.types.Scene.init_mask = PointerProperty(name="Init Mask", type=bpy.types.Image)
bpy.types.Scene.dream_textures_history_selection = IntProperty()
bpy.types.Scene.dream_textures_progress = bpy.props.IntProperty(name="Progress", default=0, min=0, max=0)
bpy.types.Scene.dream_textures_info = bpy.props.StringProperty(name="Info")

for cls in CLASSES:
bpy.utils.register_class(cls)
Expand All @@ -87,8 +80,6 @@ def register():
bpy.utils.register_tool(tool)

def unregister():
bpy.utils.unregister_class(AsyncLoopModalOperator)

for cls in PREFERENCE_CLASSES:
bpy.utils.unregister_class(cls)

Expand All @@ -97,6 +88,7 @@ def unregister():
bpy.utils.unregister_class(cls)
for tool in TOOLS:
bpy.utils.unregister_tool(tool)
kill_generator()

if __name__ == "__main__":
register()
280 changes: 0 additions & 280 deletions async_loop.py

This file was deleted.

Loading