Giter VIP home page Giter VIP logo

Comments (3)

NullSenseStudio avatar NullSenseStudio commented on September 26, 2024 1

Seems primarily the issue is that timers don't run when Blender is started from the command line to render. Likely due to the main thread being used as the render thread, rather than having a separate thread for rendering where the main thread is free to handle timer events.

def _run_on_main_thread(self, func):
try:
import bpy
bpy.app.timers.register(func, persistent=True)
except:
func()

These timers are necessary under normal circumstances to run things on Blender's main thread and not cause crashes. We'll have to make sure any requests to the backend are blocking when bpy.app.background==True and have the Future objects queue their callbacks to run on the calling thread somehow.

from dream-textures.

GottfriedHofmann avatar GottfriedHofmann commented on September 26, 2024

With the lastest git it gets one step further but fails to write the rendered image to disk:

WARN (bpy.rna): C:\Users\blender\git\blender-v360\blender.git\source\blender\python\intern\bpy_rna.c:1343 pyrna_enum_to_py: current value '1' matches no enum in 'DreamTexturesRenderEngineProperties', '', 'backend'
Error: Python: Traceback (most recent call last):
File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\engine\nodes\pipeline_nodes.py", line 79, in update
self.prompt.backend = bpy.context.scene.dream_textures_render_engine.backend
TypeError: bpy_struct: item.attr = val: enum "" not found in ('dream_textures.diffusers_backend.DiffusersBackend')
Traceback (most recent call last):
File "C:\Users\g\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\engine\nodes\pipeline_nodes.py", line 79, in update
self.prompt.backend = bpy.context.scene.dream_textures_render_engine.backend
TypeError: bpy_struct: item.attr = val: enum "" not found in ('dream_textures.diffusers_backend.DiffusersBackend')
Fra:1 Mem:49.74M (Peak 49.74M) | Time:00:00.00 | Group Output
Fra:1 Mem:49.74M (Peak 49.74M) | Time:00:00.00 | Render Properties
Fra:1 Mem:49.74M (Peak 49.74M) | Time:00:00.00 | Render Properties
Fra:1 Mem:49.74M (Peak 49.74M) | Time:00:00.01 | Render Properties
Fra:1 Mem:49.74M (Peak 49.74M) | Time:00:00.01 | Stable Diffusion
Keyword arguments {'safety_checker': None, 'requires_safety_checker': False} are not expected by StableDiffusionXLPipeline and will be ignored.
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:00<00:00, 7.62it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 25/25 [00:08<00:00, 3.02it/s]

from dream-textures.

GganallHis avatar GganallHis commented on September 26, 2024

Same issue here. I get an endless list of 'WARN (bpy.rna): C:\Users\blender\git\blender-v360\blender.git\source\blender\python\intern\bpy_rna.c:1343 pyrna_enum_to_py: current value '0' matches no enum in 'DreamPrompt', '', 'model''.

Also:

WARN (bpy.rna): C:\Users\blender\git\blender-v360\blender.git\source\blender\python\intern\bpy_rna.c:1343 pyrna_enum_to_py: current value '1' matches no enum in 'DreamTexturesRenderEngineProperties', '', 'backend'
Traceback (most recent call last):
File "C:\Users\GganallHis\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\dream_textures\engine\nodes\pipeline_nodes.py", line 79, in update
self.prompt.backend = bpy.context.scene.dream_textures_render_engine.backend
TypeError: bpy_struct: item.attr = val: enum "" not found in ('dream_textures.diffusers_backend.DiffusersBackend')

from dream-textures.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.