DrCyanide / cyanic-sd-krita

A Stable Diffusion plugin for Krita, compatible with A1111 and SD.Next
68 stars 4 forks source link

Krita CyanicSD Inpaint #40

Closed DominiqueFrt closed 2 months ago

DominiqueFrt commented 3 months ago

Bonjour, je ne parvient pas à tester Krita CyanicSD Inpaint. AI diffusion Inpaint fonctionne. Que fais-je mal ? Cordialement


Hi, I can't test Krita Cyanicsd Inpaint. AI Inpaint diffusion works. What do I hurt? Sincerely


Screenshot_20240609_204947

AttributeError Python 3.11.9: /usr/bin/python3 Sun Jun 9 20:46:45 2024

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py in change_page(self=) 65 self.settings_controller.set('pages.last', page['name']) 66 self.settings_controller.save() 67 page['content']() 68 self.update() 69 page = {'content': <bound method CyanicDocker.show_inpaint of >, 'name': 'Inpaint'}

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py in show_inpaint(self=) 82 83 def show_inpaint(self): 84 self.content_area.setWidget(InpaintPage(self.settings_controller, self.api)) 85 86 def show_interrogate(self): self = self.content_area = self.content_area.setWidget = global InpaintPage = <class 'cyanic.pages.inpaint.InpaintPage'> self.settings_controller = self.api =

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/pages/inpaint.py in init(self=, settings_controller=, api=) 55 self.layout().addWidget(extension_collapsed) 56 57 self.generate_widget = GenerateWidget(self.settings_controller, self.api, [self.mask_widget, self.color_correction, self.denoise_widget, self.model_widget, self.prompt_widget, self.soft_inpaint_widget, self.batch_widget, self.cfg_widget, self.seed_widget, self.extension_widget], 'inpaint', self.size_dict) 58 self.layout().addWidget(self.generate_widget) 59 self = self.generate_widget undefined global GenerateWidget = <class 'cyanic.widgets.generate.GenerateWidget'> self.settings_controller = self.api = self.mask_widget = self.color_correction = self.denoise_widget = self.model_widget = self.prompt_widget = self.soft_inpaint_widget undefined self.batch_widget = self.cfg_widget = self.seed_widget = self.extension_widget = self.size_dict = {'h': 0, 'w': 0, 'x': 0, 'y': 0} AttributeError: 'InpaintPage' object has no attribute 'soft_inpaint_widget' cause = None class = <class 'AttributeError'> context = None delattr = <method-wrapper 'delattr' of AttributeError object> dict = {} dir = doc = 'Attribute not found.' eq = <method-wrapper 'eq' of AttributeError object> format = ge = <method-wrapper 'ge' of AttributeError object> getattribute = <method-wrapper 'getattribute' of AttributeError object> getstate = gt = <method-wrapper 'gt' of AttributeError object> hash = <method-wrapper 'hash' of AttributeError object> init = <method-wrapper 'init' of AttributeError object> init_subclass = <built-in method init_subclass of type object> le = <method-wrapper 'le' of AttributeError object> lt = <method-wrapper 'lt' of AttributeError object> ne = <method-wrapper 'ne' of AttributeError object> new = reduce = reduce_ex = <built-in method reduce_ex of AttributeError object> repr = <method-wrapper 'repr' of AttributeError object> setattr = <method-wrapper 'setattr' of AttributeError object> setstate = sizeof = str = <method-wrapper 'str' of AttributeError object> subclasshook = __suppress_context = False traceback__ = add_note = args = ("'InpaintPage' object has no attribute 'soft_inpaint_widget'",) name = 'soft_inpaint_widget' obj = with_traceback =

The above is a description of an error in a Python program. Here is the original traceback:

Traceback (most recent call last): File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py", line 67, in change_page page['content']() File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py", line 84, in show_inpaint self.content_area.setWidget(InpaintPage(self.settings_controller, self.api)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/pages/inpaint.py", line 57, in init self.generate_widget = GenerateWidget(self.settings_controller, self.api, [self.mask_widget, self.color_correction, self.denoise_widget, self.model_widget, self.prompt_widget, self.soft_inpaint_widget, self.batch_widget, self.cfg_widget, self.seed_widget, self.extension_widget], 'inpaint', self.size_dict) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'InpaintPage' object has no attribute 'soft_inpaint_widget'

DrCyanide commented 3 months ago

That error should be fixed now, try updating the project.

Soft Inpaint is a setting that's only available for some versions of Stable Diffusion. I was checking if it was installed in one part of the code, but not the other.


Cette erreur devrait être corrigée maintenant, essayez de mettre à jour le projet.

Soft Inpaint est un paramètre qui n’est disponible que pour certaines versions de Stable Diffusion. Je vérifiais s’il était installé dans une partie du code, mais pas dans l’autre.

DominiqueFrt commented 3 months ago

Screenshot_20240610_153455

J'ai installé GitHub Desktop, mais je ne suis pas sur d'avoir mis à jour le projet. I installed Github Desktop, but I'm not sure I have updated the project.

AttributeError Python 3.11.9: /usr/bin/python3 Mon Jun 10 15:37:50 2024

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py in change_page(self=) 65 self.settings_controller.set('pages.last', page['name']) 66 self.settings_controller.save() 67 page['content']() 68 self.update() 69 page = {'content': <bound method CyanicDocker.show_inpaint of >, 'name': 'Inpaint'}

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py in show_inpaint(self=) 82 83 def show_inpaint(self): 84 self.content_area.setWidget(InpaintPage(self.settings_controller, self.api)) 85 86 def show_interrogate(self): self = self.content_area = self.content_area.setWidget = global InpaintPage = <class 'cyanic.pages.inpaint.InpaintPage'> self.settings_controller = self.api =

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/pages/inpaint.py in init(self=, settings_controller=, api=) 55 self.layout().addWidget(extension_collapsed) 56 57 self.generate_widget = GenerateWidget(self.settings_controller, self.api, [self.mask_widget, self.color_correction, self.denoise_widget, self.model_widget, self.prompt_widget, self.soft_inpaint_widget, self.batch_widget, self.cfg_widget, self.seed_widget, self.extension_widget], 'inpaint', self.size_dict) 58 self.layout().addWidget(self.generate_widget) 59 self = self.generate_widget undefined global GenerateWidget = <class 'cyanic.widgets.generate.GenerateWidget'> self.settings_controller = self.api = self.mask_widget = self.color_correction = self.denoise_widget = self.model_widget = self.prompt_widget = self.soft_inpaint_widget undefined self.batch_widget = self.cfg_widget = self.seed_widget = self.extension_widget = self.size_dict = {'h': 0, 'w': 0, 'x': 0, 'y': 0} AttributeError: 'InpaintPage' object has no attribute 'soft_inpaint_widget' cause = None class = <class 'AttributeError'> context = None delattr = <method-wrapper 'delattr' of AttributeError object> dict = {} dir = doc = 'Attribute not found.' eq = <method-wrapper 'eq' of AttributeError object> format = ge = <method-wrapper 'ge' of AttributeError object> getattribute = <method-wrapper 'getattribute' of AttributeError object> getstate = gt = <method-wrapper 'gt' of AttributeError object> hash = <method-wrapper 'hash' of AttributeError object> init = <method-wrapper 'init' of AttributeError object> init_subclass = <built-in method init_subclass of type object> le = <method-wrapper 'le' of AttributeError object> lt = <method-wrapper 'lt' of AttributeError object> ne = <method-wrapper 'ne' of AttributeError object> new = reduce = reduce_ex = <built-in method reduce_ex of AttributeError object> repr = <method-wrapper 'repr' of AttributeError object> setattr = <method-wrapper 'setattr' of AttributeError object> setstate = sizeof = str = <method-wrapper 'str' of AttributeError object> subclasshook = __suppress_context = False traceback__ = add_note = args = ("'InpaintPage' object has no attribute 'soft_inpaint_widget'",) name = 'soft_inpaint_widget' obj = with_traceback =

The above is a description of an error in a Python program. Here is the original traceback:

Traceback (most recent call last): File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py", line 67, in change_page page['content']() File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py", line 84, in show_inpaint self.content_area.setWidget(InpaintPage(self.settings_controller, self.api)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/pages/inpaint.py", line 57, in init self.generate_widget = GenerateWidget(self.settings_controller, self.api, [self.mask_widget, self.color_correction, self.denoise_widget, self.model_widget, self.prompt_widget, self.soft_inpaint_widget, self.batch_widget, self.cfg_widget, self.seed_widget, self.extension_widget], 'inpaint', self.size_dict) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'InpaintPage' object has no attribute 'soft_inpaint_widget'

DrCyanide commented 3 months ago

The error message shows the old version of the code, so it is not updated yet. You'll have to completely close Krita for the update to work. GitHub Desktop is showing the correct code, so if restarting Krita doesn't work then you might need to follow the installation steps again, making sure to use the folder that GitHub Desktop has Cyanic SD saved in.


Le message d’erreur affiche l’ancienne version du code, il n’est donc pas encore mis à jour. Vous devrez fermer complètement Krita pour que la mise à jour fonctionne. GitHub Desktop affiche le code correct, donc si le redémarrage de Krita ne fonctionne pas, vous devrez peut-être suivre à nouveau les étapes d’installation, en veillant à utiliser le dossier dans lequel GitHub Desktop a enregistré Cyanic SD.

DominiqueFrt commented 3 months ago

Reinstallation depuis la branche Beta de GitHub - Reinstallation from the GitHub Beta branch image Screenshot_20240610_173408 Screenshot_20240610_173202 Redémarrage du PC - Restarting the PC

AttributeError Python 3.11.9: /usr/bin/python3 Mon Jun 10 17:44:41 2024

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py in change_page(self=) 65 self.settings_controller.set('pages.last', page['name']) 66 self.settings_controller.save() 67 page['content']() 68 self.update() 69 page = {'content': <bound method CyanicDocker.show_inpaint of >, 'name': 'Inpaint'}

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py in show_inpaint(self=) 82 83 def show_inpaint(self): 84 self.content_area.setWidget(InpaintPage(self.settings_controller, self.api)) 85 86 def show_interrogate(self): self = self.content_area = self.content_area.setWidget = global InpaintPage = <class 'cyanic.pages.inpaint.InpaintPage'> self.settings_controller = self.api =

/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/pages/inpaint.py in init(self=, settings_controller=, api=) 55 self.layout().addWidget(extension_collapsed) 56 57 self.generate_widget = GenerateWidget(self.settings_controller, self.api, [self.mask_widget, self.color_correction, self.denoise_widget, self.model_widget, self.prompt_widget, self.soft_inpaint_widget, self.batch_widget, self.cfg_widget, self.seed_widget, self.extension_widget], 'inpaint', self.size_dict) 58 self.layout().addWidget(self.generate_widget) 59 self = self.generate_widget undefined global GenerateWidget = <class 'cyanic.widgets.generate.GenerateWidget'> self.settings_controller = self.api = self.mask_widget = self.color_correction = self.denoise_widget = self.model_widget = self.prompt_widget = self.soft_inpaint_widget undefined self.batch_widget = self.cfg_widget = self.seed_widget = self.extension_widget = self.size_dict = {'h': 0, 'w': 0, 'x': 0, 'y': 0} AttributeError: 'InpaintPage' object has no attribute 'soft_inpaint_widget' cause = None class = <class 'AttributeError'> context = None delattr = <method-wrapper 'delattr' of AttributeError object> dict = {} dir = doc = 'Attribute not found.' eq = <method-wrapper 'eq' of AttributeError object> format = ge = <method-wrapper 'ge' of AttributeError object> getattribute = <method-wrapper 'getattribute' of AttributeError object> getstate = gt = <method-wrapper 'gt' of AttributeError object> hash = <method-wrapper 'hash' of AttributeError object> init = <method-wrapper 'init' of AttributeError object> init_subclass = <built-in method init_subclass of type object> le = <method-wrapper 'le' of AttributeError object> lt = <method-wrapper 'lt' of AttributeError object> ne = <method-wrapper 'ne' of AttributeError object> new = reduce = reduce_ex = <built-in method reduce_ex of AttributeError object> repr = <method-wrapper 'repr' of AttributeError object> setattr = <method-wrapper 'setattr' of AttributeError object> setstate = sizeof = str = <method-wrapper 'str' of AttributeError object> subclasshook = __suppress_context = False traceback__ = add_note = args = ("'InpaintPage' object has no attribute 'soft_inpaint_widget'",) name = 'soft_inpaint_widget' obj = with_traceback =

The above is a description of an error in a Python program. Here is the original traceback:

Traceback (most recent call last): File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py", line 67, in change_page page['content']() File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/cyanic.py", line 84, in show_inpaint self.content_area.setWidget(InpaintPage(self.settings_controller, self.api)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/vieux_loup/.var/app/org.kde.krita/data/krita/pykrita/cyanic/pages/inpaint.py", line 57, in init self.generate_widget = GenerateWidget(self.settings_controller, self.api, [self.mask_widget, self.color_correction, self.denoise_widget, self.model_widget, self.prompt_widget, self.soft_inpaint_widget, self.batch_widget, self.cfg_widget, self.seed_widget, self.extension_widget], 'inpaint', self.size_dict) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'InpaintPage' object has no attribute 'soft_inpaint_widget'

DominiqueFrt commented 3 months ago

https://github.com/DrCyanide/cyanic-sd-krita/tree/Beta https://github.com/DrCyanide/cyanic-sd-krita.git

DrCyanide commented 3 months ago

"Beta" is too early in development to use. It's a significant code change, requiring every file be changed. I've only uploaded it to make sure it's saved while in development. Please use "main" for now.

The Krita error you posted isn't using the "Beta" or current "main" branch of the code, it's an error from an older version. If you installed Cyanic SD from a zip file the first time - or if you copied the files into the pykrita folder - that would cause the problem. You'll have to delete cyanic and cyanic.desktop from pykrita and follow the install instructions again.


La "Beta" est trop tôt dans le développement pour être utilisée. Il s'agit d'un changement de code important, nécessitant que chaque fichier soit modifié. Je l'ai simplement téléchargé pour m'assurer qu'il est enregistré pendant le développement. Veuillez utiliser "main" pour l'instant.

L'erreur Krita que vous avez publiée n'utilise pas la branche "Bêta" ou "main" actuelle du code, c'est une erreur d'une ancienne version. Si vous avez installé Cyanic SD à partir d'un fichier zip la première fois - ou si vous avez copié les fichiers dans le dossier pykrita - cela provoquerait le problème. Vous devrez supprimer cyanic et cyanic.desktop de pykrita et suivre à nouveau les instructions d'installation.

DominiqueFrt commented 3 months ago

La boite de dialogue Inpaint s'ouvre. The Inpaint dialogue box opens. Listes déroulantes Model & VAE vides. Model & Vae drop -down lists. Generate sans effets. Generate without effects. Generate rend invisible le calque de masque. Generate makes the mask layer invisible. Cyanic SD a t'il besoin de AI Diffusion ? Screenshot_20240610_200508

DrCyanide commented 3 months ago

An empty Model selection box means Cyanic SD couldn't find Stable Diffusion. Go to the "Settings" drop down option in Cyanic SD to double check the connection. If Krita started up before Stable Diffusion finished starting that can also cause the issue, and it can be fixed by just switching between any of the Cyanic SD drop down options (like going from Inpaint to Txt2Img and back).

Stable Diffusion needs Automatic 1111, SD.Next, or Forge to be running with --api command line args.


Une zone de sélection de modèle vide signifie que Cyanic SD n'a pas pu trouver de diffusion stable. Accédez à l'option déroulante "Settings" dans Cyanic SD pour vérifier la connexion. Si Krita a démarré avant la fin du démarrage de Stable Diffusion, cela peut également causer le problème, et il peut être résolu en basculant simplement entre l'une des options déroulantes Cyanic SD (comme passer d'Inpaint à Txt2Img et inversement).

Stable Diffusion nécessite qu'Automatic 1111, SD.Next ou Forge soit exécuté avec les arguments de ligne de commande --api.