Trojaner / text-generation-webui-stable_diffusion

Integrate image generation capabilities to text-generation-webui using Stable Diffusion.
Other
51 stars 5 forks source link

I have no idea...send help. SD.Next #14

Closed TooShyTo closed 6 months ago

TooShyTo commented 6 months ago
00:31:15-603389 ERROR    (500, '{"error":"TypeError","detail":"","body":"","errors":"unsupported operand type(s) for +:
                         \'NoneType\' and \'str\'"}')
                         ┌──────────────────────────── Traceback (most recent call last) ─────────────────────────────┐
                         │ C:\text-generation-webui-main\extensions\stable_diffusion\script.py:210 in output_modifier │
                         │                                                                                            │
                         │   207 │   │   return string                                                                │
                         │   208 │                                                                                    │
                         │   209 │   try:                                                                             │
                         │ > 210 │   │   images_html, prompt, _, _, _ = generate_html_images_for_context(context)     │
                         │   211 │   │                                                                                │
                         │   212 │   │   if images_html:                                                              │
                         │   213 │   │   │   if (                                                                     │
                         │                                                                                            │
                         │ C:\text-generation-webui-main\extensions\stable_diffusion\ext_modules\image_generator.py:6 │
                         │ 3 in generate_html_images_for_context                                                      │
                         │                                                                                            │
                         │    60 │   and returns the result as HTML output                                            │
                         │    61 │   """                                                                              │
                         │    62 │                                                                                    │
                         │ >  63 │   attempt_vram_reallocation(VramReallocationTarget.STABLE_DIFFUSION, context)      │
                         │    64 │                                                                                    │
                         │    65 │   sd_client = context.sd_client                                                    │
                         │    66                                                                                      │
                         │                                                                                            │
                         │ C:\text-generation-webui-main\extensions\stable_diffusion\ext_modules\vram_manager.py:25   │
                         │ in attempt_vram_reallocation                                                               │
                         │                                                                                            │
                         │   22 │   if not context.params.dynamic_vram_reallocation_enabled:                          │
                         │   23 │   │   return                                                                        │
                         │   24 │                                                                                     │
                         │ > 25 │   _reallocate_vram_for_target(target, context)                                      │
                         │   26                                                                                       │
                         │   27                                                                                       │
                         │   28 def _reallocate_vram_for_target(                                                      │
                         │                                                                                            │
                         │ C:\text-generation-webui-main\extensions\stable_diffusion\ext_modules\vram_manager.py:33   │
                         │ in _reallocate_vram_for_target                                                             │
                         │                                                                                            │
                         │   30 ) -> None:                                                                            │
                         │   31 │   match target:                                                                     │
                         │   32 │   │   case VramReallocationTarget.STABLE_DIFFUSION:                                 │
                         │ > 33 │   │   │   _allocate_vram_for_stable_diffusion(context)                              │
                         │   34 │   │   case VramReallocationTarget.LLM:                                              │
                         │   35 │   │   │   _allocate_vram_for_llm(context)                                           │
                         │   36 │   │   case _:                                                                       │
                         │                                                                                            │
                         │ C:\text-generation-webui-main\extensions\stable_diffusion\ext_modules\vram_manager.py:42   │
                         │ in _allocate_vram_for_stable_diffusion                                                     │
                         │                                                                                            │
                         │   39                                                                                       │
                         │   40 def _allocate_vram_for_stable_diffusion(context: GenerationContext) -> None:          │
                         │   41 │   unload_model()                                                                    │
                         │ > 42 │   context.sd_client.reload_checkpoint()                                             │
                         │   43                                                                                       │
                         │   44                                                                                       │
                         │   45 def _allocate_vram_for_llm(context: GenerationContext) -> None:                       │
                         │                                                                                            │
                         │ C:\text-generation-webui-main\extensions\stable_diffusion\sd_client.py:48 in               │
                         │ reload_checkpoint                                                                          │
                         │                                                                                            │
                         │    45 │   │   Reload the current checkpoint into VRAM.                                     │
                         │    46 │   │   """                                                                          │
                         │    47 │   │                                                                                │
                         │ >  48 │   │   return self.post_and_get_api_result(  # type: ignore                         │
                         │    49 │   │   │   f"{self.baseurl}/reload-checkpoint", "", use_async                       │
                         │    50 │   │   )                                                                            │
                         │    51                                                                                      │
                         │                                                                                            │
                         │ C:\text-generation-webui-main\installer_files\env\Lib\site-packages\webuiapi\webuiapi.py:6 │
                         │ 41 in post_and_get_api_result                                                              │
                         │                                                                                            │
                         │    638 │   │   │   return asyncio.ensure_future(self.async_post(url=url, json=json))       │
                         │    639 │   │   else:                                                                       │
                         │    640 │   │   │   response = self.session.post(url=url, json=json)                        │
                         │ >  641 │   │   │   return self._to_api_result(response)                                    │
                         │    642 │                                                                                   │
                         │    643 │   async def async_post(self, url, json):                                          │
                         │    644 │   │   import aiohttp                                                              │
                         │                                                                                            │
                         │ C:\text-generation-webui-main\installer_files\env\Lib\site-packages\webuiapi\webuiapi.py:4 │
                         │ 38 in _to_api_result                                                                       │
                         │                                                                                            │
                         │    435 │                                                                                   │
                         │    436 │   def _to_api_result(self, response):                                             │
                         │    437 │   │   if response.status_code != 200:                                             │
                         │ >  438 │   │   │   raise RuntimeError(response.status_code, response.text)                 │
                         │    439 │   │                                                                               │
                         │    440 │   │   r = response.json()                                                         │
                         │    441 │   │   images = []                                                                 │
                         └────────────────────────────────────────────────────────────────────────────────────────────┘
                         RuntimeError: (500, '{"error":"TypeError","detail":"","body":"","errors":"unsupported operand
                         type(s) for +: \'NoneType\' and \'str\'"}')
TooShyTo commented 6 months ago

Nah, never mind it works perfectly fine if you can read the instructions, so yeah (´・ω・`)